sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 01/02: Rename AxesConvention.CONVENTIONALLY_ORIENTED as DISPLAY_ORIENTED.
Date Tue, 25 Dec 2018 15:15:03 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 74d5c0a4a12b9bc479d52037e8ec9d2c3243674f
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Tue Dec 25 15:03:09 2018 +0100

    Rename AxesConvention.CONVENTIONALLY_ORIENTED as DISPLAY_ORIENTED.
---
 .../sis/referencing/gazetteer/LocationFormat.java  |  2 +-
 .../internal/referencing/DefinitionVerifier.java   |  2 +-
 .../sis/referencing/crs/DefaultCompoundCRS.java    |  4 +-
 .../org/apache/sis/referencing/cs/AbstractCS.java  |  4 +-
 .../apache/sis/referencing/cs/AxesConvention.java  | 99 ++++++++++++----------
 .../org/apache/sis/referencing/cs/Normalizer.java  |  2 +-
 .../sis/referencing/crs/AbstractCRSTest.java       |  4 +-
 .../referencing/crs/DefaultGeographicCRSTest.java  |  4 +-
 .../apache/sis/referencing/cs/AbstractCSTest.java  |  8 +-
 .../sis/referencing/cs/DefaultCartesianCSTest.java |  4 +-
 .../referencing/cs/DefaultCylindricalCSTest.java   |  2 +-
 .../sis/referencing/cs/DefaultPolarCSTest.java     |  2 +-
 .../sis/referencing/cs/DefaultSphericalCSTest.java |  2 +-
 .../apache/sis/referencing/cs/NormalizerTest.java  |  4 +-
 14 files changed, 77 insertions(+), 66 deletions(-)

