sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1767577 [9/15] - in /sis/trunk: ./ application/ application/sis-console/src/main/java/org/apache/sis/console/ application/sis-openoffice/ application/sis-openoffice/src/main/java/org/apache/sis/openoffice/ core/ core/sis-feature/src/main/j...
Date Tue, 01 Nov 2016 21:03:08 GMT
Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -16,9 +16,6 @@
  */
 package org.apache.sis.referencing.crs;
 
-import javax.measure.unit.SI;
-import javax.measure.unit.NonSI;
-import javax.measure.unit.Unit;
 import javax.xml.bind.JAXBException;
 import org.opengis.util.FactoryException;
 import org.opengis.referencing.crs.ProjectedCRS;
@@ -36,6 +33,7 @@ import org.apache.sis.internal.system.Lo
 import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.LenientComparable;
+import org.apache.sis.measure.Units;
 
 // Test dependencies
 import org.opengis.test.Validators;
@@ -55,7 +53,7 @@ import static org.apache.sis.test.Refere
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.7
+ * @version 0.8
  * @module
  */
 @DependsOn({
@@ -108,8 +106,8 @@ public final strictfp class DefaultProje
     }
 
     /**
-     * Creates the "NTF (Paris) / Lambert zone II" CRS. The prime meridian is always in grades,
-     * but the axes can be in degrees or in grades depending if the {@code baseCRS} argument is
+     * Creates the "NTF (Paris) / Lambert zone II" CRS. The prime meridian is always in grads,
+     * but the axes can be in degrees or in grads depending if the {@code baseCRS} argument is
      * {@link HardCodedCRS.NTF_NORMALIZED_AXES} or {@link HardCodedCRS.NTF} respectively.
      *
      * @see HardCodedCRS#NTF
@@ -118,10 +116,10 @@ public final strictfp class DefaultProje
         return new GeodeticObjectBuilder()
                 .setConversionMethod("Lambert Conic Conformal (1SP)")
                 .setConversionName("Lambert zone II")
-                .setParameter("Latitude of natural origin",             52, NonSI.GRADE)
-                .setParameter("Scale factor at natural origin", 0.99987742, Unit.ONE)
-                .setParameter("False easting",                      600000, SI.METRE)
-                .setParameter("False northing",                    2200000, SI.METRE)
+                .setParameter("Latitude of natural origin",             52, Units.GRAD)
+                .setParameter("Scale factor at natural origin", 0.99987742, Units.UNITY)
+                .setParameter("False easting",                      600000, Units.METRE)
+                .setParameter("False northing",                    2200000, Units.METRE)
                 .setCodeSpace(Citations.EPSG, Constants.EPSG)
                 .addName("NTF (Paris) / Lambert zone II")
                 .addIdentifier("27572")
@@ -133,11 +131,11 @@ public final strictfp class DefaultProje
      * or something equivalent.
      */
     private static void verifyParameters(final ParameterValueGroup pg) {
-        assertEquals("Latitude of natural origin",    52,          pg.parameter("Latitude of natural origin")    .doubleValue(NonSI.GRADE), STRICT);
-        assertEquals("Longitude of natural origin",    0,          pg.parameter("Longitude of natural origin")   .doubleValue(NonSI.GRADE), STRICT);
+        assertEquals("Latitude of natural origin",    52,          pg.parameter("Latitude of natural origin")    .doubleValue(Units.GRAD),  STRICT);
+        assertEquals("Longitude of natural origin",    0,          pg.parameter("Longitude of natural origin")   .doubleValue(Units.GRAD),  STRICT);
         assertEquals("Scale factor at natural origin", 0.99987742, pg.parameter("Scale factor at natural origin").doubleValue(),            STRICT);
-        assertEquals("False easting",             600000,          pg.parameter("False easting")                 .doubleValue(SI.METRE),    STRICT);
-        assertEquals("False northing",           2200000,          pg.parameter("False northing")                .doubleValue(SI.METRE),    STRICT);
+        assertEquals("False easting",             600000,          pg.parameter("False easting")                 .doubleValue(Units.METRE), STRICT);
+        assertEquals("False northing",           2200000,          pg.parameter("False northing")                .doubleValue(Units.METRE), STRICT);
     }
 
     /**
@@ -155,7 +153,7 @@ public final strictfp class DefaultProje
                 "    DATUM[“Nouvelle Triangulation Francaise”,\n" +
                 "      SPHEROID[“NTF”, 6378249.2, 293.4660212936269]],\n" +
                 "      PRIMEM[“Paris”, 2.5969213],\n" +
-                "    UNIT[“grade”, 0.015707963267948967],\n" +
+                "    UNIT[“grad”, 0.015707963267948967],\n" +
                 "    AXIS[“Longitude”, EAST],\n" +
                 "    AXIS[“Latitude”, NORTH]],\n" +
                 "  PROJECTION[“Lambert_Conformal_Conic_1SP”, AUTHORITY[“EPSG”, “9801”]],\n" +
@@ -186,7 +184,7 @@ public final strictfp class DefaultProje
                 "    DATUM[“Nouvelle Triangulation Francaise”,\n" +
                 "      SPHEROID[“NTF”, 6378249.2, 293.4660212936269]],\n" +
                 "      PRIMEM[“Paris”, 2.33722917],\n" +                    // Note the conversion from 2.5969213 grads.
-                "    UNIT[“grade”, 0.015707963267948967],\n" +
+                "    UNIT[“grad”, 0.015707963267948967],\n" +
                 "    AXIS[“Longitude”, EAST],\n" +
                 "    AXIS[“Latitude”, NORTH]],\n" +
                 "  PROJECTION[“Lambert_Conformal_Conic_1SP”, AUTHORITY[“EPSG”, “9801”]],\n" +
@@ -257,7 +255,7 @@ public final strictfp class DefaultProje
                 "    CS[ellipsoidal, 2],\n" +
                 "      Axis[“Longitude (λ)”, east],\n" +
                 "      Axis[“Latitude (φ)”, north],\n" +
-                "      Unit[“grade”, 0.015707963267948967, Id[“EPSG”, 9105]]],\n" +
+                "      Unit[“grad”, 0.015707963267948967, Id[“EPSG”, 9105]]],\n" +
                 "  Conversion[“Lambert zone II”,\n" +
                 "    Method[“Lambert Conic Conformal (1SP)”, Id[“EPSG”, 9801], Id[“GeoTIFF”, 9]],\n" +
                 "    Parameter[“Latitude of natural origin”, 52.0, Id[“EPSG”, 8801]],\n" +
@@ -288,7 +286,7 @@ public final strictfp class DefaultProje
                 "    Datum[“Nouvelle Triangulation Francaise”,\n" +
                 "      Ellipsoid[“NTF”, 6378249.2, 293.4660212936269]],\n" +
                 "      PrimeMeridian[“Paris”, 2.5969213],\n" +
-                "    Unit[“grade”, 0.015707963267948967]],\n" +
+                "    Unit[“grad”, 0.015707963267948967]],\n" +
                 "  Conversion[“Lambert zone II”,\n" +
                 "    Method[“Lambert Conic Conformal (1SP)”],\n" +
                 "    Parameter[“Latitude of natural origin”, 52.0],\n" +
@@ -312,11 +310,11 @@ public final strictfp class DefaultProje
                 "  BaseGeodCRS[“NTF (Paris)”,\n" +
                 "    Datum[“Nouvelle Triangulation Francaise”,\n" +
                 "      Ellipsoid[“NTF”, 6378249.2, 293.4660212936269]],\n" +
-                "      PrimeMeridian[“Paris”, 2.5969213, Unit[“grade”, 0.015707963267948967]],\n" +
+                "      PrimeMeridian[“Paris”, 2.5969213, Unit[“grad”, 0.015707963267948967]],\n" +
                 "    Unit[“degree”, 0.017453292519943295]],\n" +
                 "  Conversion[“Lambert zone II”,\n" +
                 "    Method[“Lambert Conic Conformal (1SP)”],\n" +
-                "    Parameter[“Latitude of natural origin”, 52.0, Unit[“grade”, 0.015707963267948967]],\n" +
+                "    Parameter[“Latitude of natural origin”, 52.0, Unit[“grad”, 0.015707963267948967]],\n" +
                 "    Parameter[“Longitude of natural origin”, 0.0],\n" +
                 "    Parameter[“Scale factor at natural origin”, 0.99987742],\n" +
                 "    Parameter[“False easting”, 600000.0],\n" +
@@ -344,10 +342,10 @@ public final strictfp class DefaultProje
                 "  BASEGEODCRS[“NTF (Paris)”,\n" +
                 "    DATUM[“Nouvelle Triangulation Francaise”,\n" +
                 "      ELLIPSOID[“NTF”, 6378249.2, 293.4660212936269, LENGTHUNIT[“metre”, 1]]],\n" +
-                "      PRIMEM[“Paris”, 2.5969213, ANGLEUNIT[“grade”, 0.015707963267948967]]],\n" +
+                "      PRIMEM[“Paris”, 2.5969213, ANGLEUNIT[“grad”, 0.015707963267948967]]],\n" +
                 "  CONVERSION[“Lambert zone II”,\n" +
                 "    METHOD[“Lambert Conic Conformal (1SP)”, ID[“EPSG”, 9801]],\n" +
-                "    PARAMETER[“Latitude of natural origin”, 52.0, ANGLEUNIT[“grade”, 0.015707963267948967], ID[“EPSG”, 8801]],\n" +
+                "    PARAMETER[“Latitude of natural origin”, 52.0, ANGLEUNIT[“grad”, 0.015707963267948967], ID[“EPSG”, 8801]],\n" +
                 "    PARAMETER[“Longitude of natural origin”, 0.0, ANGLEUNIT[“degree”, 0.017453292519943295], ID[“EPSG”, 8802]],\n" +
                 "    PARAMETER[“Scale factor at natural origin”, 0.99987742, SCALEUNIT[“unity”, 1], ID[“EPSG”, 8805]],\n" +
                 "    PARAMETER[“False easting”, 600000.0, LENGTHUNIT[“metre”, 1], ID[“EPSG”, 8806]],\n" +
@@ -364,11 +362,11 @@ public final strictfp class DefaultProje
                 "  BaseGeodCRS[“NTF (Paris)”,\n" +
                 "    Datum[“Nouvelle Triangulation Francaise”,\n" +
                 "      Ellipsoid[“NTF”, 6378249.2, 293.4660212936269]],\n" +
-                "      PrimeMeridian[“Paris”, 2.5969213, Unit[“grade”, 0.015707963267948967]],\n" +
+                "      PrimeMeridian[“Paris”, 2.5969213, Unit[“grad”, 0.015707963267948967]],\n" +
                 "    Unit[“degree”, 0.017453292519943295]],\n" +
                 "  Conversion[“Lambert zone II”,\n" +
                 "    Method[“Lambert Conic Conformal (1SP)”],\n" +
-                "    Parameter[“Latitude of natural origin”, 52.0, Unit[“grade”, 0.015707963267948967]],\n" +
+                "    Parameter[“Latitude of natural origin”, 52.0, Unit[“grad”, 0.015707963267948967]],\n" +
                 "    Parameter[“Longitude of natural origin”, 0.0],\n" +
                 "    Parameter[“Scale factor at natural origin”, 0.99987742],\n" +
                 "    Parameter[“False easting”, 600000.0],\n" +
@@ -396,8 +394,8 @@ public final strictfp class DefaultProje
         final ProjectedCRS crs = new GeodeticObjectBuilder()
                 .setConversionMethod("Mercator (variant A)")
                 .setConversionName("Popular Visualisation Pseudo-Mercator")
-                .setParameter("semi-major", 6378137, SI.METRE)
-                .setParameter("semi-minor", 6378137, SI.METRE)
+                .setParameter("semi-major", 6378137, Units.METRE)
+                .setParameter("semi-minor", 6378137, Units.METRE)
                 .addName("WGS 84 / Pseudo-Mercator")
                 .createProjectedCRS(HardCodedCRS.WGS84, HardCodedCS.PROJECTED);
 
@@ -439,8 +437,8 @@ public final strictfp class DefaultProje
         final ProjectedCRS crs = new GeodeticObjectBuilder()
                 .setConversionMethod("Equirectangular")
                 .setConversionName("Equidistant Cylindrical (Spherical)")
-                .setParameter("False easting",  1000, SI.METRE)
-                .setParameter("False northing", 2000, SI.METRE)
+                .setParameter("False easting",  1000, Units.METRE)
+                .setParameter("False northing", 2000, Units.METRE)
                 .addName("Equidistant Cylindrical (Spherical)")
                 .createProjectedCRS(HardCodedCRS.WGS84, HardCodedCS.PROJECTED);
 

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -79,7 +79,7 @@ public final strictfp class HardCodedCRS
      * A two-dimensional geographic coordinate reference system using the Paris prime meridian.
      * This CRS uses (<var>longitude</var>, <var>latitude</var>) ordinates with longitude values
      * increasing towards the East and latitude values increasing towards the North.
-     * The angular units for the prime meridian and the axes are grades.
+     * The angular units for the prime meridian and the axes are grads.
      *
      * <p>This CRS is equivalent to {@code EPSG:4807} except for axis order, since EPSG defines
      * (<var>latitude</var>, <var>longitude</var>).</p>
@@ -95,10 +95,10 @@ public final strictfp class HardCodedCRS
      * This CRS uses (<var>longitude</var>, <var>latitude</var>) ordinates with longitude values
      * increasing towards the East and latitude values increasing towards the North.
      * The angular units are decimal degrees except for the prime meridian (Paris),
-     * which is measured in grades.
+     * which is measured in grads.
      *
      * <p>This CRS is equivalent to {@code EPSG:4807} except for axis order and units of measurement,
-     * since EPSG defines (<var>latitude</var>, <var>longitude</var>) in grades. The main purpose of
+     * since EPSG defines (<var>latitude</var>, <var>longitude</var>) in grads.  The main purpose of
      * this CRS is to test the convolved case where the unit of prime meridian is different than the
      * axis units.</p>
      *

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/AbstractCSTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -16,9 +16,9 @@
  */
 package org.apache.sis.referencing.cs;
 
-import javax.measure.unit.SI;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
+import org.apache.sis.measure.Units;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
@@ -101,9 +101,9 @@ public final strictfp class AbstractCSTe
          * if it is not really the purpose of this test.
          */
         final DefaultCoordinateSystemAxis EASTING = new DefaultCoordinateSystemAxis(
-                singletonMap(NAME_KEY, Vocabulary.format(Vocabulary.Keys.Unnamed)), "E", AxisDirection.EAST, SI.METRE);
+                singletonMap(NAME_KEY, Vocabulary.format(Vocabulary.Keys.Unnamed)), "E", AxisDirection.EAST, Units.METRE);
         final DefaultCoordinateSystemAxis HEIGHT = new DefaultCoordinateSystemAxis(
-                singletonMap(NAME_KEY, "Height"), "h", AxisDirection.UP, SI.METRE);
+                singletonMap(NAME_KEY, "Height"), "h", AxisDirection.UP, Units.METRE);
         assertEquals("minimumValue", Double.NEGATIVE_INFINITY, EASTING.getMinimumValue(), STRICT);
         assertEquals("maximumValue", Double.POSITIVE_INFINITY, EASTING.getMaximumValue(), STRICT);
         assertNull  ("rangeMeaning", EASTING.getRangeMeaning());

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -16,10 +16,8 @@
  */
 package org.apache.sis.referencing.cs;
 
