sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1809154 - in /sis/branches/JDK8/core/sis-referencing/src: main/java/org/apache/sis/referencing/operation/projection/ test/java/org/apache/sis/referencing/operation/projection/
Date Thu, 21 Sep 2017 12:31:35 GMT
Author: desruisseaux
Date: Thu Sep 21 12:31:35 2017
New Revision: 1809154

URL: http://svn.apache.org/viewvc?rev=1809154&view=rev
Log:
Fix name spelling error: Synder -> Snyder.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java?rev=1809154&r1=1809153&r2=1809154&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java
[UTF-8] Thu Sep 21 12:31:35 2017
@@ -63,11 +63,11 @@ public class AlbersEqualArea extends Equ
      *
      * <p>In Apache SIS implementation, we use modified formulas in which the (1 -
ℯ²) factor is omitted in
      * {@link #qm(double)} calculation. Consequently what we get is a modified value <var>nm</var>
which is
-     * related to Synder's <var>n</var> value by {@literal n = nm / (1 - ℯ²)}.
 The omitted (1 - ℯ²) factor
+     * related to Snyder's <var>n</var> value by {@literal n = nm / (1 - ℯ²)}.
 The omitted (1 - ℯ²) factor
      * is either taken in account by the (de)normalization matrix, or cancels with other
(1 - ℯ²) factors
      * when we develop the formulas.</p>
      *
-     * <p>Note that in the spherical case, <var>nm</var> = Synder's <var>n</var>.</p>
+     * <p>Note that in the spherical case, <var>nm</var> = Snyder's <var>n</var>.</p>
      */
     final double nm;
 
@@ -136,7 +136,7 @@ public class AlbersEqualArea extends Equ
         }
         C = m1*m1 + nm*α1;                  // Omitted (1-ℯ²) term in nm cancels with
