Author: desruisseaux
Date: Thu Mar 17 10:48:09 2016
New Revision: 1735402

URL: http://svn.apache.org/viewvc?rev=1735402&view=rev
Log:
Prepare for PolarCS: Add an "awayFrom" axis direction (taken from ISO 19162) 
and uses it in the tests.
Allow CoordinateSystemTransform to be two-dimensional, not only 
three-dimensional.

Modified:
    
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisDirections.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToCylindrical.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToSpherical.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CylindricalToCartesian.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SphericalToCartesian.java
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java

Modified: 
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisDirections.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisDirections.java?rev=1735402&r1=1735401&r2=1735402&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisDirections.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisDirections.java
 [UTF-8] Thu Mar 17 10:48:09 2016
@@ -64,7 +64,22 @@ public final class AxisDirections extend
     public static final int DISPLAY_COUNT = 4;
 
     /**
-     * Direction of geographic angles (azimuths).
+     * Ordinal of the last element in the {@link AxisDirection} code list.
+     * This is used for differentiating the standard codes from the 
user-defined ones.
+     */
+    private static final int LAST_ORDINAL = DISPLAY_DOWN.ordinal();
+
+    /**
+     * Distance from the origin in a polar coordinate system.
+     * Specified in ISO 19162 but not yet in ISO 19111.
+     *
+     * @since 0.7
+     */
+    @UML(identifier="awayFrom", obligation=CONDITIONAL, 
specification=ISO_19162)
+    public static final AxisDirection AWAY_FROM = 
AxisDirection.valueOf("AWAY_FROM");
+
+    /**
+     * Direction of geographic angles (bearing).
      * Specified in ISO 19162 but not yet in ISO 19111.
      *
      * @since 0.7
@@ -78,8 +93,8 @@ public final class AxisDirections extend
      *
      * @since 0.7
      */
-    @UML(identifier="counterclockwise", obligation=CONDITIONAL, 
specification=ISO_19162)
-    public static final AxisDirection COUNTERCLOCKWISE = 
AxisDirection.valueOf("COUNTERCLOCKWISE");
+    @UML(identifier="counterClockwise", obligation=CONDITIONAL, 
specification=ISO_19162)
+    public static final AxisDirection COUNTER_CLOCKWISE = 
AxisDirection.valueOf("COUNTER_CLOCKWISE");
 
     /**
      * For each direction, the opposite direction.
@@ -87,22 +102,22 @@ public final class AxisDirections extend
      */
     private static final Map<AxisDirection,AxisDirection> OPPOSITES = new 
HashMap<>(20);
     static {
-        put(OTHER,            OTHER);
-        put(NORTH,            SOUTH);
-        put(NORTH_NORTH_EAST, SOUTH_SOUTH_WEST);
-        put(NORTH_EAST,       SOUTH_WEST);
-        put(EAST_NORTH_EAST,  WEST_SOUTH_WEST);
-        put(EAST,             WEST);
-        put(EAST_SOUTH_EAST,  WEST_NORTH_WEST);
-        put(SOUTH_EAST,       NORTH_WEST);
-        put(SOUTH_SOUTH_EAST, NORTH_NORTH_WEST);
-        put(UP,               DOWN);
-        put(FUTURE,           PAST);
-        put(COLUMN_POSITIVE,  COLUMN_NEGATIVE);
-        put(ROW_POSITIVE,     ROW_NEGATIVE);
-        put(DISPLAY_RIGHT,    DISPLAY_LEFT);
-        put(DISPLAY_UP,       DISPLAY_DOWN);
-        put(COUNTERCLOCKWISE, CLOCKWISE);
+        put(OTHER,             OTHER);
+        put(NORTH,             SOUTH);
+        put(NORTH_NORTH_EAST,  SOUTH_SOUTH_WEST);
+        put(NORTH_EAST,        SOUTH_WEST);
+        put(EAST_NORTH_EAST,   WEST_SOUTH_WEST);
+        put(EAST,              WEST);
+        put(EAST_SOUTH_EAST,   WEST_NORTH_WEST);
+        put(SOUTH_EAST,        NORTH_WEST);
+        put(SOUTH_SOUTH_EAST,  NORTH_NORTH_WEST);
+        put(UP,                DOWN);
+        put(FUTURE,            PAST);
+        put(COLUMN_POSITIVE,   COLUMN_NEGATIVE);
+        put(ROW_POSITIVE,      ROW_NEGATIVE);
+        put(DISPLAY_RIGHT,     DISPLAY_LEFT);
+        put(DISPLAY_UP,        DISPLAY_DOWN);
+        put(COUNTER_CLOCKWISE, CLOCKWISE);
     }
 
     /**
@@ -114,10 +129,21 @@ public final class AxisDirections extend
     }
 
     /**
-     * Ordinal of the last element in the {@link AxisDirection} code list.
-     * This is used for differentiating the standard codes from the 
user-defined ones.
+     * Proposed abbreviations for some axis directions.
+     * This map shall be immutable after construction.
      */
