Set the CylindricalEqualArea parameters to the "Lambert cylindrical equal-area" parameters defined by EPSG:9835.
git-svn-id: https://svn.apache.org/repos/asf/sis/branches/JDK8@1753204 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/CylindricalEqualArea.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java
similarity index 83%
rename from core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/CylindricalEqualArea.java
rename to core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java
index 3396cd0..dbf52e8 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/CylindricalEqualArea.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java
@@ -20,14 +20,13 @@
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 @@
* @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 @@
* 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 @@
.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 @@
/**
* Constructs a new provider.
*/
- public CylindricalEqualArea() {
+ public LambertCylindricalEqualArea() {
super(PARAMETERS);
}
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java
index f3ae95f..6359602 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java
@@ -70,8 +70,8 @@
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
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
index 130c4f1..4a5c561 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
@@ -34,11 +34,11 @@
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:
*
diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
index 402cbec..1560701 100644
--- a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
+++ b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
@@ -27,7 +27,7 @@
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
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java b/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
index 7da9aed..170235c 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
@@ -37,7 +37,7 @@
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.6
- * @version 0.7
+ * @version 0.8
* @module
*/
@DependsOn({
@@ -79,7 +79,7 @@
PseudoMercator.class,
RegionalMercator.class,
MillerCylindrical.class,
- CylindricalEqualArea.class,
+ LambertCylindricalEqualArea.class,
LambertConformal1SP.class,
LambertConformal2SP.class,
LambertConformalWest.class,
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalEqualAreaTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalEqualAreaTest.java
index 5d9350f..0422867 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalEqualAreaTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalEqualAreaTest.java
@@ -20,6 +20,7 @@
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 @@
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);
}