diff --git a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/LocationFormat.java
b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/LocationFormat.java
index 4f163c1..e97a479 100644
--- a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/LocationFormat.java
+++ b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/LocationFormat.java
@@ -153,7 +153,7 @@ public class LocationFormat extends TabularFormat<Location> {
     private static CoordinateReferenceSystem normalize(final CoordinateReferenceSystem crs)
{
         if (crs != null) {
             AbstractCRS normalized = AbstractCRS.castOrCopy(crs);
-            if (normalized != (normalized = normalized.forConvention(AxesConvention.CONVENTIONALLY_ORIENTED)))
{
+            if (normalized != (normalized = normalized.forConvention(AxesConvention.DISPLAY_ORIENTED)))
{
                 return normalized;
             }
         }
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DefinitionVerifier.java
b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DefinitionVerifier.java
index bf6c9f9..bae67aa 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DefinitionVerifier.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DefinitionVerifier.java
@@ -73,7 +73,7 @@ public final class DefinitionVerifier {
      */
     private static final AxesConvention[] VARIANTS = {
         AxesConvention.NORMALIZED,
-        AxesConvention.CONVENTIONALLY_ORIENTED,
+        AxesConvention.DISPLAY_ORIENTED,
         AxesConvention.RIGHT_HANDED
     };
 
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
index fd3a95d..0714ec2 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
@@ -476,7 +476,7 @@ public class DefaultCompoundCRS extends AbstractCRS implements CompoundCRS
{
     /**
      * {@inheritDoc}
      *
-     * <p>If the given convention is {@link AxesConvention#CONVENTIONALLY_ORIENTED}
or
+     * <p>If the given convention is {@link AxesConvention#DISPLAY_ORIENTED} or
      * {@link AxesConvention#NORMALIZED}, then this method will also reorder the components
      * with horizontal CRS (geodetic or projected) first, then vertical CRS, then temporal
CRS.</p>
      *
@@ -489,7 +489,7 @@ public class DefaultCompoundCRS extends AbstractCRS implements CompoundCRS
{
         if (crs == null) {
             crs = this;
             boolean changed = false;
-            final boolean reorderCRS = convention.ordinal() <= AxesConvention.CONVENTIONALLY_ORIENTED.ordinal();
+            final boolean reorderCRS = convention.ordinal() <= AxesConvention.DISPLAY_ORIENTED.ordinal();
             final List<? extends CoordinateReferenceSystem> components = reorderCRS
? singles : this.components;
             final CoordinateReferenceSystem[] newComponents = new CoordinateReferenceSystem[components.size()];
             for (int i=0; i<newComponents.length; i++) {
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
index 92141c2..2fc0376 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
@@ -353,8 +353,8 @@ public class AbstractCS extends AbstractIdentifiedObject implements CoordinateSy
                 cs = cs.resolveEPSG(this);
             }
             /*
-             * It happen often that the CRS created by RIGHT_HANDED, CONVENTIONALLY_ORIENTED
-             * and NORMALIZED are the same. If this is the case, sharing the same instance
+             * It happen often that the CRS created by RIGHT_HANDED, DISPLAY_ORIENTED and
+             * NORMALIZED are the same. If this is the case, sharing the same instance
              * not only save memory but can also make future comparisons faster.
              */
             for (final AbstractCS existing : derived.values()) {
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java
index 3c49cf0..410c7b6 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java
@@ -39,10 +39,10 @@ import org.apache.sis.measure.Units;
  *   <tr>
  *     <th>Property</th>
  *     <th>Example</th>
- *     <th>{@linkplain #NORMALIZED              Normalized}</th>
- *     <th>{@linkplain #CONVENTIONALLY_ORIENTED Conventionally<br>oriented}</th>
- *     <th>{@linkplain #RIGHT_HANDED            Right<br>handed}</th>
- *     <th>{@linkplain #POSITIVE_RANGE          Positive<br>range}</th>
+ *     <th>{@linkplain #NORMALIZED      Normalized}</th>
+ *     <th>{@link #DISPLAY_ORIENTED     Display<br>oriented}</th>
+ *     <th>{@linkplain #RIGHT_HANDED    Right<br>handed}</th>
+ *     <th>{@linkplain #POSITIVE_RANGE  Positive<br>range}</th>
  *   </tr>
  *   <tr>
  *     <td>Axis order</td>
@@ -78,7 +78,7 @@ import org.apache.sis.measure.Units;
  *   </tr>
  * </table>
  *
- * <div class="section">Discussion on axis order</div>
+ * <div class="section">Note on axis order</div>
  * The axis order is specified by the authority (typically a national agency) defining the
Coordinate Reference System
  * (CRS). The order depends on the CRS type and the country defining the CRS. In the case
of geographic CRS, the
  * (<var>latitude</var>, <var>longitude</var>) axis order is widely
used by geographers and pilotes for centuries.
@@ -94,9 +94,9 @@ import org.apache.sis.measure.Units;
  * {@link org.apache.sis.referencing.CRS#forCode(String)} method. The actual axis order can
be verified after the CRS
  * creation with {@code System.out.println(crs)}. If (<var>x</var>,<var>y</var>)
axis order is wanted for compatibility
  * with older OGC specifications or other software products, CRS forced to "longitude first"
axis order can be created
- * using the {@link #CONVENTIONALLY_ORIENTED} or {@link #NORMALIZED} enumeration value.</p>
+ * using the {@link #DISPLAY_ORIENTED} or {@link #NORMALIZED} enumeration value.</p>
  *
- * <div class="section">Range of longitude values</div>
+ * <div class="section">Note on range of longitude values</div>
  * Most geographic CRS have a longitude axis defined in the [-180 … +180]° range. All
map projections in Apache SIS are
  * designed to work in that range. This is also the range of {@link Math} trigonometric functions
like {@code atan2(y,x)}.
  * However some data use the [0 … 360]° range instead. A geographic CRS can be shifted
to that range of longitude values
@@ -105,7 +105,7 @@ import org.apache.sis.measure.Units;
  * (e.g. {@link org.apache.sis.geometry.GeneralEnvelope#normalize()}).
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.8
+ * @version 1.0
  *
  * @see AbstractCS#forConvention(AxesConvention)
  * @see org.apache.sis.referencing.crs.AbstractCRS#forConvention(AxesConvention)
@@ -115,11 +115,11 @@ import org.apache.sis.measure.Units;
  */
 public enum AxesConvention implements AxisFilter {
     /**
-     * Axes order, direction and units of measure are forced to commonly used pre-defined
values.
-     * This enum represents the following changes to apply on a coordinate system:
+     * Axes order, direction and units of measurement are forced to commonly used predefined
values.
+     * This convention implies the following changes on a coordinate system:
      *
      * <ul>
-     *   <li>Axes are oriented and ordered as defined for {@link #CONVENTIONALLY_ORIENTED}
coordinate systems.</li>
+     *   <li>Axes are oriented and ordered as defined for {@link #DISPLAY_ORIENTED}
coordinate systems.</li>
      *   <li>Known units are normalized (this list may be expanded in future SIS versions):
      *     <ul>
      *       <li>Angular units are set to {@link Units#DEGREE}.</li>
@@ -129,12 +129,12 @@ public enum AxesConvention implements AxisFilter {
      *   </li>
      * </ul>
      *
-     * This mode does not normalize longitude values to the [-180 … +180]° range and does
not set the
+     * This convention does not normalize longitude values to the [-180 … +180]° range
and does not set the
      * {@linkplain org.apache.sis.referencing.datum.DefaultGeodeticDatum#getPrimeMeridian()
prime meridian} to Greenwich.
      * Those changes are not applied for avoiding discontinuity in conversions from the non-normalized
CRS to the normalized CRS.
      *
      * <div class="note"><b>Rational:</b>
-     * The reason why we do not yet normalize the range and the prime meridian is because
doing so
+     * The reason why we do not normalize the range and the prime meridian is because doing
so
      * would cause the conversion between old and new coordinate systems to be non-affine
for axes
      * having {@link org.opengis.referencing.cs.RangeMeaning#WRAPAROUND}. Furthermore changing
the
      * prime meridian would be a datum change rather than a coordinate system change, and
datum
@@ -178,24 +178,37 @@ public enum AxesConvention implements AxisFilter {
     },
 
     /**
-     * Axes are oriented toward conventional directions and ordered for a {@linkplain #RIGHT_HANDED
right-handed}
-     * coordinate system. Units of measurement are unchanged.
+     * Axes are reordered and oriented toward directions commonly used for displaying purpose.
+     * Units of measurement are unchanged. This convention can be used for deriving a coordinate
system with the
+     * <i>(<var>longitude</var>, <var>latitude</var>)</i>
or <i>(<var>x</var>,<var>y</var>)</i> axis order.
+     * A similar concept appears in the Web Map Services (WMS) 1.3 specification, quoted
here:
      *
-     * <p>More specifically, directions opposites to the following ones are replaced
by their "forward" counterpart
-     * (e.g. {@code SOUTH} → {@code NORTH}):</p>
+     * <div class="note"><b>6.7.2 Map CS</b> —
+     * The usual orientation of the Map CS shall be such that the <var>i</var>
axis is parallel to the East-to-West axis
+     * of the Layer CRS and increases Eastward, and the <var>j</var> axis is
parallel to the North-to-South axis of the
+     * Layer CRS and increases Southward. This orientation will not be possible in some cases,
as (for example) in an
+     * orthographic projection over the South Pole. The convention to be followed is that,
wherever possible, East shall
+     * be to the right edge and North shall be toward the upper edge of the Map CS.</div>
+     *
+     * The above-cited <i>(<var>i</var>,<var>j</var>)</i>
axes are mapped to <cite>display right</cite> and
+     * <cite>display down</cite> directions respectively.
+     * Other kinds of axis are mapped to <cite>east</cite> and <cite>north</cite>
directions when possible.
+     * More specifically, Apache SIS tries to setup the following directions
+     * (replacing a direction by its "forward" counterpart when necessary, e.g. {@code SOUTH}
→ {@code NORTH})
+     * in the order shown below:
      *
      * <table class="sis">
-     *   <caption>Axis directions used by convention</caption>
+     *   <caption>Axis directions and order</caption>
      *   <tr>
-     *     <th>Preferred {@link AxisDirection}</th>
+     *     <th>Preferred axis sequences</th>
      *     <th>Purpose</th>
      *   </tr><tr>
      *     <td>{@link AxisDirection#EAST EAST}, {@link AxisDirection#NORTH NORTH},
      *         {@link AxisDirection#UP UP}, {@link AxisDirection#FUTURE FUTURE}</td>
-     *     <td>Commonly used (<var>x</var>, <var>y</var>, <var>z</var>,
<var>t</var>) directions for coordinates.</td>
+     *     <td>Commonly used <i>(<var>x</var>, <var>y</var>,
<var>z</var>, <var>t</var>)</i> directions for coordinates.</td>
      *   </tr><tr>
      *     <td>{@link AxisDirection#DISPLAY_RIGHT DISPLAY_RIGHT}, {@link AxisDirection#DISPLAY_DOWN
DISPLAY_DOWN}</td>
-     *     <td>Commonly used (<var>x</var>, <var>y</var>) directions
for screen devices.</td>
+     *     <td>Commonly used <i>(<var>x</var>, <var>y</var>)</i>
directions for screen devices.</td>
      *   </tr><tr>
      *     <td>{@link AxisDirection#ROW_POSITIVE ROW_POSITIVE},
      *         {@link AxisDirection#COLUMN_POSITIVE COLUMN_POSITIVE}</td>
@@ -203,28 +216,17 @@ public enum AxesConvention implements AxisFilter {
      *   </tr>
      * </table>
      *
-     * Then, axes are ordered for {@link #RIGHT_HANDED} coordinate system.
-     *
-     * <div class="section">Usage</div>
-     * This enum is often used for deriving a coordinate system with the (<var>longitude</var>,
<var>latitude</var>) or
-     * (<var>x</var>,<var>y</var>) axis order. We do not provide
a <cite>"longitude or <var>x</var> axis first"</cite>
-     * enumeration value because such criterion is hard to apply to inter-cardinal directions
and has no meaning for
-     * map projections over a pole, while the right-handed rule can apply everywhere.
-     *
-     * <p><cite>Right-handed</cite> coordinate systems have a precise meaning
in Apache SIS.
-     * However <cite>conventionally oriented</cite> coordinate systems have a
looser definition.
-     * A similar concept appears in the Web Map Services (WMS) 1.3 specification, quoted
here:</p>
+     * <div class="note"><b>Notes:</b>
+     * we do not provide a <cite>"longitude or <var>x</var> axis first"</cite>
enumeration value because such criterion
+     * is hard to apply to inter-cardinal directions and has no meaning for map projections
over a pole.
+     * The <cite>display oriented</cite> enumeration name applies to a wider
range of cases,
+     * but still have a loosely definition which may be adjusted in future Apache SIS versions.
+     * If a more stable definition is needed, consider using {@link #RIGHT_HANDED} instead
since
+     * <cite>right-handed</cite> coordinate systems have a more precise meaning
in Apache SIS.</div>
      *
-     * <div class="note"><b>6.7.2 Map CS</b> —
-     * The usual orientation of the Map CS shall be such that the <var>i</var>
axis is parallel to the East-to-West axis
-     * of the Layer CRS and increases Eastward, and the <var>j</var> axis is
parallel to the North-to-South axis of the
-     * Layer CRS and increases Southward. This orientation will not be possible in some cases,
as (for example) in an
-     * orthographic projection over the South Pole. The convention to be followed is that,
wherever possible, East shall
-     * be to the right edge and North shall be toward the upper edge of the Map CS.</div>
-     *
-     * @since 0.5
+     * @since 1.0
      */
-    CONVENTIONALLY_ORIENTED {
+    DISPLAY_ORIENTED {
         @Override public AxisDirection getDirectionReplacement(CoordinateSystemAxis axis,
AxisDirection direction) {
             return NORMALIZED.getDirectionReplacement(axis, direction);
         }
@@ -239,12 +241,12 @@ public enum AxesConvention implements AxisFilter {
      * will be first in every cases. The most notable exception is the case of (West, North)
orientations.
      * The following table lists that case, together with other common axis orientations.
      * The axes orientations implied by this {@code RIGHT_HANDED} enum is shown,
-     * together with {@link #CONVENTIONALLY_ORIENTED} axes for reference:</p>
+     * together with {@link #DISPLAY_ORIENTED} axes for reference:</p>
      *
      * <div class="note">
      * <table class="sis">
      *   <caption>Examples of left-handed and right-handed coordinate systems</caption>
-     *   <tr><th>Left-handed</th> <th>Right-handed</th> <th>Conventionally
oriented</th> <th>Remarks</th></tr>
+     *   <tr><th>Left-handed</th> <th>Right-handed</th> <th>Display
oriented</th> <th>Remarks</th></tr>
      *   <tr><td>North, East</td> <td>East, North</td> <td>East,
North</td> <td>This is the most common case.</td></tr>
      *   <tr><td>West, North</td> <td>North, West</td> <td>East,
North</td> <td>This right-handed system has latitude first.</td></tr>
      *   <tr><td>South, West</td> <td>West, South</td> <td>East,
North</td> <td>Used for the mapping of southern Africa.</td></tr>
@@ -279,5 +281,14 @@ public enum AxesConvention implements AxisFilter {
      *
      * @see org.opengis.referencing.cs.RangeMeaning#WRAPAROUND
      */
-    POSITIVE_RANGE
+    POSITIVE_RANGE;
+
+    /**
+     * @deprecated Renamed {@link #DISPLAY_ORIENTED} since "conventional" is too vague.
+     *             For example the (latitude, longitude) axis order is also conventional.
+     *
+     * @since 0.5
+     */
+    @Deprecated
+    public static final AxesConvention CONVENTIONALLY_ORIENTED = DISPLAY_ORIENTED;
 }
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
index 5bae092..fc5b5e2 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
@@ -446,7 +446,7 @@ final class Normalizer implements Comparable<Normalizer> {
     static AbstractCS forConvention(final CoordinateSystem cs, final AxesConvention convention)
{
         switch (convention) {
             case NORMALIZED:              // Fall through
-            case CONVENTIONALLY_ORIENTED: return normalize(cs, convention, true);
+            case DISPLAY_ORIENTED: return normalize(cs, convention, true);
             case RIGHT_HANDED:            return normalize(cs, null, true);
             case POSITIVE_RANGE:          return shiftAxisRange(cs);
             default: throw new AssertionError(convention);
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/AbstractCRSTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/AbstractCRSTest.java
index 45172c9..2bfb1b8 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/AbstractCRSTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/AbstractCRSTest.java
@@ -54,10 +54,10 @@ public final strictfp class AbstractCRSTest extends TestCase {
 
         assertEquals("forConvention(RIGHT_HANDED)", expected, actual);
         assertSame(actual,   toTest  .forConvention(AxesConvention.RIGHT_HANDED));
-        assertSame(actual,   toTest  .forConvention(AxesConvention.CONVENTIONALLY_ORIENTED));
+        assertSame(actual,   toTest  .forConvention(AxesConvention.DISPLAY_ORIENTED));
         assertSame(actual,   toTest  .forConvention(AxesConvention.NORMALIZED));
         assertSame(expected, expected.forConvention(AxesConvention.RIGHT_HANDED));
-        assertSame(expected, expected.forConvention(AxesConvention.CONVENTIONALLY_ORIENTED));
+        assertSame(expected, expected.forConvention(AxesConvention.DISPLAY_ORIENTED));
         assertSame(expected, expected.forConvention(AxesConvention.NORMALIZED));
     }
 }
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeographicCRSTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeographicCRSTest.java
index 3497269..1859e12 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeographicCRSTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeographicCRSTest.java
@@ -71,12 +71,12 @@ public final strictfp class DefaultGeographicCRSTest extends TestCase
{
 
     /**
      * Tests the {@link DefaultGeographicCRS#forConvention(AxesConvention)} method
-     * for {@link AxesConvention#CONVENTIONALLY_ORIENTED}.
+     * for {@link AxesConvention#DISPLAY_ORIENTED}.
      */
     @Test
     public void testConventionalOrientation() {
         final DefaultGeographicCRS crs = DefaultGeographicCRS.castOrCopy(CommonCRS.WGS84.geographic3D());
-        final DefaultGeographicCRS normalized = crs.forConvention(AxesConvention.CONVENTIONALLY_ORIENTED);
+        final DefaultGeographicCRS normalized = crs.forConvention(AxesConvention.DISPLAY_ORIENTED);
         assertNotSame(crs, normalized);
         final EllipsoidalCS cs = normalized.getCoordinateSystem();
         final EllipsoidalCS ref = crs.getCoordinateSystem();
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java
index e039ff5..364bb8a 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java
@@ -80,9 +80,9 @@ public final strictfp class AbstractCSTest extends TestCase {
                 HardCodedAxes.GEODETIC_LATITUDE,
                 HardCodedAxes.ALTITUDE,
                 HardCodedAxes.TIME);
-        assertSame("Right-handed CS shall be same as conventionally oriented for this test.",
+        assertSame("Right-handed CS shall be same as display-oriented for this test.",
                 cs.forConvention(AxesConvention.RIGHT_HANDED),
-                cs.forConvention(AxesConvention.CONVENTIONALLY_ORIENTED));
+                cs.forConvention(AxesConvention.DISPLAY_ORIENTED));
         assertSame("Right-handed CS shall be same as normalized for this test.",
                 cs.forConvention(AxesConvention.RIGHT_HANDED),
                 cs.forConvention(AxesConvention.NORMALIZED));
@@ -111,7 +111,7 @@ public final strictfp class AbstractCSTest extends TestCase {
         assertEquals("maximumValue", Double.POSITIVE_INFINITY, HEIGHT.getMaximumValue(),
STRICT);
         assertNull  ("rangeMeaning", HEIGHT.getRangeMeaning());
         /*
-         * Now the actual test. First we opportunistically test RIGHT_HANDED and CONVENTIONALLY_ORIENTED
+         * Now the actual test. First we opportunistically test RIGHT_HANDED and DISPLAY_ORIENTED
          * before to test NORMALIZED, in order to test in increasing complexity.
          */
         final AbstractCS cs = new AbstractCS(singletonMap(NAME_KEY, "Test"),
@@ -124,7 +124,7 @@ public final strictfp class AbstractCSTest extends TestCase {
                 HardCodedAxes.WESTING,
                 HardCodedAxes.HEIGHT_cm,
                 HardCodedAxes.TIME);
-        verifyAxesConvention(AxesConvention.CONVENTIONALLY_ORIENTED, cs,
+        verifyAxesConvention(AxesConvention.DISPLAY_ORIENTED, cs,
                 EASTING,
                 HardCodedAxes.NORTHING,
                 HardCodedAxes.HEIGHT_cm,
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java
index 38d973b..f297392 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java
@@ -162,7 +162,7 @@ public final strictfp class DefaultCartesianCSTest extends TestCase {
             final String toTestX,   final String toTestY)
     {
         DefaultCartesianCS cs = createCS(toTestX, toTestY);
-        cs = cs.forConvention(AxesConvention.CONVENTIONALLY_ORIENTED);
+        cs = cs.forConvention(AxesConvention.DISPLAY_ORIENTED);
         assertEqualsIgnoreMetadata(createCS(expectedX, expectedY), cs);
     }
 
@@ -177,7 +177,7 @@ public final strictfp class DefaultCartesianCSTest extends TestCase {
 
     /**
      * Tests {@link DefaultCartesianCS#forConvention(AxesConvention)} with
-     * {@link AxesConvention#CONVENTIONALLY_ORIENTED}.
+     * {@link AxesConvention#DISPLAY_ORIENTED}.
      */
     @Test
     @DependsOnMethod("testConstructor")
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java
index 48760ff..74ebdf6 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java
@@ -45,7 +45,7 @@ public final strictfp class DefaultCylindricalCSTest extends TestCase {
     @Test
     public void testChangeClockwiseOrientation() {
         final DefaultCylindricalCS cs = HardCodedCS.CYLINDRICAL;
-        final DefaultCylindricalCS normalized = cs.forConvention(AxesConvention.CONVENTIONALLY_ORIENTED);
+        final DefaultCylindricalCS normalized = cs.forConvention(AxesConvention.DISPLAY_ORIENTED);
         assertNotSame("Should create a new CoordinateSystem.", cs, normalized);
         assertAxisDirectionsEqual("Normalized", normalized,
                 AxisDirections.AWAY_FROM,
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultPolarCSTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultPolarCSTest.java
index 9037254..9af78a1 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultPolarCSTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultPolarCSTest.java
@@ -45,7 +45,7 @@ public final strictfp class DefaultPolarCSTest extends TestCase {
     @Test
     public void testChangeClockwiseOrientation() {
         final DefaultPolarCS cs = HardCodedCS.POLAR;
-        final DefaultPolarCS normalized = cs.forConvention(AxesConvention.CONVENTIONALLY_ORIENTED);
+        final DefaultPolarCS normalized = cs.forConvention(AxesConvention.DISPLAY_ORIENTED);
         assertNotSame("Should create a new CoordinateSystem.", cs, normalized);
         assertAxisDirectionsEqual("Normalized", normalized,
                 AxisDirections.AWAY_FROM,
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultSphericalCSTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultSphericalCSTest.java
index 88a22a9..0a87af0 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultSphericalCSTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultSphericalCSTest.java
@@ -51,7 +51,7 @@ public final strictfp class DefaultSphericalCSTest extends TestCase {
         final DefaultSphericalCS cs = HardCodedCS.SPHERICAL;
         assertEquals("EPSG abbreviation for geocentric radius should be lower-case", "r",
cs.getAxis(2).getAbbreviation());
 
-        final DefaultSphericalCS normalized = cs.forConvention(AxesConvention.CONVENTIONALLY_ORIENTED);
+        final DefaultSphericalCS normalized = cs.forConvention(AxesConvention.DISPLAY_ORIENTED);
         assertNotSame("Should create a new CoordinateSystem.", cs, normalized);
         assertAxisDirectionsEqual("Normalized", normalized,
                 AxisDirection.EAST,
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java
index 27da9eb..ce3d249 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java
@@ -197,7 +197,7 @@ public final strictfp class NormalizerTest extends TestCase {
      */
     @Test
     public void testNormalizeAxisDirection() {
-        assertSameAfterNormalization(AxesConvention.CONVENTIONALLY_ORIENTED);
+        assertSameAfterNormalization(AxesConvention.DISPLAY_ORIENTED);
         /*
          * Test a change of direction from West to East.
          */
@@ -216,7 +216,7 @@ public final strictfp class NormalizerTest extends TestCase {
          * Test a change of unit from centimetre to metre.
          */
         assertSame(HardCodedAxes.HEIGHT_cm, Normalizer.normalize(HardCodedAxes.HEIGHT_cm,
-                AxesConvention.CONVENTIONALLY_ORIENTED));                               
   // Do not change unit.
+                AxesConvention.DISPLAY_ORIENTED));                                      
   // Do not change unit.
         assertAxisEquals("Height", "h", AxisDirection.UP,
                 Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Units.METRE, null,
                 Normalizer.normalize(HardCodedAxes.HEIGHT_cm, AxesConvention.NORMALIZED));


Mime
View raw message