sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] branch geoapi-4.0 updated: Rename "MeridionalDistanceBased" class as "MeridianArcBased" because online dictionaries seem to define "meridional distance" as "the distance or departure from the meridian; the easting or westing", which is not what we mean. EPSG guidance note and Snyder do not use "meridional distance" expression neither for the quantity computed here.
Date Thu, 25 Apr 2019 09:42:34 GMT
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


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new fc71753  Rename "MeridionalDistanceBased" class as "MeridianArcBased" because online
dictionaries seem to define "meridional distance" as "the distance or departure from the meridian;
the easting or westing", which is not what we mean. EPSG guidance note and Snyder do not use
"meridional distance" expression neither for the quantity computed here.
fc71753 is described below

commit fc7175332f1e3f0c376baf3c71e6d56d46a70144
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Thu Apr 25 11:40:15 2019 +0200

    Rename "MeridionalDistanceBased" class as "MeridianArcBased" because online dictionaries
seem to define "meridional distance" as "the distance or departure from the meridian; the
easting or westing", which is not what we mean. EPSG guidance note and Snyder do not use "meridional
distance" expression neither for the quantity computed here.
---
 .../internal/referencing/provider/Sinusoidal.java  |  3 +-
 .../operation/projection/ConformalProjection.java  | 24 +++++++++
 ...nalDistanceBased.java => MeridianArcBased.java} | 62 ++++++++--------------
 .../operation/projection/Sinusoidal.java           |  2 +-
 ...ionalDistanceTest.java => MeridianArcTest.java} | 56 +++++++++----------
 .../operation/projection/SinusoidalTest.java       |  2 +-
 .../sis/test/suite/ReferencingTestSuite.java       |  2 +-
 7 files changed, 78 insertions(+), 73 deletions(-)

diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Sinusoidal.java
b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Sinusoidal.java
index 9590bc7..7c00ea9 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Sinusoidal.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Sinusoidal.java
@@ -28,7 +28,8 @@ import org.apache.sis.referencing.operation.projection.NormalizedProjection;
 
 /**
  * The provider for <cite>"sinusoidal equal-area"</cite> projection.
- * This projection has no associated EPSG code.
+ * This is a pseudo-cylindrical (or "false cylindrical") projection.
+ * This projection method has no associated EPSG code.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java
index e0ed314..3c598bd 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java
@@ -28,6 +28,7 @@ import static java.lang.Math.*;
  * All those projections have in common the property of being <cite>conformal</cite>,
i.e. they preserve
  * angles locally. However we do not put this base class in public API because we do not
(yet) guarantee
  * than all conformal projections will extend this base class.
+ * Note that no projection can be both conformal and equal-area.
  *
  * <p>This base class can been seen as a generalization of <cite>Lambert Conic
Conformal</cite> projection,
  * which includes some other projections like Mercator and Polar Stereographic as special
cases.
@@ -92,6 +93,29 @@ abstract class ConformalProjection extends NormalizedProjection {
      *                = 2⋅sinh²(2θ) + 1</li>
      * </ul>
      *
+     * Snyder 3-34 to 3-39 uses above identities for deriving the following equivalence:
+     *
+     * <pre>
+     *     If:     f(φ) = A⋅sin(2φ) + B⋅sin(4φ) + C⋅sin(6φ) + D⋅sin(8φ)
+     *     Then:   f(φ) = sin(2φ)⋅(A′ + cos(2φ)⋅(B′ + cos(2φ)⋅(C′ + D′⋅cos(2φ))))
+     *     Where:  A′ = A - C
+     *             B′ = 2B - 4D
+     *             C′ = 4C
+     *             D′ = 8D
+     * </pre>
+     *
+     * Similar, but with cosine instead than sin and the addition of a constant:
+     *
+     * <pre>
+     *     If:     f(φ) = A + B⋅cos(2φ) + C⋅cos(4φ) + D⋅cos(6φ) + E⋅cos(8φ)
+     *     Then:   f(φ) = A′ + cos(2φ)⋅(B′ + cos(2φ)⋅(C′ + cos(2φ)⋅(D′
+ E′⋅cos(2φ))))
+     *     Where:  A′ = A - C + E
+     *             B′ = B - 3D
+     *             C′ = 2C - 8E
+     *             D′ = 4D
+     *             E′ = 8E
+     * </pre>
+     *
      * Note that since this boolean is static final, the compiler should exclude the code
in the branch that is never
      * executed (no need to comment-out that code).
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/MeridionalDistanceBased.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/MeridianArcBased.java
similarity index 80%
rename from core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/MeridionalDistanceBased.java
rename to core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/MeridianArcBased.java
index 5024acc..c624aa0 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/MeridionalDistanceBased.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/MeridianArcBased.java
@@ -25,6 +25,7 @@ import static java.lang.Math.*;
 
 /**
  * Base class of map projections based on distance along the meridian from equator to latitude
φ.
+ * Except for some cases like "Sinusoidal equal area", those projections are neither conformal
nor equal-area.
  *
  * @author  Martin Desruisseaux (MPO, IRD, Geomatys)
  * @author  Rémi Maréchal (Geomatys)
@@ -35,39 +36,16 @@ import static java.lang.Math.*;
  * @since 1.0
  * @module
  */
