You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2019/10/01 17:25:20 UTC
[sis] 09/09: Reformatting: - Format copyright header in the same
way than other files. - Rearrange some import order and remove some empty
lines. - Set version number to 1.1.
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
commit ea466fae64c884924c3fc650d8385b76d07c39b1
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Tue Oct 1 11:52:57 2019 +0200
Reformatting:
- Format copyright header in the same way than other files.
- Rearrange some import order and remove some empty lines.
- Set version number to 1.1.
Code change:
- Add serialVersionUID.
- Edit ParameterDescriptors.
- Reduce the scope of some variables.
---
.../referencing/provider/SatelliteTracking.java | 204 ++++++++------------
.../referencing/provider/package-info.java | 3 +-
.../projection/ConicSatelliteTracking.java | 209 +++++++++------------
.../projection/CylindricalSatelliteTracking.java | 99 +++-------
.../operation/projection/package-info.java | 3 +-
.../referencing/provider/Descriptions.properties | 5 +
.../referencing/provider/ProvidersTest.java | 13 +-
.../projection/ConicSatelliteTrackingTest.java | 61 +++---
.../CylindricalSatelliteTrackingTest.java | 65 +++----
.../sis/test/suite/ReferencingTestSuite.java | 2 +-
ide-project/NetBeans/build.xml | 1 +
11 files changed, 270 insertions(+), 395 deletions(-)
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/SatelliteTracking.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/SatelliteTracking.java
index 787b404..dd529b8 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/SatelliteTracking.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/SatelliteTracking.java
@@ -1,174 +1,116 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.sis.internal.referencing.provider;
import javax.xml.bind.annotation.XmlTransient;
-import org.apache.sis.measure.Units;
+import org.opengis.parameter.ParameterDescriptor;
+import org.opengis.parameter.ParameterDescriptorGroup;
+import org.opengis.parameter.ParameterNotFoundException;
+import org.apache.sis.metadata.iso.citation.Citations;
import org.apache.sis.parameter.ParameterBuilder;
import org.apache.sis.parameter.Parameters;
import org.apache.sis.referencing.operation.projection.ConicSatelliteTracking;
import org.apache.sis.referencing.operation.projection.CylindricalSatelliteTracking;
import org.apache.sis.referencing.operation.projection.NormalizedProjection;
-import org.apache.sis.util.ArgumentChecks;
-import org.opengis.parameter.ParameterDescriptor;
-import org.opengis.parameter.ParameterDescriptorGroup;
-import org.opengis.parameter.ParameterNotFoundException;
+import org.apache.sis.util.iso.ResourceInternationalString;
+import org.apache.sis.internal.util.Constants;
+import org.apache.sis.measure.Units;
+
/**
- * The provider for <cite>Satellite-Tracking projections"</cite>.
- *
- * <cite>
- * - All groundtracks for satellites orbiting the Earth with the same orbital
- * parameters are shown as straight lines on the map.
- *
- * - Cylindrical {@link CylindricalSatelliteTracking} or conical
- * {@link ConicSatelliteTracking} form available.
- *
- * - Neither conformal nor equal-area.
- *
- * - All meridians are equally spaced straight lines, parallel on cylindrical
- * form and converging to a common point on conical form.
- *
- * - All parallels are straight and parallel on cylindrical form and are
- * concentric circular arcs on conical form. Parallels are unequally spaced.
- *
- * - Conformality occurs along two chosen parallels. Scale is correct along one
- * of these parameters on the conical form and along both on the cylindrical
- * form.
- *
- * Developed 1977 by Snyder
- * </cite>
- *
- * <cite> These formulas are confined to circular orbits and the SPHERICAL
- * Earth.</cite>
- *
- * <cite>The ascending and descending groundtracks meet at the northern an
- * southern tracking limits, lats. 80.9°N and S for landsat 1, 2 and 3. The map
- * Projection does not extend closer to the poles.</cite>
+ * The provider for <cite>"Satellite-Tracking"</cite> projections.
+ * More details about this projection are documented in the {@link ConicSatelliteTracking} class.
*
- * This projection method has no associated EPSG code.
- *
- * Earth radius is normalized. Its value is 1 and is'nt an input parameter.
- *
- * =============================================================================
- * REMARK : The parameters associated with the satellite (and its orbit) could
- * be aggregate in class of the kind : Satellite or SatelliteOrbit.
- * =============================================================================
- *
- * @see <cite>Map Projections - A Working Manual</cite> By John P. Snyder
- * @author Matthieu Bastianelli (Geomatys)
- * @version 1.0
+ * @author Matthieu Bastianelli (Geomatys)
+ * @author Martin Desruisseaux (Geomatys)
+ * @version 1.1
+ * @since 1.1
+ * @module
*/
@XmlTransient
public class SatelliteTracking extends MapProjection {
-
/**
- * Name of this projection.
+ * For cross-version compatibility.
*/
- public static final String NAME = "Satellite-Tracking";
+ private static final long serialVersionUID = -2406880538621713953L;
/**
- * The operation parameter descriptor for the <cite>Longitude of projection
- * center</cite> (λ₀) parameter value. Valid values range is [-180 … 180]°
- * and default value is 0°.
+ * The operation parameter descriptor for the <cite>central meridian</cite> (λ₀) parameter value.
+ * Valid values range is [-180 … 180]° and default value is 0°.
*/
public static final ParameterDescriptor<Double> CENTRAL_MERIDIAN = ESRI.CENTRAL_MERIDIAN;
/**
- * The operation parameter descriptor for the <cite>Latitude of 1st standard
- * parallel</cite>. For conical satellite-tracking projection : first
- * parallel of conformality with true scale.
- *
- * Valid values range is [-90 … 90]° and default value is the value given to
- * the {@link #LATITUDE_OF_FALSE_ORIGIN} parameter.
+ * Latitude crossing the central meridian at the desired origin of rectangular coordinates.
*/
- public static final ParameterDescriptor<Double> STANDARD_PARALLEL_1 = LambertConformal2SP.STANDARD_PARALLEL_1;
+ public static final ParameterDescriptor<Double> LATITUDE_OF_ORIGIN = ESRI.LATITUDE_OF_ORIGIN;;
/**
- * The operation parameter descriptor for the <cite>second parallel of
- * conformality but without true scale</cite> parameter value for conic
- * projection. Valid values range is [-90 … 90]° and default value is the
- * opposite value given to the {@link #STANDARD_PARALLEL_1} parameter.
+ * The operation parameter descriptor for the <cite>Latitude of 1st standard parallel</cite>.
+ * For conical satellite-tracking projection, this is the first parallel of conformality with true scale.
+ * Valid values range is [-90 … 90]° and default value is 0°.
*/
- public static final ParameterDescriptor<Double> STANDARD_PARALLEL_2 = LambertConformal2SP.STANDARD_PARALLEL_2;
+ public static final ParameterDescriptor<Double> STANDARD_PARALLEL_1 = ESRI.STANDARD_PARALLEL_1;
/**
- * Latitude Crossing the central meridian at the desired origin of
- * rectangular coordinates.
+ * The operation parameter descriptor for the <cite>second parallel of conformality but without true scale</cite>
+ * parameter value for conic projection. Valid values range is [-90 … 90]° and default value is the opposite value
+ * given to the {@link #STANDARD_PARALLEL_1} parameter.
*/
- public static final ParameterDescriptor<Double> LATITUDE_OF_ORIGIN = TransverseMercator.LATITUDE_OF_ORIGIN;;
+ public static final ParameterDescriptor<Double> STANDARD_PARALLEL_2 = ESRI.STANDARD_PARALLEL_2;
/**
- * The operation parameter descriptor for the <cite> Angle of inclination
- * between the plane of the Earth's Equator and the plane of the satellite
- * orbit</cite> parameter value. <cite> It's measured counterclockwise from
- * the Equatorto the orbit plane at the ascending node (99.092° for Landsat
- * 1, 2, 3</cite>
+ * The operation parameter descriptor for the angle of inclination between the plane of the Earth's
+ * Equator and the plane of the satellite orbit. It is measured counterclockwise from the Equator to
+ * the orbit plane at the ascending node. Examples: 99.092° for Landsat 1, 2 and 3.
*/
public static final ParameterDescriptor<Double> SATELLITE_ORBIT_INCLINATION;
/**
- * The operation parameter descriptor for the <cite> time required for
- * revolution of the satellite</cite> parameter value.
+ * The operation parameter descriptor for the time required for revolution of the satellite.
+ * Examples: 103.267 minutes for Landsat 1, 2 and 3; 98.884 minutes for Landsat 4 and 5.
*/
public static final ParameterDescriptor<Double> SATELLITE_ORBITAL_PERIOD;
/**
- * The operation parameter descriptor for the <cite> length of earth's
- * rotation with respect to the precessed ascending node</cite> parameter
- * value. The ascending node is the point on the satellite orbit at which
- * the satellite crosses the Earth's equatorial plane in a northerly
- * direction.
+ * The operation parameter descriptor for the length of Earth's rotation with respect to the
+ * precessed ascending node. The ascending node is the point on the satellite orbit at which
+ * the satellite crosses the Earth's equatorial plane in a northerly direction.
+ * For Landsat (Sun-synchronous satellite orbit), this is 1440 minutes.
*/
- public static final ParameterDescriptor<Double> ASCENDING_NODE_PERIOD; //Constant for landsat but is it the case for every satellite with circular orbital?
+ public static final ParameterDescriptor<Double> ASCENDING_NODE_PERIOD;
/**
* The group of all parameters expected by this coordinate operation.
*/
static final ParameterDescriptorGroup PARAMETERS;
-
static {
- final ParameterBuilder builder = new ParameterBuilder();
- builder.setCodeSpace(null, null)
- .setRequired(true);
-
- SATELLITE_ORBIT_INCLINATION = builder
- .addName("satellite_orbit_inclination")
- .setDescription("Angle of inclination between the plane of the Earth's Equator and the plane of the satellite orbit")
- .create(0, Units.DEGREE);
-
- SATELLITE_ORBITAL_PERIOD = builder
- .addName("satellite_orbital_period")
- .setDescription("Time required for revolution of the satellite")
- .createStrictlyPositive(103.267, Units.MINUTE); //Or hours? Seconds?
-
- ASCENDING_NODE_PERIOD = builder
- .addName("ascending_node_period")
- .setDescription("Length of Earth's rotation with respect to the precessed ascending node")
- .createStrictlyPositive(98.884, Units.MINUTE);
-
- PARAMETERS = builder.addName(NAME)
- .createGroupForMapProjection(CENTRAL_MERIDIAN,
- STANDARD_PARALLEL_1, STANDARD_PARALLEL_2,
- SATELLITE_ORBIT_INCLINATION, SATELLITE_ORBITAL_PERIOD,
- ASCENDING_NODE_PERIOD, LATITUDE_OF_ORIGIN);
-
+ final ParameterBuilder builder = builder().setCodeSpace(Citations.SIS, Constants.SIS);
+ SATELLITE_ORBIT_INCLINATION = setNameAndDescription(builder, "satellite_orbit_inclination").create(0, Units.DEGREE);
+ SATELLITE_ORBITAL_PERIOD = setNameAndDescription(builder, "satellite_orbital_period").createStrictlyPositive(Double.NaN, Units.DAY);
+ ASCENDING_NODE_PERIOD = setNameAndDescription(builder, "ascending_node_period") .createStrictlyPositive(Double.NaN, Units.DAY);
+ PARAMETERS = builder.addName("Satellite-Tracking").createGroupForMapProjection(
+ LATITUDE_OF_ORIGIN,
+ CENTRAL_MERIDIAN,
+ STANDARD_PARALLEL_1,
+ STANDARD_PARALLEL_2,
+ SATELLITE_ORBIT_INCLINATION,
+ SATELLITE_ORBITAL_PERIOD,
+ ASCENDING_NODE_PERIOD);
}
/**
@@ -179,19 +121,29 @@ public class SatelliteTracking extends MapProjection {
}
/**
+ * Sets the parameter name in the given builder, together with a description created from
+ * the resource bundle in this package. The resource key is the same as the parameter name.
+ *
+ * @param builder the builder where to set the parameter name and description.
+ * @param name the parameter name, also used as resource key.
+ * @return the builder, for method calls chaining.
+ */
+ private static ParameterBuilder setNameAndDescription(final ParameterBuilder builder, final String name) {
+ return builder.addName(name).setDescription(new ResourceInternationalString(
+ "org.apache.sis.internal.referencing.provider.Descriptions", name));
+ }
+
+ /**
* {@inheritDoc}
*
* @return the map projection created from the given parameter values.
*/
@Override
protected NormalizedProjection createProjection(final Parameters parameters) throws ParameterNotFoundException {
- ArgumentChecks.ensureNonNull("Parameters", parameters);
-
if (parameters.getValue(STANDARD_PARALLEL_2) == -parameters.getValue(STANDARD_PARALLEL_1)) {
- return new org.apache.sis.referencing.operation.projection.CylindricalSatelliteTracking(this, parameters);
+ return new CylindricalSatelliteTracking(this, parameters);
} else {
- return new org.apache.sis.referencing.operation.projection.ConicSatelliteTracking(this, parameters);
+ return new ConicSatelliteTracking(this, parameters);
}
}
-
}
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java
index 45c7402..ecc9b95 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java
@@ -21,7 +21,8 @@
* discussion of parameters.
*
* @author Martin Desruisseaux (Geomatys)
- * @version 1.0
+ * @author Matthieu Bastianelli (Geomatys)
+ * @version 1.1
*
* @see org.apache.sis.referencing.operation.transform.MathTransformProvider
*
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTracking.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTracking.java
index d265ae2..5bd5ff0 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTracking.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTracking.java
@@ -1,101 +1,94 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.sis.referencing.operation.projection;
-import static java.lang.Double.NaN;
import java.util.EnumMap;
-import org.apache.sis.parameter.Parameters;
-import org.apache.sis.util.Workaround;
import org.opengis.parameter.ParameterDescriptor;
import org.opengis.referencing.operation.Matrix;
import org.opengis.referencing.operation.OperationMethod;
-
-import static java.lang.Math.*;
-import java.util.Map;
+import org.apache.sis.util.Workaround;
import org.apache.sis.internal.referencing.Resources;
-import static org.apache.sis.internal.referencing.provider.SatelliteTracking.*;
import org.apache.sis.referencing.operation.matrix.Matrix2;
import org.apache.sis.referencing.operation.matrix.MatrixSIS;
import org.apache.sis.referencing.operation.transform.ContextualParameters;
+import org.apache.sis.parameter.Parameters;
+
+import static java.lang.Math.*;
+import static java.lang.Double.NaN;
+import static org.apache.sis.internal.referencing.provider.SatelliteTracking.*;
+
/**
- * <cite>Cylindrical Satellite-Tracking projections</cite>.
- *
- * <cite>
- * - All groundtracks for satellites orbiting the Earth with the same orbital
- * parameters are shown as straight lines on the map.
- *
- * - Cylindrical {@link CylindricalSatelliteTracking}
- * or conical {@link ConicSatelliteTracking} form available.
- *
- * - Neither conformal nor equal-area.
- *
- * - All meridians are equally spaced straight lines, parallel on cylindrical
- * form and converging to a common point on conical form.
- *
- * - All parallels are straight and parallel on cylindrical form and are
- * concentric circular arcs on conical form. Parallels are unequally spaced.
+ * <cite>Satellite-Tracking</cite> projection.
+ * This projection has been developed in 1977 by Snyder and has no associated EPSG code.
+ * This projection is neither conformal or equal-area, but has the property that ground tracks
+ * for satellites orbiting the Earth with the same orbital parameters are shown as straight lines
+ * on the map. Other properties are (Snyder 1987):
*
- * - Conformality occurs along two chosen parallels. Scale is correct along one
- * of these parameters on the conical form and along both on the cylindrical
- * form.
+ * <ul>
+ * <li>All meridians are equally spaced straight lines.
+ * They are parallel on cylindrical form and converging to a common point on conical form.</li>
+ * <li>All parallels are straight but unequally spaced.
+ * They are parallel on cylindrical form and are concentric circular arcs on conical form.</li>
+ * <li>Conformality occurs along two chosen parallels. Scale is correct along one of these parameters
+ * on the conical form and along both on the cylindrical form.</li>
+ * </ul>
*
- * Developed 1977 by Snyder
- * </cite>
+ * <div class="section">Limitations</div>
+ * This map projection supports only circular orbits. The Earth is assumed spherical.
+ * Areas close to poles can not be mapped.
*
- * <cite> These formulas are confined to circular orbits and the SPHERICAL
- * Earth.</cite>
+ * <div class="section">References</div>
+ * John P. Snyder., 1987. <u>Map Projections - A Working Manual</u>
+ * chapter 28: <cite>Satellite-tracking projections</cite>.
*
- * <cite>The ascending and descending groundtracks meet at the northern an
- * southern tracking limits, lats. 80.9°N and S for landsat 1, 2 and 3. The map
- * Projection does not extend closer to the poles.</cite>
- *
- * This projection method has no associated EPSG code.
- *
- * Earth radius is normalized. Its value is 1 and is'nt an input parameter.
- *
- * =============================================================================
- * REMARK : The parameters associated with the satellite (and its orbit) could
- * be aggregate in class of the kind : Satellite or SatelliteOrbit.
- * =============================================================================
- *
- * @see <cite>Map Projections - A Working Manual</cite> By John P. Snyder
- * @author Matthieu Bastianelli (Geomatys)
- * @version 1.0
+ * @author Matthieu Bastianelli (Geomatys)
+ * @version 1.1
+ * @since 1.1
+ * @module
*/
-public class ConicSatelliteTracking extends NormalizedProjection{
+public class ConicSatelliteTracking extends NormalizedProjection {
+ /**
+ * For cross-version compatibility.
+ */
+ private static final long serialVersionUID = 859940667477896653L;
/**
- * {@code SATELLITE_ORBIT_INCLINATION}
+ * Sines and cosines of inclination between the plane of the Earth's Equator and the plane
+ * of the satellite orbit. The angle variable name is <var>i</var> in Snyder's book.
+ *
+ * @see org.apache.sis.internal.referencing.provider.SatelliteTracking#SATELLITE_ORBIT_INCLINATION
*/
- final double i;
+ final double cos_i, sin_i, cos2_i;
/**
- * Coefficients for both cylindrical and conic Satellite-Tracking Projection.
+ * Cosine of first standard parallel.
+ *
+ * @see org.apache.sis.internal.referencing.provider.SatelliteTracking#STANDARD_PARALLEL_1
*/
- final double cos_i, sin_i, cos2_i, cos_φ1, p2_on_p1;
+ final double cos_φ1;
-// /**
-// * Radius of the circle radius of the circle to which groundtracks
-// * are tangent on the map.
-// */
-// private final double ρs;
+ /**
+ * Ratio of satellite orbital period (P2) over ascending node period (P1).
+ *
+ * @see org.apache.sis.internal.referencing.provider.SatelliteTracking#SATELLITE_ORBITAL_PERIOD
+ * @see org.apache.sis.internal.referencing.provider.SatelliteTracking#ASCENDING_NODE_PERIOD
+ */
+ final double p2_on_p1;
/**
* Projection Cone's constant.
@@ -103,23 +96,17 @@ public class ConicSatelliteTracking extends NormalizedProjection{
private final double n;
/**
- * Approximation of the Minimum latitude at infinite radius.
- *
- * Limiting latitude to which the {@code L coefficient}
- * is associated with a particular case {@code L equals -s0/n}.
- * In such a situation the coefficent ρ computed for transformations
- * is infinite.
+ * Approximation of the minimum latitude at infinite radius.
+ * This is the limiting latitude at which the {@code L} coefficient takes the {@code -s0/n} value.
+ * In such a situation the coefficient ρ computed for transformations is infinite.
*/
private final double latitudeLimit;
- /**
- * Boolean attribute indicating if the projection cone's constant is positive.
- */
- private final boolean positiveN;
+
/**
* Coefficients for the Conic Satellite-Tracking Projection.
- * cosφ1xsinF1_n = cos(φ1)*sin(F1)/n
+ * {@code cosφ1_sinF1_n} = cos(φ₁) × sin(F₁) / n.
*/
- private final double cosφ1xsinF1_n, s0, ρ0;
+ private final double cosφ1_sinF1_n, s0;
/**
* Work around for RFE #4093999 in Sun's bug database ("Relax constraint on
@@ -133,26 +120,18 @@ public class ConicSatelliteTracking extends NormalizedProjection{
}
/**
- * Create a Cylindrical Satellite Tracking Projection from the given
- * parameters.
- *
- * The parameters are described in <cite>Map Projections - A Working
- * Manual</cite> By John P. Snyder.
+ * Creates a Satellite Tracking projection from the given parameters.
*
- * @param method : description of the projection parameters.
- * @param parameters : the parameter values of the projection to create.
+ * @param method description of the projection parameters.
+ * @param parameters the parameter values of the projection to create.
*/
public ConicSatelliteTracking(final OperationMethod method, final Parameters parameters) {
this(initializer(method, parameters));
}
/**
- * Constructor for ConicSatelliteTracking.
- *
- * Calculation are based on <cite>28 .SATTELITE-TRACKING PROJECTIONS </cite>
- * in <cite> Map Projections - A Working Manual</cite> By John P. Snyder.
- *
- * @param initializer
+ * Work around for RFE #4093999 in Sun's bug database
+ * ("Relax constraint on placement of this()/super() call in constructors").
*/
ConicSatelliteTracking(final Initializer initializer) {
super(initializer);
@@ -160,7 +139,7 @@ public class ConicSatelliteTracking extends NormalizedProjection{
//======================================================================
// Common for both cylindrical and conic sattelite tracking projections :
//======================================================================
- i = toRadians(initializer.getAndStore(SATELLITE_ORBIT_INCLINATION));
+ final double i = toRadians(initializer.getAndStore(SATELLITE_ORBIT_INCLINATION));
cos_i = cos(i);
sin_i = sin(i);
cos2_i = cos_i * cos_i;
@@ -224,16 +203,14 @@ public class ConicSatelliteTracking extends NormalizedProjection{
} else {
n = sin_φ1 * (p2_on_p1 * (2 * cos2_i - cos2_φ1) - cos_i) / (p2_on_p1 * cos2_φ1 - cos_i); //eq. 28-17 in Snyder
}
-
- cosφ1xsinF1_n = cos_φ1 * sin(F1)/n;
+ cosφ1_sinF1_n = cos_φ1 * sin(F1)/n;
s0 = F1 - n * L1;
- ρ0 = cosφ1xsinF1_n / sin(n * L0 + s0); // *R in eq.28-12 in Snyder
+ final double ρ0 = cosφ1_sinF1_n / sin(n * L0 + s0); // *R in eq.28-12 in Snyder
//======================== Unsure ======================================
// Aim to assess the limit latitude associated with -s0/n L-value.
//
latitudeLimit = latitudeFromNewtonMethod(-s0 / n);
- positiveN = (n >= 0);
//======================================================================
// //Additionally we can compute the radius of the circle to which groundtracks
@@ -250,8 +227,7 @@ public class ConicSatelliteTracking extends NormalizedProjection{
final MatrixSIS denormalize = context.getMatrix(ContextualParameters.MatrixRole.DENORMALIZATION);
denormalize.convertBefore(1, 1, ρ0); //For conic tracking
} else {
- n = latitudeLimit = cosφ1xsinF1_n = s0 = ρ0 = NaN;
- positiveN = false;
+ n = latitudeLimit = cosφ1_sinF1_n = s0 = NaN;
}
}
@@ -273,15 +249,14 @@ public class ConicSatelliteTracking extends NormalizedProjection{
@Override
public Matrix transform(double[] srcPts, int srcOff,
double[] dstPts, int dstOff,
- boolean derivate) throws ProjectionException {
-
- final double λ = srcPts[srcOff];
- final double φ = srcPts[srcOff + 1];
-
+ boolean derivate) throws ProjectionException
+ {
+ final double λ = srcPts[srcOff];
+ final double φ = srcPts[srcOff + 1];
/*
* According to the Snyder (page 236) in those cases cannot or should not be plotted.
*/
- if ( ((positiveN) && (φ<=latitudeLimit)) || ((!positiveN) && (φ>=latitudeLimit)) ){
+ if ( ((n >= 0) && (φ<=latitudeLimit)) || ((!(n >= 0)) && (φ>=latitudeLimit)) ){
throw new ProjectionException(Resources.format(Resources.Keys.CanNotTransformCoordinates_2));
}
@@ -291,7 +266,7 @@ public class ConicSatelliteTracking extends NormalizedProjection{
/*
* As {@code latitudeLimit} is an approximation we repeat the test here.
*/
- if ( ((positiveN) && (L<=-s0/n)) || ((!positiveN) && (L>=-s0/n)) ){
+ if ( ((n >= 0) && (L<=-s0/n)) || ((!(n >= 0)) && (L>=-s0/n)) ){
//TODO if usefull, could we add :
// latitudeLimit = φ;
throw new ProjectionException(Resources.format(Resources.Keys.CanNotTransformCoordinates_2));
@@ -299,7 +274,7 @@ public class ConicSatelliteTracking extends NormalizedProjection{
final double nLandS0 = n*L+s0;
final double sin_nLandS0 = sin(nLandS0);
- final double ρ = cosφ1xsinF1_n/sin_nLandS0;
+ final double ρ = cosφ1_sinF1_n/sin_nLandS0;
final double sinλ = sin(λ);
final double cosλ = cos(λ);
@@ -313,7 +288,7 @@ public class ConicSatelliteTracking extends NormalizedProjection{
}
//=========================To check the resolution =====================
- final double dρ_dφ = cosφ1xsinF1_n * (-1 / (sin_nLandS0*sin_nLandS0)) *cos(nLandS0) * n
+ final double dρ_dφ = cosφ1_sinF1_n * (-1 / (sin_nLandS0*sin_nLandS0)) *cos(nLandS0) * n
* vector_L[1]; // dL/dφ
final double dx_dλ = ρ*cosλ;
@@ -353,10 +328,9 @@ public class ConicSatelliteTracking extends NormalizedProjection{
//TODO : which values does it imply?
throw new UnsupportedOperationException("Not supported yet for those coordinates."); //To change body of generated methods, choose Tools | Templates.
}
-
- final double ρ = positiveN ? hypot(x,y) : -hypot(x,y);
+ final double ρ = copySign(hypot(x,y), n);
final double θ = atan(x/(-y) ); //undefined if x=y=0
- final double L = (asin(cosφ1xsinF1_n/ρ) -s0)/n; //undefined if x=y=0 //eq.28-26 in Snyder with R=1
+ final double L = (asin(cosφ1_sinF1_n/ρ) -s0)/n; //undefined if x=y=0 //eq.28-26 in Snyder with R=1
dstPts[dstOff ] = θ ;//λ
dstPts[dstOff+1] = latitudeFromNewtonMethod(L); //φ
@@ -401,11 +375,6 @@ public class ConicSatelliteTracking extends NormalizedProjection{
return -asin(sin_dλ * sin_i);
}
-
- public double getLatitudeLimit(){
- return latitudeLimit;
- }
-
/**
* Method to compute the φn coefficient according to equation 28-9
* in Snyder's Map Projections manual.
@@ -456,7 +425,6 @@ public class ConicSatelliteTracking extends NormalizedProjection{
* resulting array.
*/
double[] computeLanddLdφForDirectTransform(final double φ, final boolean derivate){
-
final double sinφ_sini = sin(φ) / sin_i;
final double dλ = -asin(sinφ_sini);
final double tan_dλ = tan(dλ);
@@ -471,5 +439,4 @@ public class ConicSatelliteTracking extends NormalizedProjection{
return new double[] {L};
}
}
-
}
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTracking.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTracking.java
index 4348993..0b98e4c 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTracking.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTracking.java
@@ -1,85 +1,47 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.sis.referencing.operation.projection;
import org.opengis.referencing.operation.Matrix;
-
-import org.apache.sis.parameter.Parameters;
import org.opengis.referencing.operation.OperationMethod;
-
-import static java.lang.Math.*;
-import org.apache.sis.internal.referencing.Resources;
+import org.apache.sis.parameter.Parameters;
import org.apache.sis.referencing.operation.matrix.Matrix2;
import org.apache.sis.referencing.operation.matrix.MatrixSIS;
import org.apache.sis.referencing.operation.transform.ContextualParameters;
+import static java.lang.Math.*;
+
+
/**
- * <cite>Cylindrical Satellite-Tracking projections</cite>.
- *
- * <cite>
- * - All groundtracks
- * for satellites orbiting the Earth with the same orbital parameters are shown
- * as straight lines on the map.
- *
- * - Cylindrical {@link CylindricalSatelliteTracking}
- * or conical {@link ConicSatelliteTracking} form available.
- *
- * - Neither conformal nor equal-area.
- *
- * - All meridians are equally spaced straight lines, parallel on cylindrical
- * form and converging to a common point on conical form.
- *
- * - All parallels are straight and parallel on cylindrical form and are
- * concentric circular arcs on conical form. Parallels are unequally spaced.
+ * Special case of <cite>Satellite-Tracking</cite> projection when the standard parallels are opposite.
*
- * - Conformality occurs along two chosen parallels. Scale is correct along one
- * of these parameters on the conical form and along both on the cylindrical
- * form.
- *
- * Developed 1977 by Snyder
- * </cite>
- *
- * <cite> These formulas are confined to circular orbits and the SPHERICAL
- * Earth.</cite>
- *
- * <cite>The ascending and descending groundtracks meet at the northern an
- * southern tracking limits, lats. 80.9°N and S for landsat 1, 2 and 3. The map
- * Projection does not extend closer to the poles.</cite>
- *
- * This projection method has no associated EPSG code.
- *
- * Earth radius is normalized. Its value is 1 and is'nt an input parameter.
- *
- * =============================================================================
- * REMARK : The parameters associated with the satellite (and its orbit) could
- * be aggregate in class of the kind : Satellite or SatelliteOrbit.
- * =============================================================================
- *
- * @see <cite>Map Projections - A Working Manual</cite> By John P. Snyder
- * @author Matthieu Bastianelli (Geomatys)
- * @version 1.0
+ * @author Matthieu Bastianelli (Geomatys)
+ * @version 1.1
+ * @since 1.1
+ * @module
*/
public class CylindricalSatelliteTracking extends ConicSatelliteTracking {
+ /**
+ * For cross-version compatibility.
+ */
+ private static final long serialVersionUID = -5972958777067525602L;
/**
- * Create a Cylindrical Satellite Tracking Projection from the given
- * parameters.
+ * Create a Cylindrical Satellite Tracking Projection from the given parameters.
*
* The parameters are described in <cite>Map Projections - A Working
* Manual</cite> By John P. Snyder.
@@ -126,12 +88,6 @@ public class CylindricalSatelliteTracking extends ConicSatelliteTracking {
final double λ = srcPts[srcOff];
final double φ = srcPts[srcOff + 1];
- // TODO : check the condition and the thrown exception.
- // if (abs(φ) > PI / 2 - abs(PI - i)) { // Exceed tracking limit
- if (φ > PI - i) { // Exceed tracking limit
- throw new ProjectionException(Resources.format(Resources.Keys.CanNotTransformCoordinates_2));
- }
-
// compute an double array with {L} or {L, dL/dφ} if derivate recquired.
final double[] vector_L = computeLanddLdφForDirectTransform(φ, derivate);
@@ -163,8 +119,6 @@ public class CylindricalSatelliteTracking extends ConicSatelliteTracking {
return new Matrix2(dx_dλ, dx_dφ,
dy_dλ, dy_dφ);
-
-// throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
/**
@@ -184,5 +138,4 @@ public class CylindricalSatelliteTracking extends ConicSatelliteTracking {
dstPts[dstOff ] = x;
dstPts[dstOff+1] = latitudeFromNewtonMethod(y); //φ
}
-
}
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java
index 0fd27c9..d57f0c0 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java
@@ -159,7 +159,8 @@
* @author Martin Desruisseaux (Geomatys)
* @author Rémi Maréchal (Geomatys)
* @author Adrian Custer (Geomatys)
- * @version 1.0
+ * @author Matthieu Bastianelli (Geomatys)
+ * @version 1.1
*
* @see <a href="http://mathworld.wolfram.com/MapProjection.html">Map projections on MathWorld</a>
*
diff --git a/core/sis-referencing/src/main/resources/org/apache/sis/internal/referencing/provider/Descriptions.properties b/core/sis-referencing/src/main/resources/org/apache/sis/internal/referencing/provider/Descriptions.properties
new file mode 100644
index 0000000..374d094
--- /dev/null
+++ b/core/sis-referencing/src/main/resources/org/apache/sis/internal/referencing/provider/Descriptions.properties
@@ -0,0 +1,5 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements;
+# and to You under the Apache License, Version 2.0.
+satellite_orbit_inclination = Angle of inclination between the plane of the Earth's Equator and the plane of the satellite orbit.
+satellite_orbital_period = Time required for revolution of the satellite.
+ascending_node_period = Length of Earth's rotation with respect to the precessed ascending node.
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java b/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
index 8888882..a78648b 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
@@ -36,7 +36,7 @@ import static org.junit.Assert.*;
* Tests {@link Providers} and some consistency rules of all providers defined in this package.
*
* @author Martin Desruisseaux (Geomatys)
- * @version 1.0
+ * @version 1.1
* @since 0.6
* @module
*/
@@ -104,6 +104,7 @@ public final strictfp class ProvidersTest extends TestCase {
ObliqueMercatorTwoPoints.class,
ObliqueMercatorTwoPointsCenter.class,
ZonedTransverseMercator.class,
+ SatelliteTracking.class,
Sinusoidal.class,
Polyconic.class,
Mollweide.class,
@@ -248,4 +249,14 @@ public final strictfp class ProvidersTest extends TestCase {
}
}
}
+
+ /**
+ * Tests the description provided in some parameters.
+ */
+ @Test
+ public void testDescription() {
+ assertFalse(SatelliteTracking.SATELLITE_ORBIT_INCLINATION.getDescription().length() == 0);
+ assertFalse(SatelliteTracking.SATELLITE_ORBITAL_PERIOD .getDescription().length() == 0);
+ assertFalse(SatelliteTracking.ASCENDING_NODE_PERIOD .getDescription().length() == 0);
+ }
}
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTrackingTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTrackingTest.java
index 10ace56..077a12b 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTrackingTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTrackingTest.java
@@ -1,52 +1,49 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.sis.referencing.operation.projection;
-import static java.lang.Math.sin;
import java.util.Collections;
+import org.opengis.util.FactoryException;
+import org.opengis.parameter.ParameterValueGroup;
+import org.opengis.referencing.operation.TransformException;
import org.apache.sis.internal.referencing.Formulas;
import org.apache.sis.internal.referencing.NilReferencingObject;
import org.apache.sis.internal.referencing.provider.SatelliteTracking;
import org.apache.sis.measure.Units;
import org.apache.sis.referencing.datum.DefaultEllipsoid;
import org.apache.sis.referencing.operation.transform.MathTransformFactoryMock;
-import org.apache.sis.test.DependsOn;
+import org.apache.sis.test.DependsOnMethod;
import org.junit.Test;
-import org.opengis.parameter.ParameterValueGroup;
-import org.opengis.referencing.operation.TransformException;
-import org.opengis.util.FactoryException;
+import static java.lang.StrictMath.sin;
import static java.lang.StrictMath.toRadians;
-import org.apache.sis.test.DependsOnMethod;
import static org.junit.Assert.assertTrue;
+
/**
- * Tests coordiantes computed by applying a conic satellite-tracking projection
+ * Tests coordinates computed by applying a conic satellite-tracking projection
* with {@link ConicSatelliteTracking}.
*
- * @author Matthieu Bastianelli (Geomatys)
- * @version 1.0
- * @since 1.0
+ * @author Matthieu Bastianelli (Geomatys)
+ * @version 1.1
+ * @since 1.1
* @module
*/
-public class ConicSatelliteTrackingTest extends MapProjectionTestCase {
-
+public strictfp class ConicSatelliteTrackingTest extends MapProjectionTestCase {
/**
* Creates a new instance of {@link ConicSatelliteTracking} concatenated
* with the (de)normalization matrices. The new instance is stored in the
@@ -63,7 +60,6 @@ public class ConicSatelliteTrackingTest extends MapProjectionTestCase {
* @param φ0 : latitude_of_origin : latitude Crossing the central meridian
* at the desired origin of rectangular coordinates (null or NaN for
* cylindrical satellite tracking projection.)
- * @return
*/
void createProjection(final double i,
final double orbitalT, final double ascendingNodeT,
@@ -80,8 +76,8 @@ public class ConicSatelliteTrackingTest extends MapProjectionTestCase {
values.parameter("semi_major").setValue(sphere.getSemiMajorAxis());
values.parameter("semi_minor").setValue(sphere.getSemiMinorAxis());
values.parameter("satellite_orbit_inclination").setValue(i);
- values.parameter("satellite_orbital_period").setValue(orbitalT);
- values.parameter("ascending_node_period").setValue(ascendingNodeT);
+ values.parameter("satellite_orbital_period").setValue(orbitalT, Units.MINUTE);
+ values.parameter("ascending_node_period").setValue(ascendingNodeT, Units.MINUTE);
values.parameter("central_meridian").setValue(λ0);
values.parameter("standard_parallel_1").setValue(φ1);
@@ -104,8 +100,7 @@ public class ConicSatelliteTrackingTest extends MapProjectionTestCase {
* Test based on the numerical example given by Snyder p. 360 to 363 of
* <cite> Map Projections - A working Manual</cite>
*
- * @throws FactoryException if an error occurred while creating the map
- * projection.
+ * @throws FactoryException if an error occurred while creating the map projection.
* @throws TransformException if an error occurred while projecting a point.
*/
@Test
@@ -142,8 +137,7 @@ public class ConicSatelliteTrackingTest extends MapProjectionTestCase {
* extracting the computed results of the projection. Thus this method
* should be used as a non-regression test.
*
- * @throws FactoryException if an error occurred while creating the map
- * projection.
+ * @throws FactoryException if an error occurred while creating the map projection.
* @throws TransformException if an error occurred while projecting a point.
*/
@Test
@@ -245,7 +239,6 @@ public class ConicSatelliteTrackingTest extends MapProjectionTestCase {
});
}
-
/**
* Tests the derivatives at a few points on a sphere. This method compares the derivatives computed
* by the projection with an estimation of derivatives computed by the finite differences method.
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTrackingTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTrackingTest.java
index 95b6832..5221dcb 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTrackingTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTrackingTest.java
@@ -1,44 +1,41 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.sis.referencing.operation.projection;
-import static java.lang.Double.NaN;
+import org.opengis.util.FactoryException;
+import org.opengis.referencing.operation.TransformException;
import org.apache.sis.internal.referencing.Formulas;
import org.apache.sis.test.DependsOnMethod;
-import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import org.opengis.referencing.operation.TransformException;
-import org.opengis.util.FactoryException;
+
+import static java.lang.Double.NaN;
+import static org.junit.Assert.assertTrue;
+
/**
- * Tests coordiantes computed by applying a cylindrical satellite-tracking projection
+ * Tests coordinates computed by applying a cylindrical satellite-tracking projection
* with {@link CylindricalSatelliteTracking}.
*
- * @author Matthieu Bastianelli (Geomatys)
- * @version 1.0
- * @since 1.0
+ * @author Matthieu Bastianelli (Geomatys)
+ * @version 1.1
+ * @since 1.1
* @module
*/
-public class CylindricalSatelliteTrackingTest extends ConicSatelliteTrackingTest {
-
-
-
+public final strictfp class CylindricalSatelliteTrackingTest extends ConicSatelliteTrackingTest {
/**
* Creates a new instance of {@link ConicSatelliteTracking} concatenated
* with the (de)normalization matrices. The new instance is stored in the
@@ -51,16 +48,14 @@ public class CylindricalSatelliteTrackingTest extends ConicSatelliteTrackingTest
* precessed ascending node.
* @param λ0 : central meridian.
* @param φ1 : first parallel of conformality, with true scale.
- * @param φ2 : second parallel of conformality, without true scale.
- * @param φ0 : latitude_of_origin : latitude Crossing the central meridian
* at the desired origin of rectangular coordinates (null or NaN for
* cylindrical satellite tracking projection.)
- * @return
*/
private void createProjection(final double i,
final double orbitalT, final double ascendingNodeT,
final double λ0, final double φ1)
- throws FactoryException {
+ throws FactoryException
+ {
super.createProjection(i, orbitalT, ascendingNodeT, λ0, φ1, NaN, NaN);
}
@@ -70,8 +65,7 @@ public class CylindricalSatelliteTrackingTest extends ConicSatelliteTrackingTest
* Test based on the numerical example given by Snyder p. 360 to 363 of
* <cite> Map Projections - A working Manual</cite>
*
- * @throws FactoryException if an error occurred while creating the map
- * projection.
+ * @throws FactoryException if an error occurred while creating the map projection.
* @throws TransformException if an error occurred while projecting a point.
*/
@Test
@@ -102,8 +96,7 @@ public class CylindricalSatelliteTrackingTest extends ConicSatelliteTrackingTest
* Satellite-Tracking Projections shown in table 38 from
* <cite> Map Projections - A working Manual</cite>
*
- * @throws FactoryException if an error occurred while creating the map
- * projection.
+ * @throws FactoryException if an error occurred while creating the map projection.
* @throws TransformException if an error occurred while projecting a point.
*/
@Test
@@ -214,8 +207,8 @@ public class CylindricalSatelliteTrackingTest extends ConicSatelliteTrackingTest
* @throws TransformException if an error occurred while projecting a point.
*/
@Test
- @DependsOnMethod("testInverseDerivative")
@Override
+ @DependsOnMethod("testInverseDerivative")
public void testDerivativeOnSphere() throws FactoryException, TransformException {
createProjection(
99.092, //satellite_orbit_inclination
@@ -232,6 +225,4 @@ public class CylindricalSatelliteTrackingTest extends ConicSatelliteTrackingTest
verifyDerivative( -56, 50);
verifyDerivative( -20, 47);
}
-
-
}
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java b/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
index 28156b3..388b5a8 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
@@ -25,7 +25,7 @@ import org.junit.BeforeClass;
* All tests from the {@code sis-referencing} module, in rough dependency order.
*
* @author Martin Desruisseaux (Geomatys)
- * @version 1.0
+ * @version 1.1
* @since 0.3
* @module
*/
diff --git a/ide-project/NetBeans/build.xml b/ide-project/NetBeans/build.xml
index 64a2234..fcaedcf 100644
--- a/ide-project/NetBeans/build.xml
+++ b/ide-project/NetBeans/build.xml
@@ -97,6 +97,7 @@
<include name="**/*.lst"/>
</fileset>
<fileset dir="${project.root}/core/sis-referencing/src/main/resources">
+ <include name="**/*.properties"/>
<include name="**/*.sql"/>
</fileset>
<fileset dir="${project.root}/storage/sis-xmlstore/src/main/resources">