omitted (1-ℯ²) term in α₁.
         /*
-         * Compute rn = (1-ℯ²)/nm, which is the reciprocal of the "real" n used in Synder
and EPSG guidance note.
+         * Compute rn = (1-ℯ²)/nm, which is the reciprocal of the "real" n used in Snyder
and EPSG guidance note.
          * We opportunistically use double-double arithmetic since the MatrixSIS operations
use them anyway, but
          * we do not really have that accuracy because of the limited precision of 'nm'.
The intend is rather to
          * increase the chances term cancellations happen during concatenation of coordinate
operations.
@@ -260,14 +260,14 @@ public class AlbersEqualArea extends Equ
         final double x = srcPts[srcOff  ];
         final double y = srcPts[srcOff+1];
         /*
-         * Note: Synder suggests to reverse the sign of x, y and ρ₀ if n is negative.
It should not done in Apache SIS
+         * Note: Snyder suggests to reverse the sign of x, y and ρ₀ if n is negative.
It should not done in Apache SIS
          * implementation because (x,y) are premultiplied by n (by the normalization affine
transform) before to enter
          * in this method, so if n was negative those values have already their sign reverted.
          */
         dstPts[dstOff  ] = atan2(x, y);
         dstPts[dstOff+1] = φ((C - (x*x + y*y)) / nm);
         /*
-         * Note: Synder 14-19 gives  q = (C - ρ²n²/a²)/n  where  ρ = √(x² + (ρ₀
- y)²).
+         * Note: Snyder 14-19 gives  q = (C - ρ²n²/a²)/n  where  ρ = √(x² + (ρ₀
- y)²).
          * But in Apache SIS implementation, ρ₀ has already been subtracted by the matrix
before we reach this point.
          * So we can simplify by ρ² = x² + y². Furthermore the matrix also divided x
and y by a (the semi-major axis
          * length) before this method, and multiplied by n. so what we have is actually (ρ⋅n/a)²
= x² + y².
@@ -318,10 +318,10 @@ public class AlbersEqualArea extends Equ
             final double cosθ = cos(θ);
             final double sinθ = sin(θ);
             final double sinφ = sin(φ);
-            final double ρ = sqrt(C - 2*nm*sinφ);           // Synder 14-3 with radius
and division by n omitted.
+            final double ρ = sqrt(C - 2*nm*sinφ);           // Snyder 14-3 with radius
and division by n omitted.
             if (dstPts != null) {
-                dstPts[dstOff  ] = ρ * sinθ;                // Synder 14-1
-                dstPts[dstOff+1] = ρ * cosθ;                // Synder 14-2
+                dstPts[dstOff  ] = ρ * sinθ;                // Snyder 14-1
+                dstPts[dstOff+1] = ρ * cosθ;                // Snyder 14-2
             }
             if (!derivate) {
                 return null;
@@ -341,8 +341,8 @@ public class AlbersEqualArea extends Equ
         {
             final double x = srcPts[srcOff];
             final double y = srcPts[srcOff + 1];
-            dstPts[dstOff  ] = atan2(x, y);                         // Part of Synder 14-11
-            dstPts[dstOff+1] = asin((C - (x*x + y*y)) / (nm*2));    // Synder 14-8 modified
+            dstPts[dstOff  ] = atan2(x, y);                         // Part of Snyder 14-11
+            dstPts[dstOff+1] = asin((C - (x*x + y*y)) / (nm*2));    // Snyder 14-8 modified
         }
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java?rev=1809154&r1=1809153&r2=1809154&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
[UTF-8] Thu Sep 21 12:31:35 2017
@@ -248,7 +248,7 @@ public class CylindricalEqualArea extend
             dstOff--;
             while (--numPts >= 0) {
                 final double φ = dstPts[dstOff += DIMENSION];           // Same as srcPts[srcOff
+ 1].
-                dstPts[dstOff] = qm_ellipsoid(sin(φ));                  // Part of Synder
equation (10-15)
+                dstPts[dstOff] = qm_ellipsoid(sin(φ));                  // Part of Snyder
equation (10-15)
             }
         }
     }
@@ -268,7 +268,7 @@ public class CylindricalEqualArea extend
         dstPts[dstOff  ] = srcPts[srcOff  ];            // Must be before writing y.
         dstPts[dstOff+1] = φ(y);
         /*
-         * Equation 10-26 of Synder gives β = asin(2y⋅k₀/(a⋅qPolar)).
+         * Equation 10-26 of Snyder gives β = asin(2y⋅k₀/(a⋅qPolar)).
          * In our case it simplifies to sinβ = (y/qmPolar) because:
          *
          *   - y is already multiplied by 2k₀/a because of the denormalization matrix

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java?rev=1809154&r1=1809153&r2=1809154&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java
[UTF-8] Thu Sep 21 12:31:35 2017
@@ -39,7 +39,7 @@ abstract class EqualAreaProjection exten
     private static final long serialVersionUID = -6175270149094989517L;
 
     /**
-     * {@code false} for using the original formulas as published by Synder, or {@code true}
for using formulas
+     * {@code false} for using the original formulas as published by Snyder, or {@code true}
for using formulas
      * modified using trigonometric identities. The use of trigonometric identities is for
reducing the amount
      * of calls to the {@link Math#sin(double)} and similar methods. Some identities used
are:
      *
@@ -193,7 +193,7 @@ abstract class EqualAreaProjection exten
     }
 
     /**
-     * Computes the latitude using equation 3-18 from Synder, followed by iterative resolution
of Synder 3-16.
+     * Computes the latitude using equation 3-18 from Snyder, followed by iterative resolution
of Snyder 3-16.
      * In theory, the series expansion given by equation 3-18 (φ ≈ c₂⋅sin(2β) + c₄⋅sin(4β)
+ c₈⋅sin(8β)) should
      * be used in replacement of the iterative method. However in practice the series expansion
seems to not
      * have a sufficient amount of terms for achieving the centimetric precision, so we "finish"
it by the
@@ -210,7 +210,7 @@ abstract class EqualAreaProjection exten
             φ = ci8 * sin(8*β)
               + ci4 * sin(4*β)
               + ci2 * sin(2*β)
-              + β;                                                                  // Synder
3-18
+              + β;                                                                  // Snyder
3-18
         } else {
             /*
              * Same formula than above, but rewriten using trigonometric identities in order
to avoid
@@ -233,11 +233,11 @@ abstract class EqualAreaProjection exten
          * Use the iterative method for reaching the last part of missing accuracy. Usually
this loop
          * will perform exactly one iteration, no more, because φ is already quite close
to the result.
          *
-         * Mathematical note: Synder 3-16 gives q/(1-ℯ²) instead of y in the calculation
of Δφ below.
-         * For Cylindrical Equal Area projection, Synder 10-17 gives  q = (qPolar⋅sinβ),
which simplifies
+         * Mathematical note: Snyder 3-16 gives q/(1-ℯ²) instead of y in the calculation
of Δφ below.
+         * For Cylindrical Equal Area projection, Snyder 10-17 gives  q = (qPolar⋅sinβ),
which simplifies
          * as y.
          *
-         * For Albers Equal Area projection, Synder 14-19 gives  q = (C - ρ²n²/a²)/n,
 which we rewrite
+         * For Albers Equal Area projection, Snyder 14-19 gives  q = (C - ρ²n²/a²)/n,
 which we rewrite
          * as  q = (C - ρ²)/n  (see comment in AlbersEqualArea.inverseTransform(…) for
the mathematic).
          * The y value given to this method is y = (C - ρ²) / (n⋅(1-ℯ²)) = q/(1-ℯ²),
the desired value.
          */
