sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1752851 - in /sis/branches/JDK8/core/sis-referencing/src: main/java/org/apache/sis/internal/referencing/provider/ main/java/org/apache/sis/referencing/operation/projection/ test/java/org/apache/sis/referencing/operation/transform/
Date Fri, 15 Jul 2016 16:57:16 GMT
Author: desruisseaux
Date: Fri Jul 15 16:57:16 2016
New Revision: 1752851

URL: http://svn.apache.org/viewvc?rev=1752851&view=rev
Log:
Changes in the amount of spaces and a minor typo fix in a comment.
No code change in this commit.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java?rev=1752851&r1=1752850&r2=1752851&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java
[UTF-8] Fri Jul 15 16:57:16 2016
@@ -105,9 +105,9 @@ public final class Mercator2SP extends A
                 .addIdentifier(Citations.S57,       "8")
                 .createGroupForMapProjection(
                         STANDARD_PARALLEL,
-                        latitudeOfOrigin,       // Not formally a Mercator2SP parameter.
+                        latitudeOfOrigin,                   // Not formally a Mercator2SP
parameter.
                         Mercator1SP.LONGITUDE_OF_ORIGIN,
-                        SCALE_FACTOR,           // Not formally a Mercator2SP parameter.
+                        SCALE_FACTOR,                       // Not formally a Mercator2SP
parameter.
                         FALSE_EASTING,
                         FALSE_NORTHING);
     }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java?rev=1752851&r1=1752850&r2=1752851&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java
[UTF-8] Fri Jul 15 16:57:16 2016
@@ -167,10 +167,10 @@ abstract class ConformalProjection exten
          * For each line below, add the smallest values first in order to reduce rounding
errors.
          * The smallest values are the one using the eccentricity raised to the highest power.
          */
-        ci2  =    13/   360.* e8  +   1/ 12.* e6  +  5/24.* e4  +  e2/2;
-        ci4  =   811/ 11520.* e8  +  29/240.* e6  +  7/48.* e4;
-        ci6  =    81/  1120.* e8  +   7/120.* e6;
-        ci8  =  4279/161280.* e8;
+        ci2  =    13/   360. * e8  +   1/ 12. * e6  +  5/24. * e4  +  e2/2;
+        ci4  =   811/ 11520. * e8  +  29/240. * e6  +  7/48. * e4;
+        ci6  =    81/  1120. * e8  +   7/120. * e6;
+        ci8  =  4279/161280. * e8;
         /*
          * When rewriting equations using trigonometric identities, some constants appear.
          * For example sin(2θ) = 2⋅sinθ⋅cosθ, so we can factor out the 2 constant
into the
@@ -257,7 +257,7 @@ abstract class ConformalProjection exten
                + ci2 * sin(2*φ);
         } else {
             /*
-             * Same formula than above, be rewriten using trigonometric identities in order
to have only two
+             * Same formula than above, but rewriten using trigonometric identities in order
to have only two
              * calls to Math.sin/cos instead than 5. The performance gain is twice faster
on tested machine.
              */
             final double sin_2φ = sin(2*φ);

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java?rev=1752851&r1=1752850&r2=1752851&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java
[UTF-8] Fri Jul 15 16:57:16 2016
@@ -95,8 +95,8 @@ public class Mercator extends ConformalP
      *
      * @see #getVariant(OperationMethod)
      */
