sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1690129 - in /sis/branches/JDK8/core/sis-referencing/src: main/java/org/apache/sis/internal/referencing/provider/ main/java/org/apache/sis/referencing/operation/projection/ main/resources/META-INF/services/ test/java/org/apache/sis/referen...
Date Thu, 09 Jul 2015 17:37:33 GMT
Author: desruisseaux
Date: Thu Jul  9 17:37:33 2015
New Revision: 1690129

URL: http://svn.apache.org/r1690129
Log:
Add "Lambert Conic Conformal (1SP West Orientated)" projection method (EPSG:9826).

Added:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java
  (with props)
Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConformal.java
    sis/branches/JDK8/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/EquirectangularTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConformalTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java

Added: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java?rev=1690129&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java
(added)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java
[UTF-8] Thu Jul  9 17:37:33 2015
@@ -0,0 +1,66 @@
+/*
+ * 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
+ *
+ * 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 org.opengis.parameter.ParameterDescriptorGroup;
+import org.apache.sis.parameter.ParameterBuilder;
+
+
+/**
+ * The provider for <cite>Lambert Conic Conformal (West Orientated)"</cite> projection
(EPSG:9826).
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.6
+ * @version 0.6
+ * @module
+ */
+public final class LambertConformalWest extends AbstractLambert {
+    /**
+     * For cross-version compatibility.
+     */
+    private static final long serialVersionUID = -6226753337274190088L;
+
+    /**
+     * The EPSG identifier, to be preferred to the name when available.
+     */
+    public static final String IDENTIFIER = "9826";
+
+    /**
+     * The group of all parameters expected by this coordinate operation.
+     */
+    static final ParameterDescriptorGroup PARAMETERS;
+    static {
+        final ParameterBuilder builder = builder();
+
+        PARAMETERS = builder
+            .addIdentifier(IDENTIFIER)
+            .addName("Lambert Conic Conformal (West Orientated)")
+            .createGroupForMapProjection(
+                    LambertConformal1SP.LATITUDE_OF_ORIGIN,
+                    LambertConformal1SP.CENTRAL_MERIDIAN,
+                    LambertConformal1SP.SCALE_FACTOR,
+                    LambertConformal1SP.FALSE_EASTING,
+                    LambertConformal1SP.FALSE_NORTHING);
+    }
+
+    /**
+     * Constructs a new provider.
+     */
+    public LambertConformalWest() {
+        super(PARAMETERS);
+    }
+}

Propchange: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConformal.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConformal.java?rev=1690129&r1=1690128&r2=1690129&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConformal.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConformal.java
[UTF-8] Thu Jul  9 17:37:33 2015
@@ -29,6 +29,7 @@ import org.apache.sis.referencing.operat
 import org.apache.sis.referencing.operation.matrix.MatrixSIS;
 import org.apache.sis.internal.referencing.provider.LambertConformal1SP;
 import org.apache.sis.internal.referencing.provider.LambertConformal2SP;
+import org.apache.sis.internal.referencing.provider.LambertConformalWest;
 import org.apache.sis.internal.referencing.provider.LambertConformalBelgium;
 import org.apache.sis.internal.referencing.Formulas;
 import org.apache.sis.internal.util.DoubleDouble;
@@ -73,7 +74,7 @@ public class LambertConformal extends No
      *
      * @see #getType(ParameterDescriptorGroup)
      */
