sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1753204 - 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/interna...
Date Mon, 18 Jul 2016 10:52:43 GMT
Author: desruisseaux
Date: Mon Jul 18 10:52:43 2016
New Revision: 1753204

URL: http://svn.apache.org/viewvc?rev=1753204&view=rev
Log:
Set the CylindricalEqualArea parameters to the "Lambert cylindrical equal-area" parameters
defined by EPSG:9835.

Added:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java
      - copied, changed from r1753203, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/CylindricalEqualArea.java
Removed:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/CylindricalEqualArea.java
Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.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/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalEqualAreaTest.java

Copied: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java
(from r1753203, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/CylindricalEqualArea.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java?p2=sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java&p1=sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/CylindricalEqualArea.java&r1=1753203&r2=1753204&rev=1753204&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/CylindricalEqualArea.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java
[UTF-8] Mon Jul 18 10:52:43 2016
@@ -20,14 +20,13 @@ import javax.xml.bind.annotation.XmlTran
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.opengis.referencing.operation.CylindricalProjection;
-import org.apache.sis.parameter.ParameterBuilder;
 import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.parameter.Parameters;
 import org.apache.sis.referencing.operation.projection.NormalizedProjection;
 
 
 /**
- * The provider for <cite>"Cylindrical Equal Area"</cite> projection.
+ * The provider for <cite>"Lambert Cylindrical Equal Area"</cite> projection
(EPSG:9835).
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.8
@@ -37,7 +36,7 @@ import org.apache.sis.referencing.operat
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list/cylindrical_equal_area.html">Cylindrical
Equal Area on RemoteSensing.org</a>
  */
 @XmlTransient
-public final class CylindricalEqualArea extends MapProjection {
+public final class LambertCylindricalEqualArea extends MapProjection {
     /**
      * For cross-version compatibility.
      */
@@ -47,37 +46,34 @@ public final class CylindricalEqualArea
      * The operation parameter descriptor for the <cite>Latitude of 1st standard parallel</cite>
(φ₁) parameter value.
      * Valid values range is (-90 … 90)° and default value is 0°.
      */
-    public static final ParameterDescriptor<Double> STANDARD_PARALLEL;
+    public static final ParameterDescriptor<Double> STANDARD_PARALLEL = Equirectangular.STANDARD_PARALLEL;
 
     /**
      * The operation parameter descriptor for the <cite>Longitude of natural origin</cite>
(λ₀) parameter value.
      * Valid values range is [-180 … 180]° and default value is 0°.
      */
-    public static final ParameterDescriptor<Double> LONGITUDE_OF_ORIGIN;
+    public static final ParameterDescriptor<Double> LONGITUDE_OF_ORIGIN = Mercator1SP.LONGITUDE_OF_ORIGIN;
 
     /**
      * The operation parameter descriptor for the <cite>False easting</cite>
(FE) parameter value.
      * Valid values range is unrestricted and default value is 0 metre.
      */
-    public static final ParameterDescriptor<Double> FALSE_EASTING;
+    public static final ParameterDescriptor<Double> FALSE_EASTING = Equirectangular.FALSE_EASTING;
 
     /**
      * The operation parameter descriptor for the <cite>False northing</cite>
(FN) parameter value.
      * Valid values range is unrestricted and default value is 0 metre.
      */
-    public static final ParameterDescriptor<Double> FALSE_NORTHING;
+    public static final ParameterDescriptor<Double> FALSE_NORTHING = Equirectangular.FALSE_NORTHING;
 
     /**
      * The group of all parameters expected by this coordinate operation.
      */
     static final ParameterDescriptorGroup PARAMETERS;
     static {
-        final ParameterBuilder builder = builder();
-        STANDARD_PARALLEL   = createLatitude (exceptEPSG(Equirectangular.STANDARD_PARALLEL,
builder), false);
-        LONGITUDE_OF_ORIGIN = createLongitude(exceptEPSG(Mercator1SP.LONGITUDE_OF_ORIGIN,
  builder));
-        FALSE_EASTING       = createShift    (exceptEPSG(Equirectangular.FALSE_EASTING, 
   builder));
-        FALSE_NORTHING      = createShift    (exceptEPSG(Equirectangular.FALSE_NORTHING,
   builder));
-        PARAMETERS = builder
+        PARAMETERS = builder()
+                .addIdentifier(             "9835")
+                .addName(                   "Lambert Cylindrical Equal Area")
                 .addName(Citations.OGC,     "Cylindrical_Equal_Area")
                 .addName(Citations.ESRI,    "Cylindrical_Equal_Area")
                 .addName(Citations.GEOTIFF, "CT_CylindricalEqualArea")
@@ -86,7 +82,7 @@ public final class CylindricalEqualArea
                 .createGroupForMapProjection(
                         STANDARD_PARALLEL,
                         LONGITUDE_OF_ORIGIN,
-                        Mercator2SP.SCALE_FACTOR,           // Not formally a CylindricalEqualArea
parameter.
+                        Mercator2SP.SCALE_FACTOR,           // Not formally a Cylindrical
Equal Area parameter.
                         FALSE_EASTING,
                         FALSE_NORTHING);
     }
@@ -94,7 +90,7 @@ public final class CylindricalEqualArea
     /**
      * Constructs a new provider.
      */
-    public CylindricalEqualArea() {
+    public LambertCylindricalEqualArea() {
         super(PARAMETERS);
     }
 

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java?rev=1753204&r1=1753203&r2=1753204&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java
[UTF-8] Mon Jul 18 10:52:43 2016
@@ -70,8 +70,8 @@ public final class PolarStereographicSou
 
             forESRI(PolarStereographicB.LONGITUDE_OF_ORIGIN, builder),
                     PolarStereographicB.SCALE_FACTOR,                   // Not formally a
parameter of this projection.
-            forESRI(CylindricalEqualArea.FALSE_EASTING, builder),
-            forESRI(CylindricalEqualArea.FALSE_NORTHING, builder)
+            forESRI(LambertCylindricalEqualArea.FALSE_EASTING, builder),
+            forESRI(LambertCylindricalEqualArea.FALSE_NORTHING, builder)
         };
 
         PARAMETERS = builder

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=1753204&r1=1753203&r2=1753204&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] Mon Jul 18 10:52:43 2016
@@ -34,11 +34,11 @@ import org.apache.sis.util.Workaround;
 
 import static java.lang.Math.*;
 import static org.apache.sis.internal.util.DoubleDouble.verbatim;
-import static org.apache.sis.internal.referencing.provider.CylindricalEqualArea.*;
+import static org.apache.sis.internal.referencing.provider.LambertCylindricalEqualArea.*;
 
 
 /**
- * <cite>Cylindrical Equal Area</cite> projection.
+ * <cite>Cylindrical Equal Area</cite> projection (EPSG codes 9834, 9835).
  * This is the simplest equal-area projection.
  * This projection has various names depending on its standard parallel:
  *

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=1753204&r1=1753203&r2=1753204&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] Mon Jul 18 10:52:43 2016
@@ -27,7 +27,7 @@ org.apache.sis.internal.referencing.prov
 org.apache.sis.internal.referencing.provider.PseudoMercator
 org.apache.sis.internal.referencing.provider.RegionalMercator
 org.apache.sis.internal.referencing.provider.MillerCylindrical
-org.apache.sis.internal.referencing.provider.CylindricalEqualArea
+org.apache.sis.internal.referencing.provider.LambertCylindricalEqualArea
 org.apache.sis.internal.referencing.provider.LambertConformal1SP
 org.apache.sis.internal.referencing.provider.LambertConformal2SP
 org.apache.sis.internal.referencing.provider.LambertConformalWest

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java?rev=1753204&r1=1753203&r2=1753204&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
[UTF-8] Mon Jul 18 10:52:43 2016
@@ -37,7 +37,7 @@ import static org.junit.Assert.*;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.7
+ * @version 0.8
  * @module
  */
 @DependsOn({
@@ -79,7 +79,7 @@ public final strictfp class ProvidersTes
             PseudoMercator.class,
             RegionalMercator.class,
             MillerCylindrical.class,
-            CylindricalEqualArea.class,
+            LambertCylindricalEqualArea.class,
             LambertConformal1SP.class,
             LambertConformal2SP.class,
             LambertConformalWest.class,

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalEqualAreaTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalEqualAreaTest.java?rev=1753204&r1=1753203&r2=1753204&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalEqualAreaTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalEqualAreaTest.java
[UTF-8] Mon Jul 18 10:52:43 2016
@@ -20,6 +20,7 @@ import org.opengis.util.FactoryException
 import org.opengis.referencing.operation.TransformException;
 import org.opengis.test.ToleranceModifier;
 import org.apache.sis.internal.referencing.Formulas;
+import org.apache.sis.internal.referencing.provider.LambertCylindricalEqualArea;
 import org.junit.Test;
 
 
@@ -38,7 +39,7 @@ public final strictfp class CylindricalE
     private void createCompleteProjection(final boolean ellipse,
             final double centralMeridian, final double standardParallel) throws FactoryException
     {
-        createCompleteProjection(new org.apache.sis.internal.referencing.provider.CylindricalEqualArea(),
+        createCompleteProjection(new LambertCylindricalEqualArea(),
                 ellipse, centralMeridian, 0, standardParallel, 1, 0, 0);
     }
 



Mime
View raw message