-    private static final int LAST_ORDINAL = DISPLAY_DOWN.ordinal();
+    private static final Map<AxisDirection,String> ABBREVIATIONS = new 
HashMap<>(12);
+    static {
+        final Map<AxisDirection,String> m = ABBREVIATIONS;
+        m.put(FUTURE,            "t");
+        m.put(COLUMN_POSITIVE,   "i");
+        m.put(ROW_POSITIVE,      "j");
+        m.put(DISPLAY_RIGHT,     "x");
+        m.put(DISPLAY_UP,        "y");
+        m.put(OTHER,             "z");      // Arbitrary abbreviation, may 
change in any future SIS version.
+        m.put(AWAY_FROM,         "r");
+        m.put(COUNTER_CLOCKWISE, "θ");
+    }
 
     /**
      * Do not allow instantiation of this class.
@@ -174,7 +200,7 @@ public final class AxisDirections extend
             // Below is a temporary patch pending integration of code list 
values into GeoAPI.
             // We need this patch because we can not rely on ordinal() value 
for custom codes.
             if (dir == CLOCKWISE) {
-                dir = COUNTERCLOCKWISE;
+                dir = COUNTER_CLOCKWISE;
             }
         }
         return dir;
@@ -629,27 +655,15 @@ public final class AxisDirections extend
             if (UP.equals(direction)) {
                 return contains(name, "Gravity", false) ? "H" : contains(name, 
"Geocentric", false) ? "r": "h";
             } else if (DOWN.equals(direction)) {
-                return "D"; // "Depth"
+                return "D";                         // "Depth"
             } else if (isGeocentric(direction)) {
                 // For GEOCENTRIC_X, GEOCENTRIC_Y or GEOCENTRIC_Z, just take 
the last letter.
                 final String dir = direction.name();
                 return dir.substring(dir.length() - 1).trim();
             }
-            final AxisDirection a = absolute(direction);
-            if (FUTURE.equals(a)) {
-                return "t";
-            } else if (COLUMN_POSITIVE.equals(a)) {
-                return "i";
-            } else if (ROW_POSITIVE.equals(a)) {
-                return "j";
-            } else if (DISPLAY_RIGHT.equals(a)) {
-                return "x";
-            } else if (DISPLAY_UP.equals(a)) {
-                return "y";
-            } else if (OTHER.equals(a)) {
-                return "z";                     // Arbitrary abbreviation, may 
change in any future SIS version.
-            } else if (COUNTERCLOCKWISE.equals(a)) {
-                return "θ";
+            final String abbreviation = ABBREVIATIONS.get(absolute(direction));
+            if (abbreviation != null) {
+                return abbreviation;
             }
         }
         final String id = direction.identifier();   // UML identifier, or null 
if none.

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java?rev=1735402&r1=1735401&r2=1735402&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
 [UTF-8] Thu Mar 17 10:48:09 2016
@@ -287,6 +287,12 @@ final class Normalizer implements Compar
             changed |= sort(axes, angularUnitOrder);
             if (angularUnitOrder == 1) {                            // 
Cylindrical or polar
                 /*
+                 * Direction "awayFrom" (r) should be first.
+                 */
+                if (AxisDirections.AWAY_FROM.equals(axes[1].getDirection()) && 
Units.isLinear(axes[0].getUnit())) {
+                    ArraysExt.swap(axes, 0, 1);
+                }
+                /*
                  * Change (r,z,θ) to (r,θ,z) order in CylindricalCS. The check 
on unit of
                  * measurements should be always true, but we verify as a 
paranoiac check.
                  */

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToCylindrical.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToCylindrical.java?rev=1735402&r1=1735401&r2=1735402&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToCylindrical.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToCylindrical.java
 [UTF-8] Thu Mar 17 10:48:09 2016