-    private static final byte SPHERICAL = 1, PSEUDO = 3,    // Must be odd and SPHERICAL
must be 1.
-                              REGIONAL  = 2, MILLER = 4;    // Must be even.
+    private static final byte SPHERICAL = 1, PSEUDO = 3,            // Must be odd and SPHERICAL
must be 1.
+                              REGIONAL  = 2, MILLER = 4;            // Must be even.
 
     /**
      * Returns the variant of the projection based on the name and identifier of the given
operation method.
@@ -290,7 +290,7 @@ public class Mercator extends ConformalP
         if (φ0 == 0 && isPositive(φ1 != 0 ? φ1 : φ0)) {
             final Number reverseSign = verbatim(-1);
             normalize  .convertBefore(1, reverseSign, null);
-            denormalize.convertBefore(1, reverseSign, null);  // Must be before false easting/northing.
+            denormalize.convertBefore(1, reverseSign, null);        // Must be before false
easting/northing.
         }
     }
 
@@ -353,7 +353,7 @@ public class Mercator extends ConformalP
                 // about why we perform explicit checks for the pole cases.
                 final double a = abs(φ);
                 if (a < PI/2) {
-                    y = log(expOfNorthing(φ, eccentricity * sinφ));     // Snyder (7-7)
+                    y = log(expOfNorthing(φ, eccentricity * sinφ));                 //
Snyder (7-7)
                 } else if (a <= (PI/2 + ANGULAR_TOLERANCE)) {
                     y = copySign(POSITIVE_INFINITY, φ);
                 } else {
@@ -389,7 +389,7 @@ public class Mercator extends ConformalP
         } else {
             dstOff--;
             while (--numPts >= 0) {
-                final double φ = dstPts[dstOff += 2]; // Same as srcPts[srcOff + 1].
+                final double φ = dstPts[dstOff += 2];                           // Same
as srcPts[srcOff + 1].
                 if (φ != 0) {
                     // See the javadoc of the Spherical inner class for a note
                     // about why we perform explicit checks for the pole cases.
@@ -419,8 +419,8 @@ public class Mercator extends ConformalP
                                     final double[] dstPts, final int dstOff)
             throws ProjectionException
     {
-        final double y   = srcPts[srcOff+1];    // Must be before writing x.
-        dstPts[dstOff  ] = srcPts[srcOff  ];    // Must be before writing y.
+        final double y   = srcPts[srcOff+1];            // Must be before writing x.
+        dstPts[dstOff  ] = srcPts[srcOff  ];            // Must be before writing y.
         dstPts[dstOff+1] = φ(exp(-y));
     }
 
@@ -487,7 +487,7 @@ public class Mercator extends ConformalP
                     // See class javadoc for a note about explicit check for poles.
                     final double a = abs(φ);
                     if (a < PI/2) {
-                        y = log(tan(PI/4 + 0.5*φ));    // Part of Snyder (7-2)
+                        y = log(tan(PI/4 + 0.5*φ));                             // Part
of Snyder (7-2)
                     } else if (a <= (PI/2 + ANGULAR_TOLERANCE)) {
                         y = copySign(POSITIVE_INFINITY, φ);
                     } else {
@@ -517,13 +517,13 @@ public class Mercator extends ConformalP
             } else {
                 dstOff--;
                 while (--numPts >= 0) {
-                    final double φ = dstPts[dstOff += 2];   // Same as srcPts[srcOff + 1].
+                    final double φ = dstPts[dstOff += 2];                       // Same
as srcPts[srcOff + 1].
                     if (φ != 0) {
                         // See class javadoc for a note about explicit check for poles.
                         final double a = abs(φ);
                         final double y;
                         if (a < PI/2) {
-                            y = log(tan(PI/4 + 0.5*φ));     // Part of Snyder (7-2)
+                            y = log(tan(PI/4 + 0.5*φ));                         // Part
of Snyder (7-2)
                         } else if (a <= (PI/2 + ANGULAR_TOLERANCE)) {
                             y = copySign(POSITIVE_INFINITY, φ);
                         } else {
@@ -543,9 +543,9 @@ public class Mercator extends ConformalP
                                         final double[] dstPts, final int dstOff)
                 throws ProjectionException
         {
-            final double y = srcPts[srcOff+1];           // Must be before writing x.
-            dstPts[dstOff  ] = srcPts[srcOff];           // Must be before writing y.
-            dstPts[dstOff+1] = PI/2 - 2*atan(exp(-y));  // Part of Snyder (7-4);
+            final double y = srcPts[srcOff+1];                      // Must be before writing
x.
+            dstPts[dstOff  ] = srcPts[srcOff];                      // Must be before writing
y.
+            dstPts[dstOff+1] = PI/2 - 2*atan(exp(-y));              // Part of Snyder (7-4);
         }
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java?rev=1752851&r1=1752850&r2=1752851&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java
[UTF-8] Fri Jul 15 16:57:16 2016
@@ -145,7 +145,7 @@ public abstract strictfp class MathTrans
     private static int forComparison(final int[] config, final CalculationType mode) {
         if (config != null) {
             switch (mode) {
-                case INVERSE_TRANSFORM: if (config.length >= 2) return config[1]; // Intentional
fallthrough.
+                case INVERSE_TRANSFORM: if (config.length >= 2) return config[1];    
  // Intentional fallthrough.
                 case DIRECT_TRANSFORM:  if (config.length >= 1) return config[0];
             }
         }
@@ -245,7 +245,7 @@ public abstract strictfp class MathTrans
         final float[] asFloats = Numerics.copyAsFloats(coordinates);
         final float[] result   = verifyConsistency(asFloats);
         for (int i=0; i<coordinates.length; i++) {
-            assertEquals("Detected change in source coordinates.", (float) coordinates[i],
asFloats[i], 0f); // Paranoiac check.
+            assertEquals("Detected change in source coordinates.", (float) coordinates[i],
asFloats[i], 0f);    // Paranoiac check.
         }
         /*
          * The comparison below needs a higher tolerance threshold, because we converted
the source
@@ -259,7 +259,7 @@ public abstract strictfp class MathTrans
             for (int i=0; i<expected.length; i++) {
                 final double e = expected[i];
                 double tol = 1E-6 * abs(e);
-                if (!(tol > tolerance)) {   // Use '!' for replacing NaN by 'tolerance'.
+                if (!(tol > tolerance)) {               // Use '!' for replacing NaN by
'tolerance'.
                     tol = tolerance;
                 }
                 assertEquals(e, result[i], tol);



Mime
View raw message