sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 02/03: Rename an "ellipse" boolean parameter as "ellipsoidal".
Date Wed, 24 Apr 2019 13:57:18 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit ea60179bf77b6b184a9091f55b1bf4e41c106ad4
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Wed Apr 24 14:54:24 2019 +0200

    Rename an "ellipse" boolean parameter as "ellipsoidal".
---
 .../operation/projection/LambertConicConformalTest.java        |  8 ++++----
 .../operation/projection/MapProjectionTestCase.java            | 10 +++++-----
 .../sis/referencing/operation/projection/MercatorTest.java     |  8 ++++----
 .../operation/projection/TransverseMercatorTest.java           |  6 +++---
 .../referencing/operation/projection/ZonedGridSystemTest.java  |  6 +++---
 5 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConicConformalTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConicConformalTest.java
index 143ec65..32b0450 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConicConformalTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConicConformalTest.java
@@ -74,15 +74,15 @@ public final strictfp class LambertConicConformalTest extends MapProjectionTestC
      * Creates a new instance of {@link LambertConicConformal}. See the class javadoc for
an explanation
      * about why we ask only for the latitude of origin and not the standard parallels.
      *
-     * @param  ellipse           {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
+     * @param  ellipsoidal       {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
      * @param  latitudeOfOrigin  the latitude of origin, in decimal degrees.
      */
-    private void createNormalizedProjection(final boolean ellipse, final double latitudeOfOrigin)
{
+    private void createNormalizedProjection(final boolean ellipsoidal, final double latitudeOfOrigin)
{
         final LambertConformal1SP method = new LambertConformal1SP();
-        final Parameters parameters = parameters(method, ellipse);
+        final Parameters parameters = parameters(method, ellipsoidal);
         parameters.getOrCreate(LambertConformal1SP.LATITUDE_OF_ORIGIN).setValue(latitudeOfOrigin);
         transform = new LambertConicConformal(method, parameters);
-        if (!ellipse) {
+        if (!ellipsoidal) {
             transform = new LambertConicConformal.Spherical((LambertConicConformal) transform);
         }
         tolerance = NORMALIZED_TOLERANCE;
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java
index 46e8e99..8b7222e 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java
@@ -80,16 +80,16 @@ abstract strictfp class MapProjectionTestCase extends MathTransformTestCase
{
      * Returns the parameters to use for instantiating the projection to test.
      * The parameters are initialized with the ellipse semi-axis lengths.
      *
-     * @param  provider  the provider of the projection to test.
-     * @param  ellipse   {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
+     * @param  provider     the provider of the projection to test.
+     * @param  ellipsoidal  {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
      * @return the parameters to use for instantiating the projection.
      */
-    static Parameters parameters(final DefaultOperationMethod provider, final boolean ellipse)
{
+    static Parameters parameters(final DefaultOperationMethod provider, final boolean ellipsoidal)
{
         final Parameters parameters = Parameters.castOrWrap(provider.getParameters().createValue());
-        final Ellipsoid ellipsoid = (ellipse ? GeodeticDatumMock.WGS84 : GeodeticDatumMock.SPHERE).getEllipsoid();
+        final Ellipsoid ellipsoid = (ellipsoidal ? GeodeticDatumMock.WGS84 : GeodeticDatumMock.SPHERE).getEllipsoid();
         parameters.parameter(Constants.SEMI_MAJOR).setValue(ellipsoid.getSemiMajorAxis());
         parameters.parameter(Constants.SEMI_MINOR).setValue(ellipsoid.getSemiMinorAxis());
-        if (ellipse) {
+        if (ellipsoidal) {
             parameters.parameter(Constants.INVERSE_FLATTENING).setValue(ellipsoid.getInverseFlattening());
         }
         return parameters;
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
index 451e99a..7c4fd6e 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
@@ -53,12 +53,12 @@ public final strictfp class MercatorTest extends MapProjectionTestCase
{
      * Creates a new instance of {@link Mercator} for a sphere or an ellipsoid.
      * The new instance is stored in the inherited {@link #transform} field.
      *
-     * @param  ellipse  {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
+     * @param  ellipsoidal  {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
      */
-    private void createNormalizedProjection(final boolean ellipse) {
+    private void createNormalizedProjection(final boolean ellipsoidal) {
         final Mercator2SP method = new Mercator2SP();
-        transform = new Mercator(method, parameters(method, ellipse));
-        if (!ellipse) {
+        transform = new Mercator(method, parameters(method, ellipsoidal));
+        if (!ellipsoidal) {
             transform = new Mercator.Spherical((Mercator) transform);
         }
         tolerance = NORMALIZED_TOLERANCE;
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/TransverseMercatorTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/TransverseMercatorTest.java
index d4f266c..655058f 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/TransverseMercatorTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/TransverseMercatorTest.java
@@ -45,12 +45,12 @@ public final strictfp class TransverseMercatorTest extends MapProjectionTestCase
     /**
      * Creates a new instance of {@link TransverseMercator}.
      *
-     * @param  ellipse  {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
+     * @param  ellipsoidal  {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
      */
-    private void createNormalizedProjection(final boolean ellipse, final double latitudeOfOrigin)
{
+    private void createNormalizedProjection(final boolean ellipsoidal, final double latitudeOfOrigin)
{
         final org.apache.sis.internal.referencing.provider.TransverseMercator method =
                 new org.apache.sis.internal.referencing.provider.TransverseMercator();
-        final Parameters parameters = parameters(method, ellipse);
+        final Parameters parameters = parameters(method, ellipsoidal);
         parameters.getOrCreate(org.apache.sis.internal.referencing.provider.TransverseMercator.LATITUDE_OF_ORIGIN).setValue(latitudeOfOrigin);
         transform = new TransverseMercator(method, parameters);
         tolerance = NORMALIZED_TOLERANCE;
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ZonedGridSystemTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ZonedGridSystemTest.java
index 772c91c..1580b07 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ZonedGridSystemTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ZonedGridSystemTest.java
@@ -45,11 +45,11 @@ public final strictfp class ZonedGridSystemTest extends MapProjectionTestCase
{
     /**
      * Creates a new instance of {@link ZonedGridSystem}.
      *
-     * @param  ellipse  {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
+     * @param  ellipsoidal  {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
      */
-    private void createProjection(final boolean ellipse) throws FactoryException {
+    private void createProjection(final boolean ellipsoidal) throws FactoryException {
         final ZonedTransverseMercator method = new ZonedTransverseMercator();
-        final Parameters values = parameters(method, ellipse);
+        final Parameters values = parameters(method, ellipsoidal);
         values.parameter(Constants.SCALE_FACTOR) .setValue(0.9996, Units.UNITY );
         values.parameter(Constants.FALSE_EASTING).setValue(500000, Units.METRE );
         values.parameter("Initial longitude")    .setValue(  -180, Units.DEGREE);


Mime
View raw message