@@ -62,7 +62,7 @@ final class CartesianToCylindrical exten
      * Output coordinates are in radians.
      */
     private CartesianToCylindrical() {
-        super("Cartesian to cylindrical");
+        super("Cartesian to cylindrical", 3);
         context.getMatrix(ContextualParameters.MatrixRole.DENORMALIZATION)
                .convertAfter(1, DoubleDouble.createRadiansToDegrees(), null);
     }

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToSpherical.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToSpherical.java?rev=1735402&r1=1735401&r2=1735402&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToSpherical.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToSpherical.java
 [UTF-8] Thu Mar 17 10:48:09 2016
@@ -61,7 +61,7 @@ final class CartesianToSpherical extends
      * Output coordinates are in radians.
      */
     private CartesianToSpherical() {
-        super("Cartesian to spherical");
+        super("Cartesian to spherical", 3);
         context.denormalizeGeographicOutputs(0);                // Convert 
(θ,Ω) from radians to degrees.
     }
 

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java?rev=1735402&r1=1735401&r2=1735402&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java
 [UTF-8] Thu Mar 17 10:48:09 2016
@@ -52,6 +52,11 @@ import org.apache.sis.util.resources.Err
  */
 abstract class CoordinateSystemTransform extends AbstractMathTransform {
     /**
+     * Number of input and output dimensions.
+     */
+    private final int dimension;
+
+    /**
      * An empty contextual parameter, used only for representing conversion 
from degrees to radians.
      */
     final transient ContextualParameters context;
@@ -66,10 +71,11 @@ abstract class CoordinateSystemTransform
      * Subclasses may need to invoke {@link 
ContextualParameters#normalizeGeographicInputs(double)}
      * or {@link ContextualParameters#denormalizeGeographicOutputs(double)} 
after this constructor.
      */
-    CoordinateSystemTransform(final String method) {
+    CoordinateSystemTransform(final String method, final int dimension) {
+        this.dimension = dimension;
         final Map<String,?> properties = 
Collections.singletonMap(DefaultOperationMethod.NAME_KEY,
                 new ImmutableIdentifier(Citations.SIS, Constants.SIS, method));
-        context = new ContextualParameters(new 
DefaultOperationMethod(properties, 3, 3,
+        context = new ContextualParameters(new 
DefaultOperationMethod(properties, dimension, dimension,
                 new DefaultParameterDescriptorGroup(properties, 1, 1)));
     }
 
@@ -91,7 +97,7 @@ abstract class CoordinateSystemTransform
      */
     @Override
     public final int getSourceDimensions() {
-        return 3;
+        return dimension;
     }
 
     /**
@@ -100,7 +106,7 @@ abstract class CoordinateSystemTransform
      */
     @Override
     public final int getTargetDimensions() {
-        return 3;
+        return dimension;
     }
 
     /**

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CylindricalToCartesian.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CylindricalToCartesian.java?rev=1735402&r1=1735401&r2=1735402&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CylindricalToCartesian.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CylindricalToCartesian.java
 [UTF-8] Thu Mar 17 10:48:09 2016
@@ -75,7 +75,7 @@ final class CylindricalToCartesian exten
      * Input coordinates are in radians.
      */
     private CylindricalToCartesian() {
-        super("Cylindrical to Cartesian");
+        super("Cylindrical to Cartesian", 3);
         context.getMatrix(ContextualParameters.MatrixRole.NORMALIZATION)
                .convertBefore(1, DoubleDouble.createDegreesToRadians(), null);
     }

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SphericalToCartesian.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SphericalToCartesian.java?rev=1735402&r1=1735401&r2=1735402&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SphericalToCartesian.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SphericalToCartesian.java
 [UTF-8] Thu Mar 17 10:48:09 2016
@@ -79,7 +79,7 @@ final class SphericalToCartesian extends
      * Input coordinates are in radians.
      */
     private SphericalToCartesian() {
-        super("Spherical to Cartesian");
+        super("Spherical to Cartesian", 3);
         context.normalizeGeographicInputs(0);                   // Convert 
(θ,Ω) from degrees to radians.
     }
 

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java?rev=1735402&r1=1735401&r2=1735402&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java
 [UTF-8] Thu Mar 17 10:48:09 2016
@@ -17,7 +17,9 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Collections;
+import javax.measure.unit.SI;
 import org.opengis.referencing.cs.AxisDirection;
+import org.opengis.referencing.cs.RangeMeaning;
 import org.apache.sis.internal.metadata.AxisDirections;
 import org.apache.sis.test.TestCase;
 import org.apache.sis.test.DependsOn;
@@ -46,27 +48,38 @@ public final strictfp class DefaultCylin
         final DefaultCylindricalCS normalized = 
cs.forConvention(AxesConvention.CONVENTIONALLY_ORIENTED);
         assertNotSame("Should create a new CoordinateSystem.", cs, normalized);
         assertAxisDirectionsEqual("Normalized", normalized,
-                AxisDirection.SOUTH,                        // Not modified to 
North because radius can not be negative.
-                AxisDirections.COUNTERCLOCKWISE,
+                AxisDirections.AWAY_FROM,
+                AxisDirections.COUNTER_CLOCKWISE,
                 AxisDirection.UP);
     }
 
     /**
      * Tests {@link DefaultCylindricalCS#forConvention(AxesConvention)} with a 
change of axis order.
+     * This test uses a (r) axis oriented toward South instead than "awayFrom".
      */
     @Test
     public void testChangeAxisOrder() {
+        final DefaultCoordinateSystemAxis radius = 
HardCodedAxes.create("Radius", "r",
+                AxisDirection.SOUTH, SI.METRE, 0, Double.POSITIVE_INFINITY, 
RangeMeaning.EXACT);
+
         final DefaultCylindricalCS cs = new DefaultCylindricalCS(
                 Collections.singletonMap(DefaultCylindricalCS.NAME_KEY, 
"Cylindrical"),
-                HardCodedAxes.AZIMUTH,
+                HardCodedAxes.BEARING,
                 HardCodedAxes.Z,
-                HardCodedAxes.RADIUS);
+                radius);
 
-        final DefaultCylindricalCS normalized = 
cs.forConvention(AxesConvention.RIGHT_HANDED);
+        DefaultCylindricalCS normalized = 
cs.forConvention(AxesConvention.RIGHT_HANDED);
         assertNotSame("Should create a new CoordinateSystem.", cs, normalized);
-        assertAxisDirectionsEqual("Normalized", normalized,
+        assertAxisDirectionsEqual("Right-handed", normalized,
                 AxisDirections.CLOCKWISE,                       // 
Interchanged (r,θ) order for making right handed.
                 AxisDirection.SOUTH,
                 AxisDirection.UP);
+
+        normalized = cs.forConvention(AxesConvention.NORMALIZED);
+        assertNotSame("Should create a new CoordinateSystem.", cs, normalized);
+        assertAxisDirectionsEqual("Normalized", normalized,
+                AxisDirection.SOUTH,                            // Not 
modified to North because radius can not be negative.
+                AxisDirections.COUNTER_CLOCKWISE,
+                AxisDirection.UP);
     }
 }

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java?rev=1735402&r1=1735401&r2=1735402&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java
 [UTF-8] Thu Mar 17 10:48:09 2016
@@ -379,15 +379,17 @@ public final strictfp class HardCodedAxe
             AxisDirection.SOUTH_EAST, SI.METRE, Double.NEGATIVE_INFINITY, 
Double.POSITIVE_INFINITY, null);
 
     /**
-     * An axis for a radius oriented toward South.
+     * An axis for a distance from an origin.
+     * This is part of a polar coordinate system.
      */
-    public static final DefaultCoordinateSystemAxis RADIUS = create("Radius", 
"r",
-            AxisDirection.SOUTH, SI.METRE, 0, Double.POSITIVE_INFINITY, 
RangeMeaning.EXACT);
+    public static final DefaultCoordinateSystemAxis DISTANCE = 
create("Distance", "r",
+            AxisDirections.AWAY_FROM, SI.METRE, 0, Double.POSITIVE_INFINITY, 
RangeMeaning.EXACT);
 
     /**
      * An axis with clockwise orientation.
+     * This is part of a polar coordinate system.
      */
-    public static final DefaultCoordinateSystemAxis AZIMUTH = 
create("Azimuth", "θ",
+    public static final DefaultCoordinateSystemAxis BEARING = 
create("Bearing", "θ",
             AxisDirections.CLOCKWISE, NonSI.DEGREE_ANGLE, -180, +180, 
RangeMeaning.WRAPAROUND);
 
     /**
@@ -441,7 +443,7 @@ public final strictfp class HardCodedAxe
     /**
      * Creates a new axis of the given name, abbreviation, direction and unit.
      */
-    private static DefaultCoordinateSystemAxis create(final String name, final 
String abbreviation,
+    static DefaultCoordinateSystemAxis create(final String name, final String 
abbreviation,
             final AxisDirection direction, final Unit<?> unit, final double 
minimum, final double maximum,
             final RangeMeaning meaning)
     {

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java?rev=1735402&r1=1735401&r2=1735402&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java
 [UTF-8] Thu Mar 17 10:48:09 2016
@@ -112,8 +112,8 @@ public final strictfp class HardCodedCS
 
     /**
      * A three-dimensional cylindrical CS with
-     * <var>{@linkplain HardCodedAxes#RADIUS radius} (oriented toward 
south)</var>,
-     * <var>{@linkplain HardCodedAxes#AZIMUTH azimuth}</var>,
+     * <var>{@linkplain HardCodedAxes#DISTANCE distance}</var>,
+     * <var>{@link HardCodedAxes#BEARING bearing}</var>,
      * <var>{@linkplain HardCodedAxes#Z z}</var> axes.
      * Note that this is not a right-handed system.
      *
@@ -121,8 +121,8 @@ public final strictfp class HardCodedCS
      */
     public static final DefaultCylindricalCS CYLINDRICAL = new 
DefaultCylindricalCS(
             singletonMap(NAME_KEY, "Cylindrical"),
-            HardCodedAxes.RADIUS,
-            HardCodedAxes.AZIMUTH,
+            HardCodedAxes.DISTANCE,
+            HardCodedAxes.BEARING,
             HardCodedAxes.Z);
 
     /**

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java?rev=1735402&r1=1735401&r2=1735402&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java
 [UTF-8] Thu Mar 17 10:48:09 2016
@@ -171,8 +171,7 @@ public final strictfp class NormalizerTe
         assertSame(HardCodedAxes.NORTHING,           
Normalizer.normalize(HardCodedAxes.NORTHING, changes));
         assertSame(HardCodedAxes.ALTITUDE,           
Normalizer.normalize(HardCodedAxes.ALTITUDE, changes));
         assertSame(HardCodedAxes.TIME,               
Normalizer.normalize(HardCodedAxes.TIME, changes));
-        assertSame("Radius orientation should not be changed from South to 
North because it does not allow negative values.",
-                HardCodedAxes.RADIUS, 
Normalizer.normalize(HardCodedAxes.RADIUS, changes));
+        assertSame(HardCodedAxes.DISTANCE,           
Normalizer.normalize(HardCodedAxes.DISTANCE, changes));
     }
 
     /**


Reply via email to