-import javax.measure.unit.SI;
-import javax.measure.unit.NonSI;
-import javax.measure.unit.Unit;
-import javax.measure.converter.ConversionException;
+import javax.measure.Unit;
+import javax.measure.IncommensurableException;
 import org.opengis.referencing.operation.Matrix;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.CoordinateSystem;
@@ -164,10 +162,10 @@ public final strictfp class CoordinateSy
      * Tests {@link CoordinateSystems#swapAndScaleAxes(CoordinateSystem, CoordinateSystem)} for (λ,φ) ↔ (φ,λ).
      * This very common conversion is of critical importance to Apache SIS.
      *
-     * @throws ConversionException Should not happen.
+     * @throws IncommensurableException if a conversion between incompatible units was attempted.
      */
     @Test
-    public void testSwapAndScaleAxes2D() throws ConversionException {
+    public void testSwapAndScaleAxes2D() throws IncommensurableException {
         final CoordinateSystem λφ = new DefaultEllipsoidalCS(singletonMap(NAME_KEY, "(λ,φ)"),
                 HardCodedAxes.GEODETIC_LONGITUDE,
                 HardCodedAxes.GEODETIC_LATITUDE);
@@ -188,11 +186,11 @@ public final strictfp class CoordinateSy
      * Tests {@link CoordinateSystems#swapAndScaleAxes(CoordinateSystem, CoordinateSystem)} for (λ,φ,h) ↔ (φ,λ,h).
      * This very common conversion is of critical importance to Apache SIS.
      *
-     * @throws ConversionException Should not happen.
+     * @throws IncommensurableException if a conversion between incompatible units was attempted.
      */
     @Test
     @DependsOnMethod("testSwapAndScaleAxes2D")
-    public void testSwapAndScaleAxes3D() throws ConversionException {
+    public void testSwapAndScaleAxes3D() throws IncommensurableException {
         final CoordinateSystem λφh = new DefaultEllipsoidalCS(singletonMap(NAME_KEY, "(λ,φ,h)"),
                 HardCodedAxes.GEODETIC_LONGITUDE,
                 HardCodedAxes.GEODETIC_LATITUDE,
@@ -216,11 +214,11 @@ public final strictfp class CoordinateSy
      * Tests {@link CoordinateSystems#swapAndScaleAxes(CoordinateSystem, CoordinateSystem)}
      * with a more arbitrary case, which include unit conversions.
      *
-     * @throws ConversionException Should not happen.
+     * @throws IncommensurableException if a conversion between incompatible units was attempted.
      */
     @Test
     @DependsOnMethod("testSwapAndScaleAxes3D")
-    public void testSwapAndScaleAxes() throws ConversionException {
+    public void testSwapAndScaleAxes() throws IncommensurableException {
         final CoordinateSystem hxy = new DefaultCartesianCS(singletonMap(NAME_KEY, "(h,x,y)"),
                 HardCodedAxes.HEIGHT_cm,
                 HardCodedAxes.EASTING,
@@ -247,14 +245,14 @@ public final strictfp class CoordinateSy
     /**
      * Tests {@link CoordinateSystems#swapAndScaleAxes(CoordinateSystem, CoordinateSystem)} with a non-square matrix.
      *
-     * @throws ConversionException Should not happen.
+     * @throws IncommensurableException if a conversion between incompatible units was attempted.
      */
     @Test
     @DependsOnMethod("testSwapAndScaleAxes")
-    public void testScaleAndSwapAxesNonSquare() throws ConversionException {
+    public void testScaleAndSwapAxesNonSquare() throws IncommensurableException {
         final DefaultCartesianCS cs = new DefaultCartesianCS(singletonMap(NAME_KEY, "Test"),
-                new DefaultCoordinateSystemAxis(getProperties(HardCodedAxes.SOUTHING), "y", AxisDirection.SOUTH, SI.CENTIMETRE),
-                new DefaultCoordinateSystemAxis(getProperties(HardCodedAxes.EASTING),  "x", AxisDirection.EAST,  SI.MILLIMETRE));
+                new DefaultCoordinateSystemAxis(getProperties(HardCodedAxes.SOUTHING), "y", AxisDirection.SOUTH, Units.CENTIMETRE),
+                new DefaultCoordinateSystemAxis(getProperties(HardCodedAxes.EASTING),  "x", AxisDirection.EAST,  Units.MILLIMETRE));
 
         Matrix matrix = swapAndScaleAxes(HardCodedCS.CARTESIAN_2D, cs);
         assertMatrixEquals("(x,y) → (y,x)", Matrices.create(3, 3, new double[] {
@@ -288,7 +286,7 @@ public final strictfp class CoordinateSy
             @Override
             public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) {
                 if (Units.isAngular(unit)) {
-                    unit = NonSI.GRADE;
+                    unit = Units.GRAD;
                 }
                 return unit;
             }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -18,11 +18,11 @@ package org.apache.sis.referencing.cs;
 
 import java.util.Map;
 import javax.xml.bind.JAXBException;
-import javax.measure.unit.SI;
 import org.opengis.test.Validators;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.apache.sis.referencing.GeodeticObjectVerifier;
+import org.apache.sis.measure.Units;
 import org.apache.sis.test.XMLTestCase;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.DependsOnMethod;
@@ -39,7 +39,7 @@ import static org.apache.sis.test.Refere
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.5
+ * @version 0.8
  * @module
  */
 @DependsOn({
@@ -131,7 +131,7 @@ public final strictfp class DefaultCarte
         if (c.equals(AxisDirection.EAST))  return HardCodedAxes.EASTING;
         if (c.equals(AxisDirection.SOUTH)) return HardCodedAxes.SOUTHING;
         if (c.equals(AxisDirection.WEST))  return HardCodedAxes.WESTING;
-        return new DefaultCoordinateSystemAxis(singletonMap(NAME_KEY, c.name()), "?", c, SI.METRE);
+        return new DefaultCoordinateSystemAxis(singletonMap(NAME_KEY, c.name()), "?", c, Units.METRE);
     }
 
     /**
@@ -218,8 +218,8 @@ public final strictfp class DefaultCarte
         assertEpsgIdentifierEquals("4400", getSingleton(cs.getIdentifiers()));
         assertEpsgIdentifierEquals("1",    getSingleton(E.getIdentifiers()));
         assertEpsgIdentifierEquals("2",    getSingleton(N.getIdentifiers()));
-        assertAxisEquals("Easting",  "E", AxisDirection.EAST,  Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null, E);
-        assertAxisEquals("Northing", "N", AxisDirection.NORTH, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null, N);
+        assertAxisEquals("Easting",  "E", AxisDirection.EAST,  Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Units.METRE, null, E);
+        assertAxisEquals("Northing", "N", AxisDirection.NORTH, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Units.METRE, null, N);
         /*
          * Marshal and compare with the original file.
          */

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxisTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxisTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxisTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxisTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -16,11 +16,10 @@
  */
 package org.apache.sis.referencing.cs;
 
-import javax.measure.unit.SI;
-import javax.measure.unit.NonSI;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.RangeMeaning;
 import org.opengis.test.Validators;
+import org.apache.sis.measure.Units;
 import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.test.DependsOnMethod;
@@ -39,7 +38,7 @@ import static org.apache.sis.referencing
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.6
+ * @version 0.8
  * @module
  */
 @DependsOn({
@@ -92,8 +91,8 @@ public final strictfp class DefaultCoord
         assertWktEquals("AXIS[“x”, east, LENGTHUNIT[“metre”, 1]]",  X);
         assertWktEquals("AXIS[“y”, north, LENGTHUNIT[“metre”, 1]]", Y);
         assertWktEquals("AXIS[“z”, up, LENGTHUNIT[“metre”, 1]]",    Z);
-        assertWktEquals("AXIS[“Longitude (λ)”, east, ANGLEUNIT[“grade”, 0.015707963267948967]]",             LONGITUDE_gon);
-        assertWktEquals("AXIS[“Latitude (φ)”, north, ANGLEUNIT[“grade”, 0.015707963267948967]]",             LATITUDE_gon);
+        assertWktEquals("AXIS[“Longitude (λ)”, east, ANGLEUNIT[“grad”, 0.015707963267948967]]",              LONGITUDE_gon);
+        assertWktEquals("AXIS[“Latitude (φ)”, north, ANGLEUNIT[“grad”, 0.015707963267948967]]",              LATITUDE_gon);
         assertWktEquals("AXIS[“Altitude (h)”, up, LENGTHUNIT[“metre”, 1]]",                                  ALTITUDE);
         assertWktEquals("AXIS[“Time (t)”, future, TIMEUNIT[“day”, 86400]]",                                  TIME);
         assertWktEquals("AXIS[“Longitude (λ)”, east, ANGLEUNIT[“degree”, 0.017453292519943295]]",            GEODETIC_LONGITUDE);
@@ -118,7 +117,7 @@ public final strictfp class DefaultCoord
     public void testMeridianWKT() {
         assertWktEquals("AXIS[“South along 90°W (x)”, south, MERIDIAN[-90.0, ANGLEUNIT[“degree”, 0.017453292519943295]], LENGTHUNIT[“metre”, 1]]",
                 new DefaultCoordinateSystemAxis(singletonMap(DefaultCoordinateSystemAxis.NAME_KEY, "South along 90°W"),
-                        "x", new DirectionAlongMeridian(AxisDirection.SOUTH, -90).getDirection(), SI.METRE));
+                        "x", new DirectionAlongMeridian(AxisDirection.SOUTH, -90).getDirection(), Units.METRE));
     }
 
     /**
@@ -146,9 +145,9 @@ public final strictfp class DefaultCoord
          * (GEODETIC_LONGITUDE, GEODETIC_LATITUDE) except for the name.
          */
         final DefaultCoordinateSystemAxis LONGITUDE = new DefaultCoordinateSystemAxis(getProperties(LONGITUDE_gon),
-                "λ", AxisDirection.EAST, NonSI.DEGREE_ANGLE);
+                "λ", AxisDirection.EAST, Units.DEGREE);
         final DefaultCoordinateSystemAxis LATITUDE = new DefaultCoordinateSystemAxis(getProperties(LATITUDE_gon),
-                "φ", AxisDirection.NORTH, NonSI.DEGREE_ANGLE);
+                "φ", AxisDirection.NORTH, Units.DEGREE);
         /*
          * Verifies the properties inferred by the constructor.
          */

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCylindricalCSTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,10 +17,10 @@
 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.measure.Units;
 import org.apache.sis.test.TestCase;
 import org.apache.sis.test.DependsOn;
 import org.junit.Test;
@@ -33,7 +33,7 @@ import static org.apache.sis.test.Assert
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  */
 @DependsOn(DefaultPolarCSTest.class)
@@ -60,7 +60,7 @@ public final strictfp class DefaultCylin
     @Test
     public void testChangeAxisOrder() {
         final DefaultCoordinateSystemAxis radius = HardCodedAxes.create("Radius", "r",
-                AxisDirection.SOUTH, SI.METRE, 0, Double.POSITIVE_INFINITY, RangeMeaning.EXACT);
+                AxisDirection.SOUTH, Units.METRE, 0, Double.POSITIVE_INFINITY, RangeMeaning.EXACT);
 
         final DefaultCylindricalCS cs = new DefaultCylindricalCS(
                 Collections.singletonMap(DefaultCylindricalCS.NAME_KEY, "Cylindrical"),

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,11 +17,11 @@
 package org.apache.sis.referencing.cs;
 
 import javax.xml.bind.JAXBException;
-import javax.measure.unit.NonSI;
 import org.opengis.test.Validators;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.opengis.referencing.cs.RangeMeaning;
+import org.apache.sis.measure.Units;
 import org.apache.sis.test.XMLTestCase;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.DependsOnMethod;
@@ -37,7 +37,7 @@ import static org.apache.sis.test.TestUt
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.8
  * @module
  */
 @DependsOn(AbstractCSTest.class)
@@ -99,7 +99,7 @@ public final strictfp class DefaultEllip
     public void testUnitConversion() {
         final DefaultEllipsoidalCS cs = HardCodedCS.ELLIPSOIDAL_gon;
         CoordinateSystemAxis axis = cs.getAxis(0);
-        assertEquals("unit", NonSI.GRADE, axis.getUnit());
+        assertEquals("unit", Units.GRAD, axis.getUnit());
         assertEquals("longitude.minimumValue", -200, axis.getMinimumValue(), STRICT);
         assertEquals("longitude.maximumValue", +200, axis.getMaximumValue(), STRICT);
 
@@ -108,7 +108,7 @@ public final strictfp class DefaultEllip
         Validators.validate(converted);
 
         axis = converted.getAxis(0);
-        assertEquals("unit", NonSI.DEGREE_ANGLE, axis.getUnit());
+        assertEquals("unit", Units.DEGREE, axis.getUnit());
         assertEquals("longitude.minimumValue", -180, axis.getMinimumValue(), STRICT);
         assertEquals("longitude.maximumValue", +180, axis.getMaximumValue(), STRICT);
     }
@@ -131,8 +131,8 @@ public final strictfp class DefaultEllip
         final CoordinateSystemAxis λ = cs.getAxis(1);
         assertEquals("name",    "Latitude (north), Longitude (east)",     cs.getName().getCode());
         assertEquals("remarks", "Used in two-dimensional GeographicCRS.", cs.getRemarks().toString());
-        assertAxisEquals("Geodetic latitude",  "φ", AxisDirection.NORTH, -90,  +90, NonSI.DEGREE_ANGLE, RangeMeaning.EXACT, φ);
-        assertAxisEquals("Geodetic longitude", "λ", AxisDirection.EAST, -180, +180, NonSI.DEGREE_ANGLE, RangeMeaning.WRAPAROUND, λ);
+        assertAxisEquals("Geodetic latitude",  "φ", AxisDirection.NORTH, -90,  +90, Units.DEGREE, RangeMeaning.EXACT, φ);
+        assertAxisEquals("Geodetic longitude", "λ", AxisDirection.EAST, -180, +180, Units.DEGREE, RangeMeaning.WRAPAROUND, λ);
         assertEpsgIdentifierEquals("6422", getSingleton(cs.getIdentifiers()));
         assertEpsgIdentifierEquals("106",  getSingleton(φ.getIdentifiers()));
         assertEpsgIdentifierEquals("107",  getSingleton(λ.getIdentifiers()));

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultPolarCSTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultPolarCSTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultPolarCSTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultPolarCSTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,10 +17,10 @@
 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.measure.Units;
 import org.apache.sis.test.TestCase;
 import org.apache.sis.test.DependsOn;
 import org.junit.Test;
@@ -33,7 +33,7 @@ import static org.apache.sis.test.Assert
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  */
 @DependsOn(AbstractCSTest.class)
@@ -59,7 +59,7 @@ public final strictfp class DefaultPolar
     @Test
     public void testChangeAxisOrder() {
         final DefaultCoordinateSystemAxis radius = HardCodedAxes.create("Radius", "r",
-                AxisDirection.SOUTH, SI.METRE, 0, Double.POSITIVE_INFINITY, RangeMeaning.EXACT);
+                AxisDirection.SOUTH, Units.METRE, 0, Double.POSITIVE_INFINITY, RangeMeaning.EXACT);
 
         final DefaultPolarCS cs = new DefaultPolarCS(
                 Collections.singletonMap(DefaultPolarCS.NAME_KEY, "Polar"),

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -18,13 +18,12 @@ package org.apache.sis.referencing.cs;
 
 import java.util.Map;
 import java.util.HashMap;
-import javax.measure.unit.Unit;
-import javax.measure.unit.SI;
-import javax.measure.unit.NonSI;
+import javax.measure.Unit;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.RangeMeaning;
 import org.apache.sis.internal.metadata.AxisNames;
 import org.apache.sis.internal.metadata.AxisDirections;
+import org.apache.sis.measure.Units;
 
 
 /**
@@ -32,14 +31,14 @@ import org.apache.sis.internal.metadata.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  */
 public final strictfp class HardCodedAxes {
     /**
      * Axis for geodetic longitudes in a {@linkplain org.apache.sis.referencing.crs.DefaultGeographicCRS geographic CRS}.
      * Increasing ordinates values go {@linkplain AxisDirection#EAST East}
-     * and units are {@linkplain NonSI#DEGREE_ANGLE degrees}.
+     * and units are {@linkplain Units#DEGREE degrees}.
      * The ISO 19111 name is <cite>"geodetic longitude"</cite> and the abbreviation is "λ" (lambda).
      *
      * <p>This axis is usually part of a {@link #GEODETIC_LONGITUDE}, {@link #GEODETIC_LATITUDE},
@@ -49,12 +48,12 @@ public final strictfp class HardCodedAxe
      * @see #GEODETIC_LATITUDE
      */
     public static final DefaultCoordinateSystemAxis GEODETIC_LONGITUDE = create(AxisNames.GEODETIC_LONGITUDE, "λ",
-            AxisDirection.EAST, NonSI.DEGREE_ANGLE, -180, 180, RangeMeaning.WRAPAROUND);
+            AxisDirection.EAST, Units.DEGREE, -180, 180, RangeMeaning.WRAPAROUND);
 
     /**
      * Axis for geodetic latitudes in a {@linkplain org.apache.sis.referencing.crs.DefaultGeographicCRS geographic CRS}.
      * Increasing ordinates values go {@linkplain AxisDirection#NORTH North}
-     * and units are {@linkplain NonSI#DEGREE_ANGLE degrees}.
+     * and units are {@linkplain Units#DEGREE degrees}.
      * The ISO 19111 name is <cite>"geodetic latitude"</cite> and the abbreviation is "φ" (phi).
      *
      * <p>This axis is usually part of a {@link #GEODETIC_LONGITUDE}, {@link #GEODETIC_LATITUDE},
@@ -64,42 +63,42 @@ public final strictfp class HardCodedAxe
      * @see #GEODETIC_LONGITUDE
      */
     public static final DefaultCoordinateSystemAxis GEODETIC_LATITUDE = create(AxisNames.GEODETIC_LATITUDE, "φ",
-            AxisDirection.NORTH, NonSI.DEGREE_ANGLE, -90, 90, RangeMeaning.EXACT);
+            AxisDirection.NORTH, Units.DEGREE, -90, 90, RangeMeaning.EXACT);
 
     /**
      * Identical to {@link #GEODETIC_LONGITUDE} except for the range of longitude values.
      */
     public static final DefaultCoordinateSystemAxis SHIFTED_LONGITUDE = create(AxisNames.GEODETIC_LONGITUDE, "λ",
-            AxisDirection.EAST, NonSI.DEGREE_ANGLE, 0, 360, RangeMeaning.WRAPAROUND);
+            AxisDirection.EAST, Units.DEGREE, 0, 360, RangeMeaning.WRAPAROUND);
 
     /**
-     * Axis for longitudes in gradian units.
+     * Axis for longitudes in grad units.
      * The axis name is {@code "Longitude"} (the {@code "Geodetic"} prefix is omitted for testing purpose).
-     * Increasing ordinates values go {@linkplain AxisDirection#EAST East} and units are {@link NonSI#GRADE}.
+     * Increasing ordinates values go {@linkplain AxisDirection#EAST East} and units are {@link Units#GRAD}.
      * The abbreviation is "λ" (lambda). The unit symbol is "gon".
      *
      * @see #GEODETIC_LONGITUDE
      * @see #SPHERICAL_LONGITUDE
      */
     public static final DefaultCoordinateSystemAxis LONGITUDE_gon = create(AxisNames.LONGITUDE, "λ",
-            AxisDirection.EAST, NonSI.GRADE, -200, 200, RangeMeaning.WRAPAROUND);
+            AxisDirection.EAST, Units.GRAD, -200, 200, RangeMeaning.WRAPAROUND);
 
     /**
-     * Axis for latitudes in gradian units.
+     * Axis for latitudes in grad units.
      * The axis name is {@code "Latitude"} (the {@code "Geodetic"} prefix is omitted for testing purpose).
-     * Increasing ordinates values go {@linkplain AxisDirection#NORTH North} and units are {@link NonSI#GRADE}.
+     * Increasing ordinates values go {@linkplain AxisDirection#NORTH North} and units are {@link Units#GRAD}.
      * The abbreviation is "φ" (phi). The unit symbol is "gon".
      *
      * @see #GEODETIC_LATITUDE
      * @see #SPHERICAL_LATITUDE
      */
     public static final DefaultCoordinateSystemAxis LATITUDE_gon = create(AxisNames.LATITUDE, "φ",
-            AxisDirection.NORTH, NonSI.GRADE, -100, 100, RangeMeaning.EXACT);
+            AxisDirection.NORTH, Units.GRAD, -100, 100, RangeMeaning.EXACT);
 
     /**
      * Axis for height values above the ellipsoid in a
      * {@linkplain org.apache.sis.referencing.crs.DefaultGeographicCRS geographic CRS}.
-     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain SI#METRE metres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain Units#METRE metres}.
      * The ISO 19111 name is <cite>"ellipsoidal height"</cite> and the abbreviation is lower case <cite>"h"</cite>.
      *
      * <p>This axis is usually part of a {@link #GEODETIC_LONGITUDE}, {@link #GEODETIC_LATITUDE},
@@ -111,21 +110,21 @@ public final strictfp class HardCodedAxe
      * @see #DEPTH
      */
     public static final DefaultCoordinateSystemAxis ELLIPSOIDAL_HEIGHT = create(AxisNames.ELLIPSOIDAL_HEIGHT, "h",
-            AxisDirection.UP, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.UP, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for height values above the ellipsoid in a
      * {@linkplain org.apache.sis.referencing.crs.DefaultGeographicCRS geographic CRS}.
-     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain SI#CENTIMETRE centimetres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain Units#CENTIMETRE centimetres}.
      *
      * @since 0.7
      */
     public static final DefaultCoordinateSystemAxis ELLIPSOIDAL_HEIGHT_cm = create(AxisNames.ELLIPSOIDAL_HEIGHT, "h",
-            AxisDirection.UP, SI.CENTIMETRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.UP, Units.CENTIMETRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for height values measured from gravity.
-     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain SI#METRE metres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain Units#METRE metres}.
      * The ISO 19111 name is <cite>"gravity-related height"</cite> and the abbreviation is upper case <cite>"H"</cite>.
      *
      * @see #ALTITUDE
@@ -134,17 +133,17 @@ public final strictfp class HardCodedAxe
      * @see #DEPTH
      */
     public static final DefaultCoordinateSystemAxis GRAVITY_RELATED_HEIGHT = create(AxisNames.GRAVITY_RELATED_HEIGHT, "H",
-            AxisDirection.UP, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.UP, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * A height in centimetres.
      */
     public static final DefaultCoordinateSystemAxis HEIGHT_cm = create("Height", "h",
-            AxisDirection.UP, SI.CENTIMETRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.UP, Units.CENTIMETRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for altitude values.
-     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain SI#METRE metres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain Units#METRE metres}.
      * The abbreviation is lower case <cite>"h"</cite>.
      *
      * <p>This axis is usually part of a {@link #GEODETIC_LONGITUDE}, {@link #GEODETIC_LATITUDE},
@@ -156,11 +155,11 @@ public final strictfp class HardCodedAxe
      * @see #DEPTH
      */
     public static final DefaultCoordinateSystemAxis ALTITUDE = create("Altitude", "h",
-            AxisDirection.UP, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.UP, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for depth.
-     * Increasing ordinates values go {@linkplain AxisDirection#DOWN down} and units are {@linkplain SI#METRE metres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#DOWN down} and units are {@linkplain Units#METRE metres}.
      * The ISO 19111 name is <cite>"depth"</cite>.
      *
      * @see #ALTITUDE
@@ -169,12 +168,12 @@ public final strictfp class HardCodedAxe
      * @see #GRAVITY_RELATED_HEIGHT
      */
     public static final DefaultCoordinateSystemAxis DEPTH = create(AxisNames.DEPTH, "D",
-            AxisDirection.DOWN, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.DOWN, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for radius in a {@linkplain org.apache.sis.referencing.crs.DefaultGeocentricCRS geocentric CRS}
      * using {@linkplain org.apache.sis.referencing.cs.DefaultSphericalCS spherical CS}.
-     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain SI#METRE metres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain Units#METRE metres}.
      * The ISO 19111 name is <cite>"geocentric radius"</cite> and the abbreviation is upper-case <cite>"R"</cite>.
      *
      * <div class="note"><b>Note:</b>
@@ -193,13 +192,13 @@ public final strictfp class HardCodedAxe
      * @see #DEPTH
      */
     public static final DefaultCoordinateSystemAxis GEOCENTRIC_RADIUS = create(AxisNames.GEOCENTRIC_RADIUS, "R",
-            AxisDirection.UP, SI.METRE, 0, Double.POSITIVE_INFINITY, RangeMeaning.EXACT);
+            AxisDirection.UP, Units.METRE, 0, Double.POSITIVE_INFINITY, RangeMeaning.EXACT);
 
     /**
      * Axis for longitudes in a {@linkplain org.apache.sis.referencing.crs.DefaultGeocentricCRS geocentric CRS}
      * using {@linkplain org.apache.sis.referencing.cs.DefaultSphericalCS spherical CS}.
      * Increasing ordinates values go {@linkplain AxisDirection#EAST East}
-     * and units are {@linkplain NonSI#DEGREE_ANGLE degrees}.
+     * and units are {@linkplain Units#DEGREE degrees}.
      * The ISO 19111 name is <cite>"spherical longitude"</cite> and the abbreviation is "θ" (theta).
      *
      * <p>This axis is close to the definition found in the EPSG database, except for the "long" abbreviation which
@@ -218,13 +217,13 @@ public final strictfp class HardCodedAxe
      * @see <a href="http://mathworld.wolfram.com/SphericalCoordinates.html">Spherical coordinate system on MathWorld</a>
      */
     public static final DefaultCoordinateSystemAxis SPHERICAL_LONGITUDE = create(AxisNames.SPHERICAL_LONGITUDE, "θ",
-            AxisDirection.EAST, NonSI.DEGREE_ANGLE, -180, 180, RangeMeaning.WRAPAROUND);
+            AxisDirection.EAST, Units.DEGREE, -180, 180, RangeMeaning.WRAPAROUND);
 
     /**
      * Axis for latitudes in a {@linkplain org.apache.sis.referencing.crs.DefaultGeocentricCRS geocentric CRS}
      * using {@linkplain org.apache.sis.referencing.cs.DefaultSphericalCS spherical CS}.
      * Increasing ordinates values go {@linkplain AxisDirection#NORTH North}
-     * and units are {@linkplain NonSI#DEGREE_ANGLE degrees}.
+     * and units are {@linkplain Units#DEGREE degrees}.
      * The ISO 19111 name is <cite>"spherical latitude"</cite> and the abbreviation is "φ′" (phi prime).
      *
      * <p>This axis is close to the definition found in the EPSG database, except for the "lat" abbreviation
@@ -241,11 +240,11 @@ public final strictfp class HardCodedAxe
      * @see #SPHERICAL_LONGITUDE
      */
     public static final DefaultCoordinateSystemAxis SPHERICAL_LATITUDE = create(AxisNames.SPHERICAL_LATITUDE, "φ′",
-            AxisDirection.NORTH, NonSI.DEGREE_ANGLE, -90, 90, RangeMeaning.EXACT);
+            AxisDirection.NORTH, Units.DEGREE, -90, 90, RangeMeaning.EXACT);
 
     /**
      * Axis for <var>x</var> values in a {@linkplain org.apache.sis.referencing.cs.DefaultCartesianCS Cartesian CS}.
-     * Increasing ordinates values go {@linkplain AxisDirection#EAST East} and units are {@linkplain SI#METRE metres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#EAST East} and units are {@linkplain Units#METRE metres}.
      * The abbreviation is lower case <cite>"x"</cite>.
      *
      * <p>This axis is usually part of a {@link #X}, {@link #Y}, {@link #Z} set.</p>
@@ -257,11 +256,11 @@ public final strictfp class HardCodedAxe
      * @see #COLUMN
      */
     public static final DefaultCoordinateSystemAxis X = create("x", "x",
-            AxisDirection.EAST, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.EAST, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for <var>y</var> values in a {@linkplain org.apache.sis.referencing.cs.DefaultCartesianCS Cartesian CS}.
-     * Increasing ordinates values go {@linkplain AxisDirection#NORTH North} and units are {@linkplain SI#METRE metres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#NORTH North} and units are {@linkplain Units#METRE metres}.
      * The abbreviation is lower case <cite>"y"</cite>.
      *
      * <p>This axis is usually part of a {@link #X}, {@link #Y}, {@link #Z} set.</p>
@@ -273,23 +272,23 @@ public final strictfp class HardCodedAxe
      * @see #ROW
      */
     public static final DefaultCoordinateSystemAxis Y = create("y", "y",
-            AxisDirection.NORTH, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.NORTH, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for <var>z</var> values in a {@linkplain org.apache.sis.referencing.cs.DefaultCartesianCS Cartesian CS}.
-     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain SI#METRE metres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain Units#METRE metres}.
      * The abbreviation is lower case <cite>"z"</cite>.
      *
      * <p>This axis is usually part of a {@link #X}, {@link #Y}, {@link #Z} set.</p>
      */
     public static final DefaultCoordinateSystemAxis Z = create("z", "z",
-            AxisDirection.UP, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.UP, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for <var>x</var> values in a {@linkplain org.apache.sis.referencing.crs.DefaultGeocentricCRS geocentric CRS}
      * using {@linkplain org.apache.sis.referencing.cs.DefaultCartesianCS Cartesian CS}.
      * Increasing ordinates values goes typically toward prime meridian, but the actual axis direction
-     * is {@link AxisDirection#GEOCENTRIC_X GEOCENTRIC_X}. The units are {@linkplain SI#METRE metres}.
+     * is {@link AxisDirection#GEOCENTRIC_X GEOCENTRIC_X}. The units are {@linkplain Units#METRE metres}.
      * The ISO 19111 name is <cite>"Geocentric X"</cite> and the abbreviation is upper case <cite>"X"</cite>.
      *
      * <p>In legacy OGC 01-009 specification (still in use for WKT 1 format),
@@ -298,13 +297,13 @@ public final strictfp class HardCodedAxe
      * <p>This axis is usually part of a {@link #GEOCENTRIC_X}, {@link #GEOCENTRIC_Y}, {@link #GEOCENTRIC_Z} set.</p>
      */
     public static final DefaultCoordinateSystemAxis GEOCENTRIC_X = create(AxisNames.GEOCENTRIC_X, "X",
-            AxisDirection.GEOCENTRIC_X, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.GEOCENTRIC_X, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for <var>y</var> values in a {@linkplain org.apache.sis.referencing.crs.DefaultGeocentricCRS geocentric CRS}
      * using {@linkplain org.apache.sis.referencing.cs.DefaultCartesianCS Cartesian CS}.
      * Increasing ordinates values goes typically toward East, but the actual axis direction is
-     * {@link AxisDirection#GEOCENTRIC_Y GEOCENTRIC_Y}. The units are {@linkplain SI#METRE metres}.
+     * {@link AxisDirection#GEOCENTRIC_Y GEOCENTRIC_Y}. The units are {@linkplain Units#METRE metres}.
      * The ISO 19111 name is <cite>"Geocentric Y"</cite> and the abbreviation is upper case <cite>"Y"</cite>.
      *
      * <p>In legacy OGC 01-009 specification (still in use for WKT 1 format),
@@ -313,13 +312,13 @@ public final strictfp class HardCodedAxe
      * <p>This axis is usually part of a {@link #GEOCENTRIC_X}, {@link #GEOCENTRIC_Y}, {@link #GEOCENTRIC_Z} set.</p>
      */
     public static final DefaultCoordinateSystemAxis GEOCENTRIC_Y = create(AxisNames.GEOCENTRIC_Y, "Y",
-            AxisDirection.GEOCENTRIC_Y, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.GEOCENTRIC_Y, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for <var>z</var> values in a {@linkplain org.apache.sis.referencing.crs.DefaultGeocentricCRS geocentric CRS}
      * using {@linkplain org.apache.sis.referencing.cs.DefaultCartesianCS Cartesian CS}.
      * Increasing ordinates values goes typically toward North, but the actual axis direction is
-     * {@link AxisDirection#GEOCENTRIC_Z GEOCENTRIC_Z}. The units are {@linkplain SI#METRE metres}.
+     * {@link AxisDirection#GEOCENTRIC_Z GEOCENTRIC_Z}. The units are {@linkplain Units#METRE metres}.
      * The ISO 19111 name is <cite>"Geocentric Z"</cite> and the abbreviation is upper case <cite>"Z"</cite>.
      *
      * <p>In legacy OGC 01-009 specification (still in use for WKT 1 format),
@@ -328,11 +327,11 @@ public final strictfp class HardCodedAxe
      * <p>This axis is usually part of a {@link #GEOCENTRIC_X}, {@link #GEOCENTRIC_Y}, {@link #GEOCENTRIC_Z} set.</p>
      */
     public static final DefaultCoordinateSystemAxis GEOCENTRIC_Z = create(AxisNames.GEOCENTRIC_Z, "Z",
-            AxisDirection.GEOCENTRIC_Z, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.GEOCENTRIC_Z, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for Easting values in a {@linkplain org.apache.sis.referencing.crs.DefaultProjectedCRS projected CRS}.
-     * Increasing ordinates values go {@linkplain AxisDirection#EAST East} and units are {@linkplain SI#METRE metres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#EAST East} and units are {@linkplain Units#METRE metres}.
      * The ISO 19111 name is <cite>"easting"</cite> and the abbreviation is upper case <cite>"E"</cite>.
      *
      * <p>This axis is usually part of a {@link #EASTING}, {@link #NORTHING} set.</p>
@@ -342,11 +341,11 @@ public final strictfp class HardCodedAxe
      * @see #WESTING
      */
     public static final DefaultCoordinateSystemAxis EASTING = create(AxisNames.EASTING, "E",
-            AxisDirection.EAST, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.EAST, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for Westing values in a {@linkplain org.apache.sis.referencing.crs.DefaultProjectedCRS projected CRS}.
-     * Increasing ordinates values go {@linkplain AxisDirection#WEST West} and units are {@linkplain SI#METRE metres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#WEST West} and units are {@linkplain Units#METRE metres}.
      * The ISO 19111 name is <cite>"westing"</cite> and the abbreviation is upper case <cite>"W"</cite>.
      *
      * @see #X
@@ -354,11 +353,11 @@ public final strictfp class HardCodedAxe
      * @see #WESTING
      */
     public static final DefaultCoordinateSystemAxis WESTING = create(AxisNames.WESTING, "W",
-            AxisDirection.WEST, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.WEST, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for Northing values in a {@linkplain org.apache.sis.referencing.crs.DefaultProjectedCRS projected CRS}.
-     * Increasing ordinates values go {@linkplain AxisDirection#NORTH North} and units are {@linkplain SI#METRE metres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#NORTH North} and units are {@linkplain Units#METRE metres}.
      * The ISO 19111 name is <cite>"northing"</cite> and the abbreviation is upper case <cite>"N"</cite>.
      *
      * <p>This axis is usually part of a {@link #EASTING}, {@link #NORTHING} set.</p>
@@ -368,11 +367,11 @@ public final strictfp class HardCodedAxe
      * @see #SOUTHING
      */
     public static final DefaultCoordinateSystemAxis NORTHING = create(AxisNames.NORTHING, "N",
-            AxisDirection.NORTH, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.NORTH, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for Southing values in a {@linkplain org.apache.sis.referencing.crs.DefaultProjectedCRS projected CRS}.
-     * Increasing ordinates values go {@linkplain AxisDirection#SOUTH South} and units are {@linkplain SI#METRE metres}.
+     * Increasing ordinates values go {@linkplain AxisDirection#SOUTH South} and units are {@linkplain Units#METRE metres}.
      * The ISO 19111 name is <cite>"southing"</cite> and the abbreviation is upper case <cite>"S"</cite>.
      *
      * @see #Y
@@ -380,19 +379,19 @@ public final strictfp class HardCodedAxe
      * @see #SOUTHING
      */
     public static final DefaultCoordinateSystemAxis SOUTHING = create(AxisNames.SOUTHING, "S",
-            AxisDirection.SOUTH, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.SOUTH, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * An axis with North-East orientation.
      */
     public static final DefaultCoordinateSystemAxis NORTH_EAST = create("North-East", "NE",
-            AxisDirection.NORTH_EAST, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.NORTH_EAST, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * An axis with South-East orientation.
      */
     public static final DefaultCoordinateSystemAxis SOUTH_EAST = create("South-East", "SE",
-            AxisDirection.SOUTH_EAST, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.SOUTH_EAST, Units.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * An axis for a distance from an origin.
@@ -402,7 +401,7 @@ public final strictfp class HardCodedAxe
      * @see #GEOCENTRIC_RADIUS
      */
     public static final DefaultCoordinateSystemAxis DISTANCE = create("Distance", "r",
-            AxisDirections.AWAY_FROM, SI.METRE, 0, Double.POSITIVE_INFINITY, RangeMeaning.EXACT);
+            AxisDirections.AWAY_FROM, Units.METRE, 0, Double.POSITIVE_INFINITY, RangeMeaning.EXACT);
 
     /**
      * An axis with clockwise orientation.
@@ -410,7 +409,7 @@ public final strictfp class HardCodedAxe
      * (not to be confused with geodetic spherical coordinate system).
      */
     public static final DefaultCoordinateSystemAxis BEARING = create("Bearing", "θ",
-            AxisDirections.CLOCKWISE, NonSI.DEGREE_ANGLE, -180, +180, RangeMeaning.WRAPAROUND);
+            AxisDirections.CLOCKWISE, Units.DEGREE, -180, +180, RangeMeaning.WRAPAROUND);
 
     /**
      * An axis with for elevation angle.
@@ -418,15 +417,15 @@ public final strictfp class HardCodedAxe
      * (not to be confused with geodetic spherical coordinate system).
      */
     public static final DefaultCoordinateSystemAxis ELEVATION = create("Elevation", "φ",
-            AxisDirection.UP, NonSI.DEGREE_ANGLE, -90, +90, RangeMeaning.WRAPAROUND);
+            AxisDirection.UP, Units.DEGREE, -90, +90, RangeMeaning.WRAPAROUND);
 
     /**
      * Axis for time values in a {@linkplain org.apache.sis.referencing.cs.DefaultTimeCS time CS}.
-     * Increasing time go toward {@linkplain AxisDirection#FUTURE future} and units are {@linkplain NonSI#DAY days}.
+     * Increasing time go toward {@linkplain AxisDirection#FUTURE future} and units are {@linkplain Units#DAY days}.
      * The abbreviation is lower case <cite>"t"</cite>.
      */
     public static final DefaultCoordinateSystemAxis TIME = create("Time", "t",
-            AxisDirection.FUTURE, NonSI.DAY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.FUTURE, Units.DAY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for column indices in a {@linkplain org.opengis.coverage.grid.GridCoverage grid coverage}.
@@ -434,7 +433,7 @@ public final strictfp class HardCodedAxe
      * The abbreviation is lower case <cite>"i"</cite>.
      */
     public static final DefaultCoordinateSystemAxis COLUMN = create("Column", "i",
-            AxisDirection.COLUMN_POSITIVE, Unit.ONE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.COLUMN_POSITIVE, Units.UNITY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for row indices in a {@linkplain org.opengis.coverage.grid.GridCoverage grid coverage}.
@@ -442,7 +441,7 @@ public final strictfp class HardCodedAxe
      * The abbreviation is lower case <cite>"j"</cite>.
      */
     public static final DefaultCoordinateSystemAxis ROW = create("Row", "j",
-            AxisDirection.ROW_POSITIVE, Unit.ONE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.ROW_POSITIVE, Units.UNITY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for <var>x</var> values in a display device.
@@ -450,7 +449,7 @@ public final strictfp class HardCodedAxe
      * The abbreviation is lower case <cite>"x"</cite>.
      */
     public static final DefaultCoordinateSystemAxis DISPLAY_X = create("x", "x",
-            AxisDirection.DISPLAY_RIGHT, Unit.ONE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.DISPLAY_RIGHT, Units.UNITY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Axis for <var>y</var> values in a display device.
@@ -458,7 +457,7 @@ public final strictfp class HardCodedAxe
      * The abbreviation is lower case <cite>"y"</cite>.
      */
     public static final DefaultCoordinateSystemAxis DISPLAY_Y = create("y", "y",
-            AxisDirection.DISPLAY_DOWN, Unit.ONE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.DISPLAY_DOWN, Units.UNITY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Undefined or unknown axis. Axis direction is {@link AxisDirection#OTHER OTHER}
@@ -466,7 +465,7 @@ public final strictfp class HardCodedAxe
      * for axes that were not properly defined.
      */
     public static final DefaultCoordinateSystemAxis UNDEFINED = create("Undefined", "z",
-            AxisDirection.OTHER, Unit.ONE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+            AxisDirection.OTHER, Units.UNITY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
      * Creates a new axis of the given name, abbreviation, direction and unit.

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,7 +17,6 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Map;
-import javax.measure.unit.SI;
 import org.opengis.referencing.cs.AxisDirection;
 import org.apache.sis.measure.Units;
 
@@ -31,7 +30,7 @@ import static org.apache.sis.referencing
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  */
 public final strictfp class HardCodedCS {
@@ -246,14 +245,14 @@ public final strictfp class HardCodedCS
     /**
      * A one-dimensional temporal CS with
      * <var>{@linkplain HardCodedAxes#TIME time}</var>,
-     * axis in {@linkplain javax.measure.unit.NonSI#DAY day} units.
+     * axis in {@linkplain Units#DAY day} units.
      */
     public static final DefaultTimeCS DAYS;
 
     /**
      * A one-dimensional temporal CS with
      * <var>{@linkplain HardCodedAxes#TIME time}</var>,
-     * axis in {@linkplain javax.measure.unit.SI#SECOND second} units.
+     * axis in {@linkplain Units#SECOND second} units.
      */
     public static final DefaultTimeCS SECONDS;
 
@@ -266,7 +265,7 @@ public final strictfp class HardCodedCS
     static {
         final Map<String,?> properties = getProperties(HardCodedAxes.TIME);
         DAYS         = new DefaultTimeCS(properties, HardCodedAxes.TIME);
-        SECONDS      = new DefaultTimeCS(properties, new DefaultCoordinateSystemAxis(properties, "t", AxisDirection.FUTURE, SI.SECOND));
+        SECONDS      = new DefaultTimeCS(properties, new DefaultCoordinateSystemAxis(properties, "t", AxisDirection.FUTURE, Units.SECOND));
         MILLISECONDS = new DefaultTimeCS(properties, new DefaultCoordinateSystemAxis(properties, "t", AxisDirection.FUTURE, Units.MILLISECOND));
     }
 

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -18,10 +18,10 @@ package org.apache.sis.referencing.cs;
 
 import java.util.Map;
 import java.util.Arrays;
-import javax.measure.unit.SI;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.apache.sis.util.resources.Vocabulary;
+import org.apache.sis.measure.Units;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
@@ -36,7 +36,7 @@ import static org.apache.sis.test.Refere
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  */
 @DependsOn({
@@ -156,7 +156,7 @@ public final strictfp class NormalizerTe
         final Map<String,?> properties = singletonMap(NAME_KEY, "Temporary axis");
         final CoordinateSystemAxis[] axis = new CoordinateSystemAxis[directions.length];
         for (int i=0; i<directions.length; i++) {
-            axis[i] = new DefaultCoordinateSystemAxis(properties, "none", directions[i], SI.METRE);
+            axis[i] = new DefaultCoordinateSystemAxis(properties, "none", directions[i], Units.METRE);
         }
         return axis;
     }
@@ -188,13 +188,13 @@ public final strictfp class NormalizerTe
         assertSame(HardCodedAxes.HEIGHT_cm, Normalizer.normalize(HardCodedAxes.HEIGHT_cm,
                 AxesConvention.CONVENTIONALLY_ORIENTED));                                   // Do not change unit.
         assertAxisEquals("Height", "h", AxisDirection.UP,
-                Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null,
+                Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Units.METRE, null,
                 Normalizer.normalize(HardCodedAxes.HEIGHT_cm, AxesConvention.NORMALIZED));
         /*
          * Test a change of direction from West to East.
          */
         assertAxisEquals(Vocabulary.format(Vocabulary.Keys.Unnamed), "E",
-                AxisDirection.EAST, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null,
+                AxisDirection.EAST, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Units.METRE, null,
                 Normalizer.normalize(HardCodedAxes.WESTING, AxesConvention.NORMALIZED));
     }
 }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultEllipsoidTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultEllipsoidTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultEllipsoidTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultEllipsoidTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -18,7 +18,7 @@ package org.apache.sis.referencing.datum
 
 import java.util.Random;
 import javax.xml.bind.JAXBException;
-import javax.measure.unit.NonSI;
+import org.apache.sis.measure.Units;
 import org.apache.sis.measure.Latitude;
 import org.apache.sis.measure.Longitude;
 import org.apache.sis.referencing.IdentifiedObjects;
@@ -37,7 +37,7 @@ import static org.apache.sis.test.Metada
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  */
 @DependsOn({
@@ -222,7 +222,7 @@ public final strictfp class DefaultEllip
         assertEquals("semiMajorAxis",     20926202,           ellipsoid.getSemiMajorAxis(), 0);
         assertEquals("semiMinorAxis",     20854895,           ellipsoid.getSemiMinorAxis(), 0);
         assertEquals("inverseFlattening", 293.46630765562986, ellipsoid.getInverseFlattening(), 1E-12);
-        assertEquals("axisUnit",          NonSI.FOOT,         ellipsoid.getAxisUnit());
+        assertEquals("axisUnit",          Units.FOOT,         ellipsoid.getAxisUnit());
         /*
          * Marshall and compare to the original file.
          */

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -19,13 +19,12 @@ package org.apache.sis.referencing.datum
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Locale;
-import javax.measure.unit.SI;
-import javax.measure.unit.NonSI;
 import javax.xml.bind.JAXBException;
 import org.opengis.metadata.extent.Extent;
 import org.opengis.referencing.operation.Matrix;
 import org.opengis.referencing.datum.GeodeticDatum;
 import org.opengis.test.Validators;
+import org.apache.sis.measure.Units;
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.metadata.iso.extent.DefaultExtent;
@@ -45,7 +44,7 @@ import static org.apache.sis.referencing
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  */
 @DependsOn({
@@ -66,11 +65,11 @@ public final strictfp class DefaultGeode
     public void testCreateAndSerialize() {
         final Map<String,Object> properties = new HashMap<>();
         assertNull(properties.put(DefaultEllipsoid.NAME_KEY, "Asteroid"));
-        final DefaultEllipsoid ellipsoid = DefaultEllipsoid.createEllipsoid(properties, 1200, 1000, SI.METRE);
+        final DefaultEllipsoid ellipsoid = DefaultEllipsoid.createEllipsoid(properties, 1200, 1000, Units.METRE);
 
         properties.clear();
         assertNull(properties.put(DefaultEllipsoid.NAME_KEY, "Somewhere"));
-        final DefaultPrimeMeridian primeMeridian = new DefaultPrimeMeridian(properties, 12, NonSI.DEGREE_ANGLE);
+        final DefaultPrimeMeridian primeMeridian = new DefaultPrimeMeridian(properties, 12, Units.DEGREE);
 
         properties.clear();
         assertNull(properties.put("name",       "This is a name"));

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -16,7 +16,6 @@
  */
 package org.apache.sis.referencing.datum;
 
-import javax.measure.unit.NonSI;
 import javax.measure.quantity.Angle;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
@@ -43,7 +42,7 @@ import static org.apache.sis.referencing
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.8
  * @module
  */
 @DependsOn(org.apache.sis.referencing.AbstractIdentifiedObjectTest.class)
@@ -74,7 +73,7 @@ public final strictfp class DefaultPrime
     public void testWKT_inGrads() {
         final DefaultPrimeMeridian pm = HardCodedDatum.PARIS;
         assertWktEquals(Convention.WKT1, "PRIMEM[“Paris”, 2.33722917, AUTHORITY[“EPSG”, “8903”]]", pm);
-        assertWktEquals(Convention.WKT2_SIMPLIFIED, "PrimeMeridian[“Paris”, 2.5969213, Unit[“grade”, 0.015707963267948967],"
+        assertWktEquals(Convention.WKT2_SIMPLIFIED, "PrimeMeridian[“Paris”, 2.5969213, Unit[“grad”, 0.015707963267948967],"
                 + " Id[“EPSG”, 8903, URI[“urn:ogc:def:meridian:EPSG::8903”]]]", pm);
     }
 
@@ -183,17 +182,17 @@ public final strictfp class DefaultPrime
     public void testParisMeridian() throws JAXBException {
         final DefaultPrimeMeridian pm = unmarshalFile(DefaultPrimeMeridian.class, "PrimeMeridian.xml");
         assertIsParis(pm);
-        assertEquals("greenwichLongitude", 2.33722917, pm.getGreenwichLongitude(NonSI.DEGREE_ANGLE), 1E-12);
+        assertEquals("greenwichLongitude", 2.33722917, pm.getGreenwichLongitude(Units.DEGREE), 1E-12);
         assertEquals("Equivalent to 2°20′14.025″.", pm.getRemarks().toString());
         assertNull("name.codeSpace", pm.getName().getCodeSpace());
         assertWktEquals(Convention.WKT1,
                 "PRIMEM[“Paris”, 2.33722917, AUTHORITY[“EPSG”, “8903”]]", pm);
         assertWktEquals(Convention.WKT2,
-                "PRIMEM[“Paris”, 2.5969213, ANGLEUNIT[“grade”, 0.015707963267948967], ID[“EPSG”, 8903, URI[“urn:ogc:def:meridian:EPSG::8903”]]]", pm);
+                "PRIMEM[“Paris”, 2.5969213, ANGLEUNIT[“grad”, 0.015707963267948967], ID[“EPSG”, 8903, URI[“urn:ogc:def:meridian:EPSG::8903”]]]", pm);
         assertWktEquals(Convention.WKT2_SIMPLIFIED,
-                "PrimeMeridian[“Paris”, 2.5969213, Unit[“grade”, 0.015707963267948967], Id[“EPSG”, 8903, URI[“urn:ogc:def:meridian:EPSG::8903”]]]", pm);
+                "PrimeMeridian[“Paris”, 2.5969213, Unit[“grad”, 0.015707963267948967], Id[“EPSG”, 8903, URI[“urn:ogc:def:meridian:EPSG::8903”]]]", pm);
         assertWktEquals(Convention.INTERNAL,
-                "PrimeMeridian[“Paris”, 2.5969213, Unit[“grade”, 0.015707963267948967, Id[“EPSG”, 9105]], Id[“EPSG”, 8903],\n" +
+                "PrimeMeridian[“Paris”, 2.5969213, Unit[“grad”, 0.015707963267948967, Id[“EPSG”, 9105]], Id[“EPSG”, 8903],\n" +
                 "  Remark[“Equivalent to 2°20′14.025″.”]]", pm);
         assertXmlEquals(
                 "<gml:PrimeMeridian xmlns:gml=\"" + Namespaces.GML + "\">\n" +

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/GeodeticDatumMock.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/GeodeticDatumMock.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/GeodeticDatumMock.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/GeodeticDatumMock.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,8 +17,7 @@
 package org.apache.sis.referencing.datum;
 
 import java.util.Date;
-import javax.measure.unit.Unit;
-import javax.measure.unit.SI;
+import javax.measure.Unit;
 import javax.measure.quantity.Length;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.extent.Extent;
@@ -27,6 +26,7 @@ import org.opengis.referencing.datum.Geo
 import org.opengis.referencing.datum.PrimeMeridian;
 import org.apache.sis.test.mock.IdentifiedObjectMock;
 import org.apache.sis.internal.metadata.ReferencingServices;
+import org.apache.sis.measure.Units;
 
 
 /**
@@ -34,7 +34,7 @@ import org.apache.sis.internal.metadata.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  */
 @SuppressWarnings("serial")
@@ -122,7 +122,7 @@ public final strictfp class GeodeticDatu
 
     @Override public PrimeMeridian        getPrimeMeridian()      {return PrimeMeridianMock.GREENWICH;}
     @Override public Ellipsoid            getEllipsoid()          {return this;}
-    @Override public Unit<Length>         getAxisUnit()           {return SI.METRE;}
+    @Override public Unit<Length>         getAxisUnit()           {return Units.METRE;}
     @Override public double               getSemiMajorAxis()      {return semiMajorAxis;}
     @Override public double               getSemiMinorAxis()      {return semiMinorAxis;}
     @Override public double               getInverseFlattening()  {return inverseFlattening;}

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -19,13 +19,12 @@ package org.apache.sis.referencing.datum
 import java.util.Date;
 import java.util.Map;
 import java.util.HashMap;
-import javax.measure.unit.SI;
-import javax.measure.unit.NonSI;
 import org.opengis.referencing.datum.PixelInCell;
 import org.opengis.referencing.datum.VerticalDatumType;
 import org.apache.sis.referencing.NamedIdentifier;
 import org.apache.sis.internal.metadata.VerticalDatumTypes;
 import org.apache.sis.metadata.iso.citation.HardCodedCitations;
+import org.apache.sis.measure.Units;
 
 import static org.opengis.referencing.datum.Datum.*;
 import static org.apache.sis.internal.util.StandardDateFormat.MILLISECONDS_PER_DAY;
@@ -36,7 +35,7 @@ import static org.apache.sis.internal.ut
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.6
+ * @version 0.8
  * @module
  */
 public final strictfp class HardCodedDatum {
@@ -45,7 +44,7 @@ public final strictfp class HardCodedDat
      */
     public static final DefaultPrimeMeridian GREENWICH = new DefaultPrimeMeridian(
             properties("Greenwich", "8901", null),
-            0, NonSI.DEGREE_ANGLE);
+            0, Units.DEGREE);
 
     /**
      * Paris meridian (EPSG:8903), with angular measurements in grad.
@@ -54,7 +53,7 @@ public final strictfp class HardCodedDat
      */
     public static final DefaultPrimeMeridian PARIS = new DefaultPrimeMeridian(
             properties("Paris", "8903", null),
-            2.5969213, NonSI.GRADE);
+            2.5969213, Units.GRAD);
 
     /**
      * Old Paris meridian (EPSG:8914) defined as 2°20'13.95"E.
@@ -67,7 +66,7 @@ public final strictfp class HardCodedDat
      */
     public static final DefaultPrimeMeridian PARIS_RGS = new DefaultPrimeMeridian(
             properties("Paris RGS", "8914", null),
-            2 + (20 + 13.95/60)/60, NonSI.DEGREE_ANGLE);
+            2 + (20 + 13.95/60)/60, Units.DEGREE);
 
     /**
      * WGS 1984 datum (EPSG:6326). Prime meridian is Greenwich.
@@ -105,7 +104,7 @@ public final strictfp class HardCodedDat
     public static final DefaultGeodeticDatum TOKYO = new DefaultGeodeticDatum(
             properties("Tokyo 1918", "6301", "Geodetic survey."),
             DefaultEllipsoid.createFlattenedSphere(properties("Bessel 1841", "7004", null),
-                    6377397.155, 299.1528128, SI.METRE), GREENWICH);
+                    6377397.155, 299.1528128, Units.METRE), GREENWICH);
 
     /**
      * Japanese Geodetic Datum 2000 datum (EPSG:6612). Ellipsoid is GRS 1980 and prime meridian is Greenwich.
@@ -116,7 +115,7 @@ public final strictfp class HardCodedDat
     public static final DefaultGeodeticDatum JGD2000 = new DefaultGeodeticDatum(
             properties("Japanese Geodetic Datum 2000", "6612", TOKYO.getScope()),
             DefaultEllipsoid.createFlattenedSphere(properties("GRS 1980", "7019", null),
-                    6378137, 298.257222101, SI.METRE), GREENWICH);
+                    6378137, 298.257222101, Units.METRE), GREENWICH);
 
     /**
      * Spherical datum based on GRS 1980 Authalic Sphere (EPSG:6047). Prime meridian is Greenwich.

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/PrimeMeridianMock.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/PrimeMeridianMock.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/PrimeMeridianMock.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/PrimeMeridianMock.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -16,11 +16,11 @@
  */
 package org.apache.sis.referencing.datum;
 
-import javax.measure.unit.Unit;
-import javax.measure.unit.NonSI;
+import javax.measure.Unit;
 import javax.measure.quantity.Angle;
 import org.opengis.referencing.datum.PrimeMeridian;
 import org.apache.sis.test.mock.IdentifiedObjectMock;
+import org.apache.sis.measure.Units;
 
 
 /**
@@ -28,7 +28,7 @@ import org.apache.sis.test.mock.Identifi
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.8
  * @module
  */
 @SuppressWarnings("serial")
@@ -56,12 +56,12 @@ final strictfp class PrimeMeridianMock e
     }
 
     /**
-     * Returns the angular unit, which is fixed to {@link NonSI#DEGREE_ANGLE}.
+     * Returns the angular unit, which is fixed to {@link Units#DEGREE}.
      *
-     * @return {@link NonSI#DEGREE_ANGLE}.
+     * @return {@link Units#DEGREE}.
      */
     @Override
     public Unit<Angle> getAngularUnit() {
-        return NonSI.DEGREE_ANGLE;
+        return Units.DEGREE;
     }
 }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/AuthorityFactoryMock.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/AuthorityFactoryMock.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/AuthorityFactoryMock.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/AuthorityFactoryMock.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -18,7 +18,7 @@ package org.apache.sis.referencing.facto
 
 import java.util.Set;
 import java.util.LinkedHashSet;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import org.opengis.metadata.extent.Extent;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.referencing.IdentifiedObject;

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/CommonAuthorityFactoryTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/CommonAuthorityFactoryTest.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/CommonAuthorityFactoryTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/CommonAuthorityFactoryTest.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -20,8 +20,6 @@ import java.util.Arrays;
 import java.util.Set;
 import java.awt.geom.AffineTransform;
 import java.awt.geom.NoninvertibleTransformException;
-import javax.measure.unit.SI;
-import javax.measure.unit.NonSI;
 import org.opengis.util.FactoryException;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.parameter.ParameterValueGroup;
@@ -39,6 +37,7 @@ import org.apache.sis.referencing.operat
 import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.referencing.CommonCRS;
 import org.apache.sis.io.wkt.Convention;
+import org.apache.sis.measure.Units;
 
 // Test imports
 import org.apache.sis.test.DependsOnMethod;
@@ -215,7 +214,7 @@ public final strictfp class CommonAuthor
         assertEquals(Constants.CENTRAL_MERIDIAN, -123, p.parameter(Constants.CENTRAL_MERIDIAN)  .doubleValue(), STRICT);
         assertEquals(Constants.LATITUDE_OF_ORIGIN,  0, p.parameter(Constants.LATITUDE_OF_ORIGIN).doubleValue(), STRICT);
         assertEquals(Constants.FALSE_NORTHING,      0, p.parameter(Constants.FALSE_NORTHING)    .doubleValue(), STRICT);
-        assertEquals("axis[0].unit", SI.METRE, crs.getCoordinateSystem().getAxis(0).getUnit());
+        assertEquals("axis[0].unit", Units.METRE, crs.getCoordinateSystem().getAxis(0).getUnit());
         try {
             factory.createObject("AUTO:42001");
             fail("Should not have accepted incomplete code.");
@@ -237,7 +236,7 @@ public final strictfp class CommonAuthor
         assertSame("Legacy namespace.", crs, factory.createProjectedCRS("AUTO:42001,9002,-123,0"));
         assertEquals("name", "WGS 84 / UTM zone 10N", crs.getName().getCode());
         assertTrue("Expected no EPSG identifier because the axes are not in metres.", crs.getIdentifiers().isEmpty());
-        assertEquals("axis[0].unit", NonSI.FOOT, crs.getCoordinateSystem().getAxis(0).getUnit());
+        assertEquals("axis[0].unit", Units.FOOT, crs.getCoordinateSystem().getAxis(0).getUnit());
     }
 
     /**



Mime
View raw message