@@ -253,7 +253,7 @@ abstract class EqualAreaProjection exten
             }
         }
         /*
-         * In the Albers Equal Area discussion, Synder said that above algorithm does not
converge if
+         * In the Albers Equal Area discussion, Snyder said that above algorithm does not
converge if
          *
          *   q = ±(1 - (1-ℯ²)/(2ℯ) ⋅ ln((1-ℯ)/(1+ℯ)))
          *
@@ -265,9 +265,9 @@ abstract class EqualAreaProjection exten
          *
          *   y  =  ±(1/(1-ℯ²) + atanh(ℯ)/ℯ)  =  ±qmPolar
          *
-         * which implies  sinβ = ±1. This is consistent with Synder discussion of Cylndrical
Equal Area
+         * which implies  sinβ = ±1. This is consistent with Snyder discussion of Cylndrical
Equal Area
          * projection, where he said exactly that about the same formula (that it does not
converge for
-         * β = ±90°). In both case, Synder said that the result is φ = β, with the same
sign.
+         * β = ±90°). In both case, Snyder said that the result is φ = β, with the same
sign.
          */
         final double as = abs(sinβ);
         if (abs(as - 1) < ANGULAR_TOLERANCE) {

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java?rev=1809154&r1=1809153&r2=1809154&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
[UTF-8] Thu Sep 21 12:31:35 2017
@@ -410,7 +410,7 @@ public class ObliqueStereographic extend
              * Formulas below are the same than the elliptical formulas after the geodetic
coordinates
              * have been converted to conformal coordinates.  In this spherical case we do
not need to
              * perform such conversion. Instead we have directly   χ = φ  and  Λ = λ.
  The simplified
-             * EPSG formulas then become the same than Synder formulas for the spherical
case.
+             * EPSG formulas then become the same than Snyder formulas for the spherical
case.
              */
             final double sinφ      = sin(φ);
             final double cosφ      = cos(φ);
@@ -419,10 +419,10 @@ public class ObliqueStereographic extend
             final double sinφsinφ0 = sinφ * sinχ0;
             final double cosφcosφ0 = cosφ * cosχ0;
             final double cosφsinλ  = cosφ * sinλ;
-            final double B = 1 + sinφsinφ0 + cosφcosφ0*cosλ;                    // Synder
21-4
+            final double B = 1 + sinφsinφ0 + cosφcosφ0*cosλ;                    // Snyder
21-4
             if (dstPts != null) {
-                dstPts[dstOff  ] = cosφsinλ / B;                                // Synder
21-2
-                dstPts[dstOff+1] = (sinφ*cosχ0 - cosφ*sinχ0*cosλ) / B;          // Synder
21-3
+                dstPts[dstOff  ] = cosφsinλ / B;                                // Snyder
21-2
+                dstPts[dstOff+1] = (sinφ*cosχ0 - cosφ*sinχ0*cosλ) / B;          // Snyder
21-3
             }
             if (!derivate) {
                 return null;

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java?rev=1809154&r1=1809153&r2=1809154&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java
[UTF-8] Thu Sep 21 12:31:35 2017
@@ -197,7 +197,7 @@ public class PolarStereographic extends
         if (abs(φ1 + PI/2) < ANGULAR_TOLERANCE) {
             /*
              * Polar Stereographic (variant A)
-             * True scale at pole (part of Synder 21-33). From EPSG guide (April 2015) §1.3.7.2:
+             * True scale at pole (part of Snyder 21-33). From EPSG guide (April 2015) §1.3.7.2:
              *
              *    ρ = 2⋅a⋅k₀⋅t / √[(1+ℯ)^(1+ℯ) ⋅ (1–ℯ)^(1–ℯ)]
              *
@@ -212,7 +212,7 @@ public class PolarStereographic extends
         } else {
             /*
              * Polar Stereographic (variant B or C)
-             * Derived from Synder 21-32 and 21-33. From EPSG guide (April 2015) §1.3.7.2:
+             * Derived from Snyder 21-32 and 21-33. From EPSG guide (April 2015) §1.3.7.2:
              *
              *   tF = tan(π/4 + φ1/2) / {[(1 + ℯ⋅sinφ1) / (1 – ℯ⋅sinφ1)]^(ℯ/2)}
              *   mF = cosφ1 / √[1 – ℯ²⋅sin²φ1]
@@ -225,7 +225,7 @@ public class PolarStereographic extends
              *   ρ  = mF / tF
              *   k₀ = ρ⋅√[…]/2  but we do not need that value.
              *
-             * In the spherical case, should give ρ = 1 + sinφ1   (Synder 21-7 and 21-11).
+             * In the spherical case, should give ρ = 1 + sinφ1   (Snyder 21-7 and 21-11).
              */
             final double sinφ1 = sin(φ1);
             final double mF = initializer.scaleAtφ(sinφ1, cos(φ1));
@@ -378,8 +378,8 @@ public class PolarStereographic extends
             final double sinθ = sin(θ);
             final double cosθ = cos(θ);
             final double t    = tan(PI/4 + 0.5*φ);
-            final double x    = t * sinθ;               // Synder 21-5
-            final double y    = t * cosθ;               // Synder 21-6
+            final double x    = t * sinθ;               // Snyder 21-5
+            final double y    = t * cosθ;               // Snyder 21-6
             if (dstPts != null) {
                 dstPts[dstOff  ] = x;
                 dstPts[dstOff+1] = y;

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java?rev=1809154&r1=1809153&r2=1809154&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java
[UTF-8] Thu Sep 21 12:31:35 2017
@@ -62,12 +62,12 @@ public final strictfp class AlbersEqualA
     @Test
     public void testSphere() throws FactoryException, TransformException {
         createCompleteProjection(new org.apache.sis.internal.referencing.provider.AlbersEqualArea(),
-                6370997,    // Semi-major axis from Synder table 15
+                6370997,    // Semi-major axis from Snyder table 15
                 6370997,    // Semi-minor axis
                 0,          // Central meridian
                 0,          // Latitude of origin
-                29.5,       // Standard parallel 1 (from Synder table 15)
-                45.5,       // Standard parallel 2 (from Synder table 15)
+                29.5,       // Standard parallel 1 (from Snyder table 15)
+                45.5,       // Standard parallel 2 (from Snyder table 15)
                 NaN,        // Scale factor (none)
                 0,          // False easting
                 0);         // False northing
@@ -78,10 +78,10 @@ public final strictfp class AlbersEqualA
         tolerance = Formulas.LINEAR_TOLERANCE;
         final AlbersEqualArea kernel = (AlbersEqualArea) getKernel();
         assertTrue("isSpherical", isSpherical(kernel));
-        assertEquals("n", 0.6028370, kernel.nm, 0.5E-7);                    // Expected 'n'
value from Synder table 15.
+        assertEquals("n", 0.6028370, kernel.nm, 0.5E-7);                    // Expected 'n'
value from Snyder table 15.
         /*
          * When stepping into the AlbersEqualArea.Sphere.transform(…) method with a debugger,
the
-         * expected value of 6370997*ρ/n is 6910941 (value taken from ρ column in Synder
table 15).
+         * expected value of 6370997*ρ/n is 6910941 (value taken from ρ column in Snyder
table 15).
          */
         verifyTransform(new double[] {0, 50}, new double[] {0, 5373933.180});
         /*
@@ -111,12 +111,12 @@ public final strictfp class AlbersEqualA
     @DependsOnMethod("testSphere")
     public void testEllipse() throws FactoryException, TransformException {
         createCompleteProjection(new org.apache.sis.internal.referencing.provider.AlbersEqualArea(),
-                6378206.4,  // Semi-major axis from Synder table 15
+                6378206.4,  // Semi-major axis from Snyder table 15
                 6356583.8,  // Semi-minor axis
                 0,          // Central meridian
                 0,          // Latitude of origin
-                29.5,       // Standard parallel 1 (from Synder table 15)
-                45.5,       // Standard parallel 2 (from Synder table 15)
+                29.5,       // Standard parallel 1 (from Snyder table 15)
+                45.5,       // Standard parallel 2 (from Snyder table 15)
                 NaN,        // Scale factor (none)
                 0,          // False easting
                 0);         // False northing
@@ -128,13 +128,13 @@ public final strictfp class AlbersEqualA
         final AlbersEqualArea kernel = (AlbersEqualArea) getKernel();
         assertFalse("isSpherical", isSpherical(kernel));
         /*
-         * Expected 'n' value from Synder table 15. The division by (1-ℯ²) is because
Apache SIS omits this factor
+         * Expected 'n' value from Snyder table 15. The division by (1-ℯ²) is because
Apache SIS omits this factor
          * in its calculation of n (we rather take it in account in (de)normalization matrices
and elsewhere).
          */
         assertEquals("n", 0.6029035, kernel.nm / (1 - kernel.eccentricitySquared), 0.5E-7);
         /*
          * When stepping into the AlbersEqualArea.Sphere.transform(…) method with a debugger,
the expected
-         * value of 6378206.4*ρ/(nm/(1-ℯ²)) is 6931335 (value taken from ρ column in
Synder table 15).
+         * value of 6378206.4*ρ/(nm/(1-ℯ²)) is 6931335 (value taken from ρ column in
Snyder table 15).
          */
         verifyTransform(new double[] {0, 50}, new double[] {0, 5356698.435});
         /*



Mime
View raw message