-abstract class MeridionalDistanceBased extends NormalizedProjection {
+abstract class MeridianArcBased extends NormalizedProjection {
     /**
-     * {@code false} for using the original formulas as published by EPSG, or {@code true}
for using formulas
-     * modified using trigonometric identities. Use of trigonometric identities reduces the
amount of calls to
-     * {@link Math#sin(double)} and similar methods. Snyder 3-34 to 3-39 give the following
identities:
-     *
-     * <pre>
-     *     If:     f(φ) = A⋅sin(2φ) + B⋅sin(4φ) + C⋅sin(6φ) + D⋅sin(8φ)
-     *     Then:   f(φ) = sin(2φ)⋅(A′ + cos(2φ)⋅(B′ + cos(2φ)⋅(C′ + D′⋅cos(2φ))))
-     *     Where:  A′ = A - C
-     *             B′ = 2B - 4D
-     *             C′ = 4C
-     *             D′ = 8D
-     * </pre>
-     *
-     * Similar, but with cosine instead than sin and the addition of a constant:
-     *
-     * <pre>
-     *     If:     f(φ) = A + B⋅cos(2φ) + C⋅cos(4φ) + D⋅cos(6φ) + E⋅cos(8φ)
-     *     Then:   f(φ) = A′ + cos(2φ)⋅(B′ + cos(2φ)⋅(C′ + cos(2φ)⋅(D′
+ E′⋅cos(2φ))))
-     *     Where:  A′ = A - C + E
-     *             B′ = B - 3D
-     *             C′ = 2C - 8E
-     *             D′ = 4D
-     *             E′ = 8E
-     * </pre>
+     * For cross-version compatibility.
      */
-    private static final boolean ALLOW_TRIGONOMETRIC_IDENTITIES = true;
+    private static final long serialVersionUID = -1390453290591193455L;
 
     /**
-     * Coefficients for the formula implemented by the {@link #meridianArc(double, double,
double)} method.
+     * Coefficients for the formula implemented by the {@link #distance(double, double, double)}
method.
      * Values are computed by {@link #computeCoefficients(double)} in constructor or after
deserialization.
-     * The values depends on the form of equation implemented by {@code meridianArc(…)}.
We do not use the
+     * The values depends on the form of equation implemented by {@code distance(…)}. We
do not use the
      * form commonly found in publications since a few algebraic operations allow to replace
the
      * sin(2φ), sin(4φ), sin(6φ) and sin(8φ) terms by only sin²(φ), which is faster
to calculate.
      * See {@link #computeCoefficients(double)} comments in method body for more information.
@@ -88,7 +66,7 @@ abstract class MeridionalDistanceBased extends NormalizedProjection {
     /**
      * Creates a new normalized projection from the parameters computed by the given initializer.
      */
-    MeridionalDistanceBased(final Initializer initializer) {
+    MeridianArcBased(final Initializer initializer) {
         super(initializer);
         DoubleDouble e1 = initializer.axisLengthRatio();
         e1.ratio_1m_1p();
@@ -98,7 +76,7 @@ abstract class MeridionalDistanceBased extends NormalizedProjection {
     /**
      * Creates a new projection initialized to the same parameters than the given one.
      */
-    MeridionalDistanceBased(final MeridionalDistanceBased other) {
+    MeridianArcBased(final MeridianArcBased other) {
         super(other);
         c0  = other.c0;
         c1  = other.c1;
@@ -123,7 +101,7 @@ abstract class MeridionalDistanceBased extends NormalizedProjection {
 
     /**
      * Computes the coefficients in the series expansions from the {@link #eccentricitySquared}
value.
-     * This method shall be invoked after {@code MeridionalDistanceBased} construction or
deserialization.
+     * This method shall be invoked after {@code MeridianArcBased} construction or deserialization.
      *
      * @param  ei  value of  [1 - √(1 - ℯ²)] / [1 + √(1 - ℯ²)]   (Snyder 3-24).
      */
@@ -148,7 +126,7 @@ abstract class MeridionalDistanceBased extends NormalizedProjection {
          *   Kawase, Kazushige (2011). A General Formula for Calculating Meridian Arc Length
and its Application to Coordinate
          *   Conversion in the Gauss-Krüger Projection. Bulletin of the Geospatial Information
Authority of Japan, Vol.59.
          *
-         * That more accurate formula is implemented in MeridionalDistanceTest for comparison
purposes.
+         * That more accurate formula is implemented in MeridianArcTest for comparison purposes.
          * Then we transform that formula as below:
          *
          *    1) Multiply by b²/a = (1 - ℯ²). This is done by combining some terms. For
example (1 - ℯ²)⋅(1 + ¾ℯ²) =
@@ -209,26 +187,29 @@ abstract class MeridionalDistanceBased extends NormalizedProjection
{
     }
 
     /**
-     * Computes the meridional distance (M) from equator to a given latitude φ.
+     * Computes the distance (M) along meridian arc from equator to a given latitude φ.
      * Special cases:
+     *
      * <ul>
      *   <li>If φ is 0°, then this method returns 0.</li>
      *   <li>If φ=+π/2, then this method returns a value slightly smaller than +π/2,
depending on the eccentricity.</li>
      *   <li>If φ=-π/2, then this method returns a value slightly greater than -π/2,
depending on the eccentricity.</li>
      * </ul>
      *
-     * @param  φ     latitude for which to compute the meridional distance, in radians.
+     * This value is related to <cite>rectifying latitude</cite> by µ = (π/2)⋅(M/{@linkplain
#c0}) (derived from Snyder 3-20).
+     *
+     * @param  φ     latitude for which to compute the distance, in radians.
      * @param  sinφ  value of sin(φ).
      * @param  cosφ  value of cos(φ).
-     * @return meridional distance for the given latitude on an ellipsoid of semi-major axis
of 1.
+     * @return distance for the given latitude on an ellipsoid of semi-major axis of 1.
      */
-    final double meridianArc(final double φ, final double sinφ, final double cosφ) {
+    final double distance(final double φ, final double sinφ, final double cosφ) {
         final double sinφ2 = sinφ * sinφ;
         return c0*φ + cosφ*sinφ*(c1 + sinφ2*(c2 + sinφ2*(c3 + sinφ2*c4)));     // TODO:
use Math.fma with JDK9.
     }
 
     /**
-     * Gets the derivative of this {@link #meridianArc(double, double, double)} method.
+     * Gets the derivative of this {@link #distance(double, double, double)} method.
      *
      * @return the derivative at the specified latitude.
      */
@@ -254,10 +235,9 @@ abstract class MeridionalDistanceBased extends NormalizedProjection {
         φ += sinφ*cosφ*(ci1 + sinφ2*(ci2 + sinφ2*(ci3 + sinφ2*ci4)));             
     // Snyder 3-26.
         /*
          * We could improve accuracy by continuing from here with Newton's iterative method
-         * (see MeridionalDistanceTest.inverse(…) for implementation).  However that method
-         * requires calls to meridianArc(double, …), which is itself an approximation based
-         * on series expansion. Consequently the accuracy of iterative method can not be
-         * better than `meridianArc(…)` accuracy.
+         * (see MeridianArcTest.inverse(…) for implementation). However those iterations
requires
+         * calls to distance(double, …), which is itself an approximation based on series
expansion.
+         * Consequently the accuracy of iterative method can not be better than distance(…)
accuracy.
          */
         return φ;
     }
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Sinusoidal.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Sinusoidal.java
index 64b5fac..dd22af5 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Sinusoidal.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Sinusoidal.java
@@ -42,7 +42,7 @@ import static org.apache.sis.internal.referencing.provider.Sinusoidal.*;
  * @since   1.0
  * @module
  */
-public class Sinusoidal extends MeridionalDistanceBased {
+public class Sinusoidal extends MeridianArcBased {
     /**
      * For cross-version compatibility.
      */
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MeridionalDistanceTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MeridianArcTest.java
similarity index 79%
rename from core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MeridionalDistanceTest.java
rename to core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MeridianArcTest.java
index 993bfda..164d093 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MeridionalDistanceTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MeridianArcTest.java
@@ -32,7 +32,7 @@ import static org.junit.Assert.assertEquals;
 
 
 /**
- * Tests the meridional distances computed by {@link MeridionalDistanceBased}.
+ * Tests the distances along meridian arc computed by {@link MeridianArcBased}.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
@@ -40,7 +40,7 @@ import static org.junit.Assert.assertEquals;
  * @module
  */
 @DependsOn(NormalizedProjectionTest.class)
-public final strictfp class MeridionalDistanceTest extends MapProjectionTestCase {
+public final strictfp class MeridianArcTest extends MapProjectionTestCase {
     /**
      * Threshold for comparison of floating point values.
      */
@@ -52,7 +52,7 @@ public final strictfp class MeridionalDistanceTest extends MapProjectionTestCase
      * @param  ellipsoidal   {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
      * @return a test instance of the projection.
      */
-    private MeridionalDistanceBased create(final boolean ellipsoidal) {
+    private MeridianArcBased create(final boolean ellipsoidal) {
         final DefaultOperationMethod provider = new org.apache.sis.internal.referencing.provider.Sinusoidal();
         final Sinusoidal projection = new Sinusoidal(provider, parameters(provider, ellipsoidal));
         tolerance = NormalizedProjection.ANGULAR_TOLERANCE;     // = linear tolerance on
a sphere of radius 1.
@@ -60,7 +60,7 @@ public final strictfp class MeridionalDistanceTest extends MapProjectionTestCase
     }
 
     /**
-     * Computes the meridional distance using equation given in EPSG guidance notes, which
is also from Snyder book.
+     * Computes the distance on meridian using equation given in EPSG guidance notes, which
is also from Snyder book.
      * The equation is given in Snyder 3-21. We use this equation as a reference for testing
validity of other forms.
      * The equation is:
      *
@@ -73,9 +73,9 @@ public final strictfp class MeridionalDistanceTest extends MapProjectionTestCase
      * }
      *
      * @param  φ  latitude in radians.
-     * @return meridional distance from equator to the given latitude on an ellipsoid with
semi-major axis of 1.
+     * @return distance on meridian from equator to the given latitude on an ellipsoid with
semi-major axis of 1.
      */
-    private static double reference(final MeridionalDistanceBased projection, final double
φ) {
+    private static double reference(final MeridianArcBased projection, final double φ) {
         final double e2 = projection.eccentricitySquared;
         final double e4 = e2*e2;
         final double e6 = e2*e4;
@@ -91,8 +91,8 @@ public final strictfp class MeridionalDistanceTest extends MapProjectionTestCase
 
     /**
      * Series expansion with more terms. We use this formulas as a reference for testing
accuracy of the formula
-     * implemented by {@link MeridionalDistanceBased#meridianArc(double, double, double)}
after making sure that
-     * this value is in agreement with {@link #reference(MeridionalDistanceBased, double)}.
+     * implemented by {@link MeridianArcBased#distance(double, double, double)} after making
sure that this value
+     * is in agreement with {@link #reference(MeridianArcBased, double)}.
      *
      * <p>References:</p>
      * <ul>
@@ -103,7 +103,7 @@ public final strictfp class MeridionalDistanceTest extends MapProjectionTestCase
      *       on Wikipedia.</li>
      * </ul>
      */
-    private static double referenceMoreAccurate(final MeridionalDistanceBased projection,
final double φ) {
+    private static double referenceMoreAccurate(final MeridianArcBased projection, final
double φ) {
         final double e2  = projection.eccentricitySquared;
         final double e4  = e2*e2;
         final double e6  = e2*e4;
@@ -120,15 +120,15 @@ public final strictfp class MeridionalDistanceTest extends MapProjectionTestCase
     }
 
     /**
-     * Computes the latitude of given meridional distance using Newton's method. This method
is described in
+     * Computes the latitude of a given distance along meridian arc using Newton's method.
This method is described in
      * <a href="https://en.wikipedia.org/wiki/Meridian_arc#The_inverse_meridian_problem_for_the_ellipsoid">Wikipedia</a>.
      * This method depends on the forward method and can not be more accurate than that method.
For testing purposes, we
      * use the {@linkplain #referenceMoreAccurate must accurate method implemented in this
class} regardless performance.
      *
-     * @param  m  the meridional distance on ellipsoidal of semi-major axis length of 1.
-     * @return latitude for the given meridional distance, in radians.
+     * @param  m  the distance on ellipsoid of semi-major axis length of 1.
+     * @return latitude for the given distance on meridian arc, in radians.
      */
-    private static double inverse(final MeridionalDistanceBased projection, final double
m) throws TransformException {
+    private static double inverse(final MeridianArcBased projection, final double m) throws
TransformException {
         final double ITERATION_TOLERANCE = 1E-13;               // Should be less than `referenceMoreAccurate`
accuracy.
         final double e2 = projection.eccentricitySquared;
         int i = NormalizedProjection.MAXIMUM_ITERATIONS;
@@ -157,48 +157,48 @@ public final strictfp class MeridionalDistanceTest extends MapProjectionTestCase
     }
 
     /**
-     * Compares {@link MeridionalDistanceBased#meridianArc(double, double, double)} with
formulas taken as references.
+     * Compares {@link MeridianArcBased#distance(double, double, double)} with formulas taken
as references.
      */
     @Test
     public void compareWithReference() {
-        final MeridionalDistanceBased projection = create(true);
+        final MeridianArcBased projection = create(true);
         final Random random = TestUtilities.createRandomNumberGenerator();
         for (int i=0; i<100; i++) {
             final double φ = random.nextDouble() * PI - PI/2;
             final double reference = reference(projection, φ);
             final double accurate  = referenceMoreAccurate(projection, φ);
-            final double actual    = projection.meridianArc(φ, sin(φ), cos(φ));
+            final double actual    = projection.distance(φ, sin(φ), cos(φ));
             assertEquals("Accurate formula disagrees with reference.", reference, accurate,
2E-10);
             assertEquals("Implementation disagrees with our formula.", accurate,  actual,
  1E-13);
         }
     }
 
     /**
-     * Compares {@link MeridionalDistanceBased#meridianArc(double, double, double)} with
spherical formula.
-     * In the spherical case, {@code meridianArc(φ)} should be equal to φ.
+     * Compares {@link MeridianArcBased#distance(double, double, double)} with spherical
formula.
+     * In the spherical case, {@code distance(φ)} should be equal to φ.
      */
     @Test
     public void compareWithSphere() {
-        final MeridionalDistanceBased projection = create(false);
+        final MeridianArcBased projection = create(false);
         assertEquals("Expected spherical projection.", 0, projection.eccentricity, STRICT);
         final Random random = TestUtilities.createRandomNumberGenerator();
         for (int i=0; i<20; i++) {
             final double φ = random.nextDouble() * PI - PI/2;
-            assertEquals("When excentricity=0, meridianArc(φ, sinφ, cosφ) simplify to
φ.",
-                    φ, projection.meridianArc(φ, sin(φ), cos(φ)), 1E-15);
+            assertEquals("When excentricity=0, distance(φ, sinφ, cosφ) simplify to φ.",
+                    φ, projection.distance(φ, sin(φ), cos(φ)), 1E-15);
         }
     }
 
     /**
-     * Compares {@link MeridionalDistanceBased#latitude(double)} with iterative approach.
-     * On WGS 84 ellipsoid, the meridional distance <var>M</var> is between ±π/2
× 0.9983243 approximately.
+     * Compares {@link MeridianArcBased#latitude(double)} with iterative approach.
+     * On WGS 84 ellipsoid, the distance <var>M</var> is between ±π/2 × 0.9983243
approximately.
      *
      * @throws TransformException if the iterative method does not converge.
      */
     @Test
     @DependsOnMethod("compareWithReference")
     public void compareInverse() throws TransformException {
-        final MeridionalDistanceBased projection = create(true);
+        final MeridianArcBased projection = create(true);
         final Random random = TestUtilities.createRandomNumberGenerator();
         for (int i=0; i<50; i++) {
             final double m = random.nextDouble() * (PI * 0.998) - (PI/2) * 0.998;
@@ -209,7 +209,7 @@ public final strictfp class MeridionalDistanceTest extends MapProjectionTestCase
     }
 
     /**
-     * Tests all methods, including {@link MeridionalDistanceBased#dM_dφ(double)}, on a
sphere.
+     * Tests all methods, including {@link MeridianArcBased#dM_dφ(double)}, on a sphere.
      *
      * @throws TransformException if an iteration does not converge.
      */
@@ -220,7 +220,7 @@ public final strictfp class MeridionalDistanceTest extends MapProjectionTestCase
     }
 
     /**
-     * Tests all methods, including {@link MeridionalDistanceBased#dM_dφ(double)}, on an
ellipsoid.
+     * Tests all methods, including {@link MeridianArcBased#dM_dφ(double)}, on an ellipsoid.
      *
      * @throws TransformException if an iteration does not converge.
      */
@@ -234,11 +234,11 @@ public final strictfp class MeridionalDistanceTest extends MapProjectionTestCase
      * Verifies transform, inverse transform and derivative in the [-90 … 90]° latitude
range.
      */
     private void verifyInDomain(final boolean ellipsoidal, final int numCoordinates) throws
TransformException {
-        final MeridionalDistanceBased projection = create(ellipsoidal);
+        final MeridianArcBased projection = create(ellipsoidal);
         derivativeDeltas = new double[] {toRadians(0.01)};
         transform = new AbstractMathTransform1D() {
             @Override public double transform (final double φ) {
-                return projection.meridianArc(φ, sin(φ), cos(φ));
+                return projection.distance(φ, sin(φ), cos(φ));
             }
             @Override public double derivative(final double φ) {
                 final double sinφ = sin(φ);
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/SinusoidalTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/SinusoidalTest.java
index a51ebcb..ae0f141 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/SinusoidalTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/SinusoidalTest.java
@@ -34,7 +34,7 @@ import static org.junit.Assert.*;
  * @since   1.0
  * @module
  */
-@DependsOn(MeridionalDistanceTest.class)
+@DependsOn(MeridianArcTest.class)
 public final strictfp class SinusoidalTest extends MapProjectionTestCase {
     /**
      * Creates a new instance of {@link Sinusoidal} concatenated with the (de)normalization
matrices.
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 e72ed1f..43e533b 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
@@ -175,7 +175,7 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.operation.projection.ObliqueMercatorTest.class,
     org.apache.sis.referencing.operation.projection.CylindricalEqualAreaTest.class,
     org.apache.sis.referencing.operation.projection.AlbersEqualAreaTest.class,
-    org.apache.sis.referencing.operation.projection.MeridionalDistanceTest.class,
+    org.apache.sis.referencing.operation.projection.MeridianArcTest.class,
     org.apache.sis.referencing.operation.projection.SinusoidalTest.class,
     org.apache.sis.referencing.operation.projection.MollweideTest.class,
 


Mime
View raw message