-    static final byte SP1 = 1, SP2 = 2, BELGIUM = 3;
+    static final byte SP1 = 1, SP2 = 2, WEST = 3, BELGIUM = 4;
 
     /**
      * Constant for the Belgium 2SP case. This is 29.2985 seconds, given here in radians.
@@ -88,7 +89,7 @@ public class LambertConformal extends No
     /**
      * Returns the (<var>role</var> → <var>parameter</var>) associations
for a Lambert projection of the given type.
      *
-     * @param  type One of {@link #SP1}, {@link #SP2} or {@link #BELGIUM} constants.
+     * @param  type One of {@link #SP1}, {@link #SP2}, {@link #WEST} or {@link #BELGIUM}
constants.
      * @return The roles map to give to super-class constructor.
      */
     private static Map<ParameterRole, ParameterDescriptor<Double>> roles(final
byte type) {
@@ -99,18 +100,21 @@ public class LambertConformal extends No
          */
         roles.put(ParameterRole.SCALE_FACTOR, LambertConformal1SP.SCALE_FACTOR);
         switch (type) {
+            case WEST:
             case SP1: {
                 roles.put(ParameterRole.CENTRAL_MERIDIAN, LambertConformal1SP.CENTRAL_MERIDIAN);
                 roles.put(ParameterRole.FALSE_EASTING,    LambertConformal1SP.FALSE_EASTING);
                 roles.put(ParameterRole.FALSE_NORTHING,   LambertConformal1SP.FALSE_NORTHING);
                 break;
             }
-            default: {
+            case BELGIUM:
+            case SP2: {
                 roles.put(ParameterRole.CENTRAL_MERIDIAN, LambertConformal2SP.LONGITUDE_OF_FALSE_ORIGIN);
                 roles.put(ParameterRole.FALSE_EASTING,    LambertConformal2SP.EASTING_AT_FALSE_ORIGIN);
                 roles.put(ParameterRole.FALSE_NORTHING,   LambertConformal2SP.NORTHING_AT_FALSE_ORIGIN);
                 break;
             }
+            default: throw new AssertionError(type);
         }
         return roles;
     }
@@ -139,7 +143,7 @@ public class LambertConformal extends No
     @Workaround(library="JDK", version="1.7")
     private LambertConformal(final OperationMethod method, final Parameters parameters, final
byte type) {
         super(method, parameters, roles(type));
-        double φ0 = getAndStore(parameters, (type == SP1) ?
+        double φ0 = getAndStore(parameters, (type == SP1 || type == WEST) ?
                 LambertConformal1SP.LATITUDE_OF_ORIGIN : LambertConformal2SP.LATITUDE_OF_FALSE_ORIGIN);
         /*
          * Standard parallels (SP) are defined only for the 2SP case, but we look for them
unconditionally
@@ -201,7 +205,7 @@ public class LambertConformal extends No
          *   - Scale x and y by F.
          *   - Translate y by ρ0.
          *   - Multiply by the scale factor (done by the super-class constructor).
-         *   - Add false easting and fasle northing (done by the super-class constructor).
+         *   - Add false easting and false northing (done by the super-class constructor).
          */
         context.getMatrix(true).convertAfter(0, new DoubleDouble(-n, 0),    // Multiplication
factor for longitudes.
                 (type == BELGIUM) ? new DoubleDouble(-BELGE_A, 0) : null);  // Longitude
translation for Belgium.
@@ -210,6 +214,16 @@ public class LambertConformal extends No
         denormalize.convertBefore(0, F, null);
         F.negate();
         denormalize.convertBefore(1, F, ρ0);
+        /*
+         * EPSG:9826  —  Lambert Conic Conformal (1SP West Orientated)
+         *
+         * In this projection method positive x are oriented toward West. Reverse the sign
of 'x' before to apply
+         * the "false easting". As a consequence of this operation order, despite its name
the "false easting" is
+         * effectively a "false westing" (FW) parameter. This is confusing but the operation
is defined like that.
+         */
+        if (type == WEST) {
+            denormalize.convertBefore(0, new DoubleDouble(-1, 0), null);
+        }
     }
 
     /**
@@ -226,6 +240,7 @@ public class LambertConformal extends No
      */
     private static byte getType(final ParameterDescriptorGroup parameters) {
         if (identMatch(parameters, "(?i).*\\bBelgium\\b.*", LambertConformalBelgium.IDENTIFIER))
return BELGIUM;
+        if (identMatch(parameters, "(?i).*\\bWest\\b.*",    LambertConformalWest   .IDENTIFIER))
return WEST;
         if (identMatch(parameters, "(?i).*\\b2SP\\b.*",     LambertConformal2SP    .IDENTIFIER))
return SP2;
         if (identMatch(parameters, "(?i).*\\b1SP\\b.*",     LambertConformal1SP    .IDENTIFIER))
return SP1;
         return 0; // Unidentified case, to be considered as 2SP.
@@ -311,8 +326,8 @@ public class LambertConformal extends No
         final double x = ρ * sinλ;
         final double y = ρ * cosλ;
         if (dstPts != null) {
-            dstPts[dstOff]   = x;
-            dstPts[dstOff+1] = y;
+            dstPts[dstOff    ] = x;
+            dstPts[dstOff + 1] = y;
         }
         if (!derivate) {
             return null;
@@ -341,8 +356,8 @@ public class LambertConformal extends No
                                     final double[] dstPts, final int dstOff)
             throws ProjectionException
     {
-        final double x = srcPts[srcOff  ];
-        final double y = srcPts[srcOff+1];
+        final double x = srcPts[srcOff    ];
+        final double y = srcPts[srcOff + 1];
         /*
          * NOTE: If some equation terms seem missing (e.g. "y = ρ0 - y"), this is because
the linear operations
          * applied before the first non-linear one moved to the inverse of the "denormalize"
transform, and the
@@ -434,8 +449,8 @@ public class LambertConformal extends No
             assert Assertions.checkDerivative(derivative, super.transform(srcPts, srcOff,
dstPts, dstOff, derivate))
                 && Assertions.checkTransform(dstPts, dstOff, x, y);     // dstPts
= result from ellipsoidal formulas.
             if (dstPts != null) {
-                dstPts[dstOff  ] = x;
-                dstPts[dstOff+1] = y;
+                dstPts[dstOff    ] = x;
+                dstPts[dstOff + 1] = y;
             }
             return derivative;
         }
@@ -454,8 +469,8 @@ public class LambertConformal extends No
             x = atan2(x, y);  // Really (x,y), not (y,x)
             y = 2 * atan(pow(1/ρ, -1/n)) - PI/2;
             assert checkInverseTransform(srcPts, srcOff, dstPts, dstOff, x, y);
-            dstPts[dstOff  ] = x;
-            dstPts[dstOff+1] = y;
+            dstPts[dstOff    ] = x;
+            dstPts[dstOff + 1] = y;
         }
 
         /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod?rev=1690129&r1=1690128&r2=1690129&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
[UTF-8] Thu Jul  9 17:37:33 2015
@@ -11,4 +11,5 @@ org.apache.sis.internal.referencing.prov
 org.apache.sis.internal.referencing.provider.MillerCylindrical
 org.apache.sis.internal.referencing.provider.LambertConformal1SP
 org.apache.sis.internal.referencing.provider.LambertConformal2SP
+org.apache.sis.internal.referencing.provider.LambertConformalWest
 org.apache.sis.internal.referencing.provider.LambertConformalBelgium

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/EquirectangularTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/EquirectangularTest.java?rev=1690129&r1=1690128&r2=1690129&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/EquirectangularTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/EquirectangularTest.java
[UTF-8] Thu Jul  9 17:37:33 2015
@@ -118,7 +118,13 @@ public final strictfp class Equirectangu
      */
     @Test
     public void testRandomPoints() throws FactoryException, TransformException {
-        initialize(new Equirectangular(), true, false, true, false);
+        initialize(new Equirectangular(), true,
+                  0.5,  // Central meridian
+                  0,    // Latitude of origin (none)
+                 20,    // Standard parallel
+                  1,    // Scale factor (none)
+                200,    // False easting
+                100);   // False northing
         tolerance = Formulas.LINEAR_TOLERANCE;  // Not NORMALIZED_TOLERANCE since this is
not a NormalizedProjection.
         derivativeDeltas = new double[] {100, 100};
         verifyInDomain(CoordinateDomain.GEOGRAPHIC, 0);

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConformalTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConformalTest.java?rev=1690129&r1=1690128&r2=1690129&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConformalTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConformalTest.java
[UTF-8] Thu Jul  9 17:37:33 2015
@@ -16,16 +16,20 @@
  */
 package org.apache.sis.referencing.operation.projection;
 
+import java.util.Random;
 import org.opengis.util.FactoryException;
+import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.TransformException;
 import org.apache.sis.internal.referencing.Formulas;
 import org.apache.sis.internal.referencing.provider.LambertConformal1SP;
 import org.apache.sis.internal.referencing.provider.LambertConformal2SP;
+import org.apache.sis.internal.referencing.provider.LambertConformalWest;
 import org.apache.sis.internal.referencing.provider.LambertConformalBelgium;
 import org.apache.sis.referencing.operation.transform.CoordinateDomain;
 import org.apache.sis.parameter.Parameters;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
+import org.apache.sis.test.TestUtilities;
 import org.junit.Test;
 
 import static java.lang.StrictMath.*;
@@ -194,6 +198,58 @@ public final strictfp class LambertConfo
     }
 
     /**
+     * Tests the <cite>"Lambert Conic Conformal (1SP West Orientated)"</cite>
case (EPSG:9826)).
+     *
+     * @throws FactoryException if an error occurred while creating the map projection.
+     * @throws TransformException if an error occurred while projecting a coordinate.
+     */
+    @Test
+    @DependsOnMethod("testLambertConicConformal1SP")
+    public void testLambertConicConformalWestOrientated() throws FactoryException, TransformException
{
+        initialize(new LambertConformal1SP(), false,
+                  0.5,    // Central meridian
+                 40,      // Latitude of origin
+                  0,      // Standard parallel (none)
+                  0.997,  // Scale factor
+                200,      // False easting
+                100);     // False northing
+        final MathTransform reference = transform;
+
+        initialize(new LambertConformalWest(), false,
+                  0.5,    // Central meridian
+                 40,      // Latitude of origin
+                  0,      // Standard parallel (none)
+                  0.997,  // Scale factor
+                200,      // False easting
+                100);     // False northing
+
+        final Random random = TestUtilities.createRandomNumberGenerator();
+        final double[] sources = new double[20];
+        for (int i=0; i<sources.length;) {
+            sources[i++] = 20 * random.nextDouble();      // Longitude
+            sources[i++] = 10 * random.nextDouble() + 35; // Latitude
+        }
+        final double[] expected = new double[sources.length];
+        reference.transform(sources, 0, expected, 0, sources.length/2);
+        /*
+         * At this point, we have the source coordinates and the expected projected coordinates
calculated
+         * by the "Lambert Conic Conformal (1SP)" method. Now convert those projected coordinates
into the
+         * coordinates that we expect from the "Lambert Conic Conformal (1SP West Orientated)".
 If we had
+         * no false easting, we would just revert the sign of 'x' values. But because of
the false easting,
+         * we expect an additional offset of two time that easting. This is because (quoting
the EPSG guide):
+         *
+         *    the term FE retains its definition, i.e. in the Lambert Conic Conformal (West
Orientated)
+         *    method it increases the Westing value at the natural origin.
+         *    In this method it is effectively false westing (FW).
+         */
+        for (int i=0; i<sources.length; i += 2) {
+            expected[i] = 400 - expected[i];
+        }
+        tolerance = Formulas.LINEAR_TOLERANCE;
+        verifyTransform(sources, expected);
+    }
+
+    /**
      * Verifies the consistency of spherical formulas with the elliptical formulas.
      *
      * @throws FactoryException if an error occurred while creating the map projection.
@@ -212,7 +268,13 @@ public final strictfp class LambertConfo
         /*
          * For some random points, compare the result of spherical formulas with the ellipsoidal
ones.
          */
-        initialize(new LambertConformal1SP(), false, true, false, true);
+        initialize(new LambertConformal1SP(), false,
+                  0.5,    // Central meridian
+                 40,      // Latitude of origin
+                  0,      // Standard parallel (none)
+                  0.997,  // Scale factor
+                200,      // False easting
+                100);     // False northing
         tolerance = Formulas.LINEAR_TOLERANCE;
         verifyInDomain(CoordinateDomain.GEOGRAPHIC_SAFE, 268617081);
     }

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java?rev=1690129&r1=1690128&r2=1690129&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java
[UTF-8] Thu Jul  9 17:37:33 2015
@@ -83,24 +83,20 @@ strictfp class MapProjectionTestCase ext
      * the chances to detect a mismatch.
      */
     final void initialize(final DefaultOperationMethod provider, final boolean ellipse,
-            final boolean hasLatitudeOfOrigin,
-            final boolean hasStandardParallel,
-            final boolean hasScaleFactor)
-            throws FactoryException
+            final double centralMeridian,
+            final double latitudeOfOrigin,
+            final double standardParallel,
+            final double scaleFactor,
+            final double falseEasting,
+            final double falseNorthing) throws FactoryException
     {
         final Parameters parameters = parameters(provider, ellipse);
-        parameters.parameter(Constants.CENTRAL_MERIDIAN).setValue(0.5, NonSI.DEGREE_ANGLE);
-        parameters.parameter(Constants.FALSE_EASTING)   .setValue(200);
-        parameters.parameter(Constants.FALSE_NORTHING)  .setValue(100);
-        if (hasLatitudeOfOrigin) {
-            parameters.parameter("latitude_of_origin").setValue(40);
-        }
-        if (hasStandardParallel) {
-            parameters.parameter(Constants.STANDARD_PARALLEL_1).setValue(20);
-        }
-        if (hasScaleFactor) {
-            parameters.parameter(Constants.SCALE_FACTOR).setValue(0.997);
-        }
+        if (centralMeridian  != 0) parameters.parameter(Constants.CENTRAL_MERIDIAN)   .setValue(centralMeridian,
NonSI.DEGREE_ANGLE);
+        if (latitudeOfOrigin != 0) parameters.parameter("latitude_of_origin")         .setValue(latitudeOfOrigin);
+        if (standardParallel != 0) parameters.parameter(Constants.STANDARD_PARALLEL_1).setValue(standardParallel);
+        if (scaleFactor      != 1) parameters.parameter(Constants.SCALE_FACTOR)       .setValue(scaleFactor);
+        if (falseEasting     != 0) parameters.parameter(Constants.FALSE_EASTING)      .setValue(falseEasting);
+        if (falseNorthing    != 0) parameters.parameter(Constants.FALSE_NORTHING)     .setValue(falseNorthing);
         transform = new MathTransformFactoryMock(provider).createParameterizedTransform(parameters);
         validate();
     }

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java?rev=1690129&r1=1690128&r2=1690129&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
[UTF-8] Thu Jul  9 17:37:33 2015
@@ -234,7 +234,13 @@ public final strictfp class MercatorTest
         /*
          * For some random points, compare the result of spherical formulas with the ellipsoidal
ones.
          */
-        initialize(new Mercator1SP(), false, false, false, true);
+        initialize(new Mercator1SP(), false,
+                  0.5,    // Central meridian
+                  0,      // Latitude of origin (none)
+                  0,      // Standard parallel (none)
+                  0.997,  // Scale factor
+                200,      // False easting
+                100);     // False northing
         tolerance = Formulas.LINEAR_TOLERANCE;
         verifyInDomain(CoordinateDomain.GEOGRAPHIC_SAFE, 84018710);
     }



Mime
View raw message