sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1767577 [5/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/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,11 +17,10 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Arrays;
-import javax.measure.unit.Unit;
+import java.util.Objects;
+import javax.measure.Unit;
 import javax.measure.quantity.Length;
-import javax.measure.converter.UnitConverter;
-import javax.measure.converter.LinearConverter;
-import javax.measure.converter.ConversionException;
+import javax.measure.IncommensurableException;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.CoordinateSystem;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
@@ -32,6 +31,7 @@ import org.apache.sis.measure.Units;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.CharSequences;
+import org.apache.sis.internal.util.DoubleDouble;
 import org.apache.sis.internal.metadata.AxisDirections;
 import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.referencing.operation.matrix.Matrices;
@@ -39,9 +39,6 @@ import org.apache.sis.referencing.operat
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 
-// Branch-dependent imports
-import java.util.Objects;
-
 
 /**
  * Utility methods working on {@link CoordinateSystem} objects and their axes.
@@ -51,7 +48,7 @@ import java.util.Objects;
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  */
 public final class CoordinateSystems extends Static {
@@ -74,8 +71,8 @@ public final class CoordinateSystems ext
      *       to Greenwich (see {@link #directionAlongMeridian directionAlongMeridian(…)} for more information).</li>
      * </ul>
      *
-     * @param  name The direction name (e.g. "north", "north-east", <i>etc.</i>).
-     * @return The axis direction for the given name.
+     * @param  name  the direction name (e.g. "north", "north-east", <i>etc.</i>).
+     * @return the axis direction for the given name.
      * @throws IllegalArgumentException if the given name is not a known axis direction.
      */
     public static AxisDirection parseAxisDirection(String name) throws IllegalArgumentException {
@@ -119,10 +116,10 @@ public final class CoordinateSystems ext
      * This policy is consistent with
      * <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#40">WKT 2 specification §7.5.4(iv)</a>.
      *
-     * @param  baseDirection The base direction, which must be {@link AxisDirection#NORTH} or {@link AxisDirection#SOUTH}.
-     * @param  meridian The meridian in degrees, relative to a unspecified (usually Greenwich) prime meridian.
+     * @param  baseDirection  the base direction, which must be {@link AxisDirection#NORTH} or {@link AxisDirection#SOUTH}.
+     * @param  meridian       the meridian in degrees, relative to a unspecified (usually Greenwich) prime meridian.
      *         Meridians in the East hemisphere are positive and meridians in the West hemisphere are negative.
-     * @return The axis direction along the given meridian.
+     * @return the axis direction along the given meridian.
      *
      * @since 0.6
      */
@@ -166,9 +163,9 @@ public final class CoordinateSystems ext
      *   <li>{@code angle(A, B) = -angle(B, A)}</li>
      * </ul>
      *
-     * @param  source The source axis direction.
-     * @param  target The target axis direction.
-     * @return The arithmetic angle (in degrees) of the rotation to apply on a line pointing toward
+     * @param  source  the source axis direction.
+     * @param  target  the target axis direction.
+     * @return the arithmetic angle (in degrees) of the rotation to apply on a line pointing toward
      *         the source direction in order to make it point toward the target direction, or
      *         {@code null} if this value can not be computed.
      */
@@ -234,8 +231,8 @@ public final class CoordinateSystems ext
     /**
      * Returns the axis direction for the specified coordinate system.
      *
-     * @param  cs The coordinate system.
-     * @return The axis directions for the specified coordinate system.
+     * @param  cs  the coordinate system.
+     * @return the axis directions for the specified coordinate system.
      */
     private static AxisDirection[] getAxisDirections(final CoordinateSystem cs) {
         final AxisDirection[] directions = new AxisDirection[cs.getDimension()];
@@ -271,18 +268,19 @@ public final class CoordinateSystems ext
      * }
      * </div>
      *
-     * @param  sourceCS The source coordinate system.
-     * @param  targetCS The target coordinate system.
-     * @return The conversion from {@code sourceCS} to {@code targetCS} as an affine transform.
+     * @param  sourceCS  the source coordinate system.
+     * @param  targetCS  the target coordinate system.
+     * @return the conversion from {@code sourceCS} to {@code targetCS} as an affine transform.
      *         Only axis direction and units are taken in account.
      * @throws IllegalArgumentException if the CS are not of the same type, or axes do not match.
-     * @throws ConversionException if the units are not compatible, or the conversion is non-linear.
+     * @throws IncommensurableException if the units are not compatible, or the conversion is non-linear.
      *
      * @see Matrices#createTransform(AxisDirection[], AxisDirection[])
      */
+    @SuppressWarnings("fallthrough")
     public static Matrix swapAndScaleAxes(final CoordinateSystem sourceCS,
                                           final CoordinateSystem targetCS)
-            throws IllegalArgumentException, ConversionException
+            throws IllegalArgumentException, IncommensurableException
     {
         ensureNonNull("sourceCS", sourceCS);
         ensureNonNull("targetCS", targetCS);
@@ -313,8 +311,7 @@ public final class CoordinateSystems ext
         for (int j=0; j<targetDim; j++) {
             final Unit<?> targetUnit = targetCS.getAxis(j).getUnit();
             for (int i=0; i<sourceDim; i++) {
-                final double element = matrix.getElement(j,i);
-                if (element == 0) {
+                if (matrix.getElement(j,i) == 0) {
                     // There is no dependency between source[i] and target[j]
                     // (i.e. axes are orthogonal).
                     continue;
@@ -325,15 +322,24 @@ public final class CoordinateSystems ext
                     // between source[i] and target[j].
                     continue;
                 }
-                final UnitConverter converter = sourceUnit.getConverterToAny(targetUnit);
-                if (!(converter instanceof LinearConverter)) {
-                    throw new ConversionException(Resources.format(
-                              Resources.Keys.NonLinearUnitConversion_2, sourceUnit, targetUnit));
+                Number scale  = 1;
+                Number offset = 0;
+                final Number[] coefficients = Units.coefficients(sourceUnit.getConverterToAny(targetUnit));
+                switch (coefficients != null ? coefficients.length : -1) {
+                    case 2:  scale  = coefficients[1];       // Fall through
+                    case 1:  offset = coefficients[0];       // Fall through
+                    case 0:  break;
+                    default: throw new IncommensurableException(Resources.format(
+                                Resources.Keys.NonLinearUnitConversion_2, sourceUnit, targetUnit));
                 }
-                final double offset = converter.convert(0);
-                final double scale  = Units.derivative(converter, 0);
-                matrix.setElement(j, i, element*scale);
-                matrix.setElement(j, sourceDim, matrix.getElement(j, sourceDim) + element*offset);
+                final DoubleDouble element = DoubleDouble.castOrCopy(matrix.getNumber(j,i));
+                final DoubleDouble r = new DoubleDouble(element);
+                r.multiply(scale);
+                matrix.setNumber(j, i, r);
+                r.setFrom(element);
+                r.multiply(offset);
+                r.add(matrix.getNumber(j, sourceDim));
+                matrix.setNumber(j, sourceDim, r);
             }
         }
         return matrix;
@@ -353,7 +359,7 @@ public final class CoordinateSystems ext
      *         &#64;Override
      *         public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) {
      *             if (Units.isAngular(unit)) {
-     *                 unit = NonSI.DEGREE_ANGLE;
+     *                 unit = Units.DEGREE;
      *             }
      *             return unit;
      *         }
@@ -377,9 +383,9 @@ public final class CoordinateSystems ext
      * A rational for normalized axis order and units is explained in the <cite>Axis units and direction</cite> section
      * in the description of the {@linkplain org.apache.sis.referencing.operation.projection map projection package}.
      *
-     * @param  cs     The coordinate system, or {@code null}.
-     * @param  filter The modifications to apply on coordinate system axes.
-     * @return The modified coordinate system as a new instance,
+     * @param  cs      the coordinate system, or {@code null}.
+     * @param  filter  the modifications to apply on coordinate system axes.
+     * @return the modified coordinate system as a new instance,
      *         or {@code cs} if the given coordinate system was null or does not need any change.
      * @throws IllegalArgumentException if the specified coordinate system can not be normalized.
      *
@@ -421,9 +427,9 @@ public final class CoordinateSystems ext
      *     });
      * }
      *
-     * @param  cs       The coordinate system in which to replace linear units, or {@code null}.
-     * @param  newUnit  The new linear unit.
-     * @return The modified coordinate system as a new instance,
+     * @param  cs       the coordinate system in which to replace linear units, or {@code null}.
+     * @param  newUnit  the new linear unit.
+     * @return the modified coordinate system as a new instance,
      *         or {@code cs} if all linear units were already equal to the given one.
      *
      * @see Units#isLinear(Unit)
@@ -462,9 +468,9 @@ public final class CoordinateSystems ext
      *     });
      * }
      *
-     * @param  cs       The coordinate system in which to replace angular units, or {@code null}.
-     * @param  newUnit  The new angular unit.
-     * @return The modified coordinate system as a new instance,
+     * @param  cs       the coordinate system in which to replace angular units, or {@code null}.
+     * @param  newUnit  the new angular unit.
+     * @return the modified coordinate system as a new instance,
      *         or {@code cs} if all angular units were already equal to the given one.
      *
      * @see Units#isAngular(Unit)

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,7 +17,7 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Map;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.referencing.cs.AffineCS;
@@ -52,7 +52,7 @@ import org.apache.sis.measure.Units;
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.8
  * @module
  */
 @XmlType(name = "AffineCSType")
@@ -106,9 +106,9 @@ public class DefaultAffineCS extends Abs
      *   </tr>
      * </table>
      *
-     * @param properties The properties to be given to the identified object.
-     * @param axis0 The first axis.
-     * @param axis1 The second axis.
+     * @param properties  the properties to be given to the identified object.
+     * @param axis0       the first axis.
+     * @param axis1       the second axis.
      *
      * @see org.apache.sis.referencing.factory.GeodeticObjectFactory#createAffineCS(Map, CoordinateSystemAxis, CoordinateSystemAxis)
      */
@@ -123,10 +123,10 @@ public class DefaultAffineCS extends Abs
      * Constructs a three-dimensional coordinate system from a set of properties.
      * The properties map is given unchanged to the superclass constructor.
      *
-     * @param properties The properties to be given to the identified object.
-     * @param axis0 The first axis.
-     * @param axis1 The second axis.
-     * @param axis2 The third axis.
+     * @param properties  the properties to be given to the identified object.
+     * @param axis0       the first axis.
+     * @param axis1       the second axis.
+     * @param axis2       the third axis.
      *
      * @see org.apache.sis.referencing.factory.GeodeticObjectFactory#createAffineCS(Map, CoordinateSystemAxis, CoordinateSystemAxis, CoordinateSystemAxis)
      */
@@ -145,7 +145,7 @@ public class DefaultAffineCS extends Abs
      *
      * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
      *
-     * @param cs The coordinate system to copy.
+     * @param  cs  the coordinate system to copy.
      *
      * @see #castOrCopy(AffineCS)
      */
@@ -162,8 +162,8 @@ public class DefaultAffineCS extends Abs
      * <p>This method checks for the {@link CartesianCS} sub-interface. If that interface is found,
      * then this method delegates to the corresponding {@code castOrCopy} static method.</p>
      *
-     * @param  object The object to get as a SIS implementation, or {@code null} if none.
-     * @return A SIS implementation containing the values of the given object (may be the
+     * @param  object  the object to get as a SIS implementation, or {@code null} if none.
+     * @return a SIS implementation containing the values of the given object (may be the
      *         given object itself), or {@code null} if the argument was null.
      */
     public static DefaultAffineCS castOrCopy(final AffineCS object) {
@@ -190,7 +190,7 @@ public class DefaultAffineCS extends Abs
         if (!AxisDirections.isSpatialOrUserDefined(direction, true)) {
             return INVALID_DIRECTION;
         }
-        if (!Units.isLinear(unit) && !Unit.ONE.equals(unit)) {
+        if (!Units.isLinear(unit) && !Units.UNITY.equals(unit) && !Units.PIXEL.equals(unit)) {
             return INVALID_UNIT;
         }
         return VALID;
@@ -201,7 +201,7 @@ public class DefaultAffineCS extends Abs
      * The default implementation returns {@code AffineCS.class}.
      * Subclasses implementing a more specific GeoAPI interface shall override this method.
      *
-     * @return The affine coordinate system interface implemented by this class.
+     * @return the affine coordinate system interface implemented by this class.
      */
     @Override
     public Class<? extends AffineCS> getInterface() {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -19,10 +19,9 @@ package org.apache.sis.referencing.cs;
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Locale;
-import javax.measure.unit.Unit;
-import javax.measure.unit.NonSI;
+import javax.measure.Unit;
 import javax.measure.quantity.Angle;
-import javax.measure.converter.UnitConverter;
+import javax.measure.UnitConverter;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlAttribute;
@@ -92,7 +91,7 @@ import java.util.Objects;
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see AbstractCS
@@ -314,7 +313,7 @@ public class DefaultCoordinateSystemAxis
             double min = Double.NEGATIVE_INFINITY;
             double max = Double.POSITIVE_INFINITY;
             if (Units.isAngular(unit)) {
-                final UnitConverter fromDegrees = NonSI.DEGREE_ANGLE.getConverterTo(unit.asType(Angle.class));
+                final UnitConverter fromDegrees = Units.DEGREE.getConverterTo(unit.asType(Angle.class));
                 final AxisDirection dir = AxisDirections.absolute(direction);
                 if (dir.equals(AxisDirection.NORTH)) {
                     min = fromDegrees.convert(Latitude.MIN_VALUE);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,7 +17,7 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Map;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.referencing.cs.CylindricalCS;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,7 +17,7 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Map;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.referencing.cs.EllipsoidalCS;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,7 +17,7 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Map;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.referencing.cs.LinearCS;
@@ -157,7 +157,7 @@ public class DefaultLinearCS extends Abs
         if (!AxisDirections.isSpatialOrUserDefined(direction, false)) {
             return INVALID_DIRECTION;
         }
-        if (!Units.isLinear(unit) && !Unit.ONE.equals(unit)) {
+        if (!Units.isLinear(unit) && !Units.UNITY.equals(unit)) {
             return INVALID_UNIT;
         }
         return VALID;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,7 +17,7 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Map;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.referencing.cs.PolarCS;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,7 +17,7 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Map;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.referencing.cs.SphericalCS;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,8 +17,7 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Map;
-import javax.measure.unit.SI;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.referencing.cs.TimeCS;
@@ -151,7 +150,7 @@ public class DefaultTimeCS extends Abstr
      * Returns {@code VALID} if the given argument values are allowed for this coordinate system,
      * or an {@code INVALID_*} error code otherwise. This method is invoked at construction time.
      * The current implementation accepts only temporal directions (i.e. {@link AxisDirection#FUTURE}
-     * and {@link AxisDirection#PAST}) and units compatible with {@link SI#SECOND}.
+     * and {@link AxisDirection#PAST}) and units compatible with {@link Units#SECOND}.
      */
     @Override
     final int validateAxis(final AxisDirection direction, final Unit<?> unit) {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,14 +17,14 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Map;
-import javax.measure.unit.SI;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.referencing.cs.VerticalCS;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.apache.sis.internal.metadata.AxisDirections;
+import org.apache.sis.measure.Units;
 
 
 /**
@@ -59,7 +59,7 @@ import org.apache.sis.internal.metadata.
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.8
  * @module
  *
  * @see org.apache.sis.referencing.crs.DefaultVerticalCRS
@@ -168,11 +168,11 @@ public class DefaultVerticalCS extends A
         if (!AxisDirection.UP.equals(AxisDirections.absolute(direction))) {
             return INVALID_DIRECTION;
         }
-        unit = unit.toSI();
-        if (unit.equals(SI.METRE)   ||  // Most usual case.
-            unit.equals(SI.PASCAL)  ||  // Height or depth estimated by the atmospheric or ocean pressure.
-            unit.equals(SI.SECOND)  ||  // Depth estimated by the time needed for an echo to travel.
-            unit.equals(Unit.ONE))      // Sigma-level (percentage from sea surface to ocean floor).
+        unit = unit.getSystemUnit();
+        if (unit.equals(Units.METRE)   ||   // Most usual case.
+            unit.equals(Units.PASCAL)  ||   // Height or depth estimated by the atmospheric or ocean pressure.
+            unit.equals(Units.SECOND)  ||   // Depth estimated by the time needed for an echo to travel.
+            unit.equals(Units.UNITY))         // Sigma-level (percentage from sea surface to ocean floor).
         {
             return VALID;
         }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -18,9 +18,9 @@ package org.apache.sis.referencing.cs;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import javax.measure.unit.NonSI;
 import org.opengis.referencing.cs.AxisDirection;
 import org.apache.sis.util.iso.Types;
+import org.apache.sis.measure.Units;
 import org.apache.sis.measure.Longitude;
 import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.internal.metadata.AxisDirections;
@@ -48,7 +48,7 @@ import org.apache.sis.util.resources.Err
  *
  * @author  Martin Desruisseaux (IRD)
  * @since   0.4
- * @version 0.6
+ * @version 0.8
  * @module
  */
 final class DirectionAlongMeridian extends FormattableObject implements Comparable<DirectionAlongMeridian> {
@@ -302,7 +302,7 @@ final class DirectionAlongMeridian exten
     @Override
     protected String formatTo(final Formatter formatter) {
         formatter.append(meridian);
-        formatter.append(NonSI.DEGREE_ANGLE);
+        formatter.append(Units.DEGREE);
         return WKTKeywords.Meridian;
     }
 }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -19,9 +19,9 @@ package org.apache.sis.referencing.cs;
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Arrays;
-import javax.measure.unit.Unit;
-import javax.measure.converter.UnitConverter;
-import javax.measure.converter.ConversionException;
+import javax.measure.Unit;
+import javax.measure.UnitConverter;
+import javax.measure.IncommensurableException;
 import org.opengis.referencing.cs.RangeMeaning;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.CoordinateSystem;
@@ -252,7 +252,7 @@ final class Normalizer implements Compar
             final UnitConverter c;
             try {
                 c = unit.getConverterToAny(newUnit);
-            } catch (ConversionException e) {
+            } catch (IncommensurableException e) {
                 // Use IllegalStateException because the public API is an AbstractCS member method.
                 throw new IllegalStateException(Resources.format(Resources.Keys.IllegalUnitFor_2, "axis", unit), e);
             }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/package-info.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/package-info.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -34,7 +34,7 @@
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  */
 @XmlSchema(location = "http://schemas.opengis.net/gml/3.2.1/coordinateSystems.xsd",

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -548,7 +548,7 @@ public class BursaWolfParameters extends
          * elements should have the same value, but we tolerate slight deviation
          * (this will be verified later).
          */
-        final DoubleDouble S = new DoubleDouble(getNumber(matrix, 0,0));
+        final DoubleDouble S = DoubleDouble.castOrCopy(getNumber(matrix, 0,0));
         S.add(getNumber(matrix, 1,1));
         S.add(getNumber(matrix, 2,2));
         S.divide(3, 0);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,13 +17,12 @@
 package org.apache.sis.referencing.datum;
 
 import java.util.Arrays;
+import java.util.Objects;
 import java.io.IOException;
 import java.io.Serializable;
 import java.io.ObjectInputStream;
-import javax.measure.unit.Unit;
-import javax.measure.quantity.Quantity;
-import javax.measure.converter.UnitConverter;
-import javax.measure.converter.LinearConverter;
+import javax.measure.Unit;
+import javax.measure.Quantity;
 import org.opengis.geometry.Envelope;
 import org.opengis.geometry.MismatchedDimensionException;
 import org.opengis.referencing.operation.Matrix;
@@ -37,9 +36,6 @@ import org.apache.sis.util.resources.Err
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.measure.Units;
 
-// Branch-dependent imports
-import java.util.Objects;
-
 
 /**
  * Small but non-constant translations to apply on coordinates for datum shifts or other transformation process.
@@ -126,18 +122,18 @@ import java.util.Objects;
  * same version of Apache SIS. But for long term storage, an established datum shift grid format like
  * NTv2 should be preferred.
  *
- * @param <C> Dimension of the coordinate unit (usually {@link javax.measure.quantity.Angle}).
- * @param <T> Dimension of the translation unit (usually {@link javax.measure.quantity.Angle}
- *            or {@link javax.measure.quantity.Length}).
+ * @param  <C>  dimension of the coordinate unit (usually {@link javax.measure.quantity.Angle}).
+ * @param  <T>  dimension of the translation unit (usually {@link javax.measure.quantity.Angle}
+ *              or {@link javax.measure.quantity.Length}).
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see org.apache.sis.referencing.operation.transform.DatumShiftTransform
  */
-public abstract class DatumShiftGrid<C extends Quantity, T extends Quantity> implements Serializable {
+public abstract class DatumShiftGrid<C extends Quantity<C>, T extends Quantity<T>> implements Serializable {
     /**
      * Serial number for inter-operability with different versions.
      */
@@ -145,7 +141,7 @@ public abstract class DatumShiftGrid<C e
 
     /**
      * The unit of measurements of input values, before conversion to grid indices by {@link #coordinateToGrid}.
-     * The coordinate unit is typically {@link javax.measure.unit.NonSI#DEGREE_ANGLE}.
+     * The coordinate unit is typically {@link javax.measure.Units#DEGREE}.
      *
      * @see #getCoordinateUnit()
      */
@@ -203,11 +199,11 @@ public abstract class DatumShiftGrid<C e
      * methods. The argument order is roughly the order in which they are used in the process of
      * interpolating translation vectors.</p>
      *
-     * @param coordinateUnit    The unit of measurement of input values, before conversion to grid indices by {@code coordinateToGrid}.
-     * @param coordinateToGrid  Conversion from the "real world" coordinates to grid indices including fractional parts.
-     * @param gridSize          Number of cells along each axis in the grid. The length of this array shall be equal to {@code coordinateToGrid} target dimensions.
-     * @param isCellValueRatio  {@code true} if results of {@link #interpolateInCell interpolateInCell(…)} are divided by grid cell size.
-     * @param translationUnit   The unit of measurement of output values.
+     * @param  coordinateUnit    the unit of measurement of input values, before conversion to grid indices by {@code coordinateToGrid}.
+     * @param  coordinateToGrid  conversion from the "real world" coordinates to grid indices including fractional parts.
+     * @param  gridSize          number of cells along each axis in the grid. The length of this array shall be equal to {@code coordinateToGrid} target dimensions.
+     * @param  isCellValueRatio  {@code true} if results of {@link #interpolateInCell interpolateInCell(…)} are divided by grid cell size.
+     * @param  translationUnit   the unit of measurement of output values.
      */
     protected DatumShiftGrid(final Unit<C> coordinateUnit, final LinearTransform coordinateToGrid,
             int[] gridSize, final boolean isCellValueRatio, final Unit<T> translationUnit)
@@ -247,15 +243,14 @@ public abstract class DatumShiftGrid<C e
         scaleY = Double.NaN;
         x0     = Double.NaN;
         y0     = Double.NaN;
-        final UnitConverter c = coordinateUnit.toSI().getConverterTo(coordinateUnit);
-        if (c instanceof LinearConverter && c.convert(0) == 0) {
+        final double toStandardUnit = Units.toStandardUnit(coordinateUnit);
+        if (!Double.isNaN(toStandardUnit)) {
             final Matrix m = coordinateToGrid.getMatrix();
             if (Matrices.isAffine(m)) {
                 final int n = m.getNumCol() - 1;
-                final double toUnit = Units.derivative(c, 0);
                 switch (m.getNumRow()) {
-                    default: y0 = m.getElement(1,n); scaleY = diagonal(m, 1, n) * toUnit;   // Fall through
-                    case 1:  x0 = m.getElement(0,n); scaleX = diagonal(m, 0, n) * toUnit;
+                    default: y0 = m.getElement(1,n); scaleY = diagonal(m, 1, n) / toStandardUnit;   // Fall through
+                    case 1:  x0 = m.getElement(0,n); scaleX = diagonal(m, 0, n) / toStandardUnit;
                     case 0:  break;
                 }
             }
@@ -265,10 +260,10 @@ public abstract class DatumShiftGrid<C e
     /**
      * Returns the value on the diagonal of the given matrix, provided that all other non-translation terms are 0.
      *
-     * @param m The matrix from which to get the scale factor on a row.
-     * @param j The row for which to get the scale factor.
-     * @param n Index of the last column.
-     * @return The scale factor on the diagonal, or NaN.
+     * @param  m  the matrix from which to get the scale factor on a row.
+     * @param  j  the row for which to get the scale factor.
+     * @param  n  index of the last column.
+     * @return the scale factor on the diagonal, or NaN.
      */
     private static double diagonal(final Matrix m, final int j, int n) {
         while (--n >= 0) {
@@ -282,7 +277,7 @@ public abstract class DatumShiftGrid<C e
     /**
      * Creates a new datum shift grid with the same grid geometry (size and units) than the given grid.
      *
-     * @param other The other datum shift grid from which to copy the grid geometry.
+     * @param  other  the other datum shift grid from which to copy the grid geometry.
      */
     protected DatumShiftGrid(final DatumShiftGrid<C,T> other) {
         ArgumentChecks.ensureNonNull("other", other);
@@ -298,10 +293,10 @@ public abstract class DatumShiftGrid<C e
     }
 
     /**
-     * Returns the number of cells along each axis in the grid. The length of this array is equal to
-     * {@code coordinateToGrid} target dimensions.
+     * Returns the number of cells along each axis in the grid.
+     * The length of this array is equal to {@code coordinateToGrid} target dimensions.
      *
-     * @return The number of cells along each axis in the grid.
+     * @return the number of cells along each axis in the grid.
      */
     public int[] getGridSize() {
         return gridSize.clone();
@@ -315,7 +310,7 @@ public abstract class DatumShiftGrid<C e
      * <p>The unit of measurement for the coordinate values in the returned envelope is
      * given by {@link #getCoordinateUnit()}. The complete CRS is undefined.</p>
      *
-     * @return The domain covered by this grid.
+     * @return the domain covered by this grid.
      * @throws TransformException if an error occurred while computing the envelope.
      */
     public Envelope getDomainOfValidity() throws TransformException {
@@ -328,9 +323,9 @@ public abstract class DatumShiftGrid<C e
 
     /**
      * Returns the unit of measurement of input values, before conversion to grid indices.
-     * The coordinate unit is usually {@link javax.measure.unit.NonSI#DEGREE_ANGLE}, but other units are allowed.
+     * The coordinate unit is usually {@link javax.measure.Units#DEGREE}, but other units are allowed.
      *
-     * @return The unit of measurement of input values before conversion to grid indices.
+     * @return the unit of measurement of input values before conversion to grid indices.
      *
      * @see org.apache.sis.referencing.operation.AbstractCoordinateOperation#getInterpolationCRS()
      */
@@ -368,7 +363,7 @@ public abstract class DatumShiftGrid<C e
      *   └                      ┘
      * }
      *
-     * @return Conversion from the "real world" coordinates to grid indices including fractional parts.
+     * @return conversion from the "real world" coordinates to grid indices including fractional parts.
      */
     public LinearTransform getCoordinateToGrid() {
         return coordinateToGrid;
@@ -379,8 +374,8 @@ public abstract class DatumShiftGrid<C e
      * "Normalized coordinates" are coordinates in the unit of measurement given by {@link Unit#toSI()}.
      * For angular coordinates, this is radians. For linear coordinates, this is metres.
      *
-     * @param x The "real world" ordinate (often longitude in radians) of the point for which to get the translation.
-     * @return The grid index for the given ordinate. May be out of bounds.
+     * @param  x  the "real world" ordinate (often longitude in radians) of the point for which to get the translation.
+     * @return the grid index for the given ordinate. May be out of bounds.
      */
     public final double normalizedToGridX(final double x) {
         return x * scaleX + x0;
@@ -391,8 +386,8 @@ public abstract class DatumShiftGrid<C e
      * "Normalized coordinates" are coordinates in the unit of measurement given by {@link Unit#toSI()}.
      * For angular coordinates, this is radians. For linear coordinates, this is metres.
      *
-     * @param y The "real world" ordinate (often latitude in radians) of the point for which to get the translation.
-     * @return The grid index for the given ordinate. May be out of bounds.
+     * @param  y  the "real world" ordinate (often latitude in radians) of the point for which to get the translation.
+     * @return the grid index for the given ordinate. May be out of bounds.
      */
     public final double normalizedToGridY(final double y) {
         return y * scaleY + y0;
@@ -419,7 +414,7 @@ public abstract class DatumShiftGrid<C e
      *       the translation unit shall be the same than the unit of source ellipsoid axis lengths.</li>
      * </ul>
      *
-     * @return The unit of measurement of output values interpolated by {@code interpolateAt(…)}.
+     * @return the unit of measurement of output values interpolated by {@code interpolateAt(…)}.
      *
      * @see #interpolateAt
      */
@@ -442,9 +437,9 @@ public abstract class DatumShiftGrid<C e
      *       the translation vector by the inverse of the conversion given at step 1.</li>
      * </ol>
      *
-     * @param ordinates  The "real world" ordinate (often longitude and latitude, but not necessarily)
+     * @param ordinates  the "real world" ordinate (often longitude and latitude, but not necessarily)
      *                   of the point for which to get the translation.
-     * @return The translation vector at the given position.
+     * @return the translation vector at the given position.
      * @throws TransformException if an error occurred while computing the translation vector.
      */
     public double[] interpolateAt(final double... ordinates) throws TransformException {
@@ -479,9 +474,9 @@ public abstract class DatumShiftGrid<C e
      *   <li>Apply a bilinear interpolation and store the result in {@code vector[dim]}.</li>
      * </ol>
      *
-     * @param gridX   First grid ordinate of the point for which to get the translation.
-     * @param gridY   Second grid ordinate of the point for which to get the translation.
-     * @param vector  A pre-allocated array where to write the translation vector.
+     * @param  gridX   first grid ordinate of the point for which to get the translation.
+     * @param  gridY   second grid ordinate of the point for which to get the translation.
+     * @param  vector  a pre-allocated array where to write the translation vector.
      */
     public void interpolateInCell(double gridX, double gridY, final double[] vector) {
         int ix = (int) gridX;  gridX -= ix;
@@ -525,9 +520,9 @@ public abstract class DatumShiftGrid<C e
      * and {@code gridY}, because empirical tests suggest that the accuracy of such interpolation
      * is uncertain.
      *
-     * @param  gridX First grid ordinate of the point for which to get the translation.
-     * @param  gridY Second grid ordinate of the point for which to get the translation.
-     * @return The derivative at the given location.
+     * @param  gridX  first grid ordinate of the point for which to get the translation.
+     * @param  gridY  second grid ordinate of the point for which to get the translation.
+     * @return the derivative at the given location.
      */
     public Matrix derivativeInCell(final double gridX, final double gridY) {
         final int ix = Math.max(0, Math.min(gridSize[0] - 2, (int) gridX));
@@ -554,11 +549,11 @@ public abstract class DatumShiftGrid<C e
      *       {@linkplain #DatumShiftGrid(Unit, LinearTransform, int[], boolean, Unit) constructor javadoc}).</li>
      * </ul>
      *
-     * @param dim    The dimension of the translation vector component to get,
-     *               from 0 inclusive to {@link #getTranslationDimensions()} exclusive.
-     * @param gridX  The grid index on the <var>x</var> axis, from 0 inclusive to {@code gridSize[0]} exclusive.
-     * @param gridY  The grid index on the <var>y</var> axis, from 0 inclusive to {@code gridSize[1]} exclusive.
-     * @return The translation for the given dimension in the grid cell at the given index.
+     * @param  dim    the dimension of the translation vector component to get,
+     *                from 0 inclusive to {@link #getTranslationDimensions()} exclusive.
+     * @param  gridX  the grid index on the <var>x</var> axis, from 0 inclusive to {@code gridSize[0]} exclusive.
+     * @param  gridY  the grid index on the <var>y</var> axis, from 0 inclusive to {@code gridSize[1]} exclusive.
+     * @return the translation for the given dimension in the grid cell at the given index.
      */
     public abstract double getCellValue(int dim, int gridX, int gridY);
 
@@ -576,9 +571,9 @@ public abstract class DatumShiftGrid<C e
      * are fixed by definition to -168, -60 and +320 metres for dimensions 0, 1 and 2 respectively
      * (geocentric <var>X</var>, <var>Y</var> and <var>Z</var>).</div>
      *
-     * @param dim  The dimension for which to get an average translation value,
-     *             from 0 inclusive to {@link #getTranslationDimensions()} exclusive.
-     * @return A translation value close to the average for the given dimension.
+     * @param  dim  the dimension for which to get an average translation value,
+     *              from 0 inclusive to {@link #getTranslationDimensions()} exclusive.
+     * @return a translation value close to the average for the given dimension.
      */
     public double getCellMean(final int dim) {
         final DoubleDouble sum = new DoubleDouble();
@@ -610,7 +605,7 @@ public abstract class DatumShiftGrid<C e
      *
      * <p>This information is used for determining a tolerance threshold in iterative calculation.</p>
      *
-     * @return An estimation of cell value precision.
+     * @return an estimation of cell value precision.
      */
     public abstract double getCellPrecision();
 
@@ -631,7 +626,7 @@ public abstract class DatumShiftGrid<C e
     /**
      * Returns {@code true} if the given object is a grid containing the same data than this grid.
      *
-     * @param  other The other object to compare with this datum shift grid.
+     * @param  other  the other object to compare with this datum shift grid.
      * @return {@code true} if the given object is non-null, of the same class than this {@code DatumShiftGrid}
      *         and contains the same data.
      */
@@ -653,7 +648,7 @@ public abstract class DatumShiftGrid<C e
      * This method does not need to compute a hash code from all grid values.
      * Comparing some metadata like the grid filename is considered sufficient
      *
-     * @return A hash code based on metadata.
+     * @return a hash code based on metadata.
      */
     @Override
     public int hashCode() {
@@ -663,7 +658,7 @@ public abstract class DatumShiftGrid<C e
     /**
      * Invoked after deserialization. This method computes the transient fields.
      *
-     * @param  in The input stream from which to deserialize the datum shift grid.
+     * @param  in  the input stream from which to deserialize the datum shift grid.
      * @throws IOException if an I/O error occurred while reading or if the stream contains invalid data.
      * @throws ClassNotFoundException if the class serialized on the stream is not on the classpath.
      */

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,10 +17,9 @@
 package org.apache.sis.referencing.datum;
 
 import java.util.Map;
-import javax.measure.unit.SI;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.measure.quantity.Length;
-import javax.measure.converter.UnitConverter;
+import javax.measure.UnitConverter;
 import javax.xml.bind.Unmarshaller;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
@@ -43,6 +42,7 @@ import org.apache.sis.referencing.Abstra
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.util.ComparisonMode;
+import org.apache.sis.measure.Units;
 
 import static java.lang.Math.*;
 import static java.lang.Double.*;
@@ -113,7 +113,7 @@ import java.util.Objects;
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Cédric Briançon (Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see org.apache.sis.referencing.CommonCRS#ellipsoid()
@@ -720,7 +720,7 @@ public class DefaultEllipsoid extends Ab
                 if (!Objects.equals(unit, that.getAxisUnit())) {
                     return false;
                 }
-                final UnitConverter c = mode.isApproximative() ? unit.getConverterTo(SI.METRE) : null;
+                final UnitConverter c = mode.isApproximative() ? unit.getConverterTo(Units.METRE) : null;
                 boolean isMinor = false;
                 double v1 = this.getSemiMajorAxis();
                 double v2 = that.getSemiMajorAxis();
@@ -771,7 +771,7 @@ public class DefaultEllipsoid extends Ab
         final Unit<Length> unit       = getAxisUnit();  // Gives to users a chance to override properties.
         double length = getSemiMajorAxis();
         if (isWKT1) {
-            length = unit.getConverterTo(SI.METRE).convert(length);
+            length = unit.getConverterTo(Units.METRE).convert(length);
         }
         formatter.append(length);
         final double inverseFlattening = getInverseFlattening();  // Gives to users a chance to override properties.
@@ -779,7 +779,7 @@ public class DefaultEllipsoid extends Ab
         if (isWKT1) {
             return WKTKeywords.Spheroid;
         }
-        if (!convention.isSimplified() || !SI.METRE.equals(unit)) {
+        if (!convention.isSimplified() || !Units.METRE.equals(unit)) {
             formatter.append(unit);
         }
         return WKTKeywords.Ellipsoid;
@@ -834,7 +834,7 @@ public class DefaultEllipsoid extends Ab
             }
         }
         if (unit == null) {
-            unit = SI.METRE;
+            unit = Units.METRE;
             Measure.missingUOM(DefaultEllipsoid.class, "semiMajorAxis");
         }
     }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,8 +17,8 @@
 package org.apache.sis.referencing.datum;
 
 import java.util.Map;
-import javax.measure.unit.Unit;
-import javax.measure.unit.NonSI;
+import java.util.Objects;
+import javax.measure.Unit;
 import javax.measure.quantity.Angle;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
@@ -29,8 +29,9 @@ import org.opengis.referencing.Reference
 import org.opengis.referencing.datum.PrimeMeridian;
 import org.opengis.referencing.crs.GeneralDerivedCRS;
 import org.apache.sis.referencing.AbstractIdentifiedObject;
+import org.apache.sis.internal.referencing.Formulas;
+import org.apache.sis.internal.referencing.WKTUtilities;
 import org.apache.sis.internal.referencing.ReferencingUtilities;
-import org.apache.sis.internal.util.PatchedUnitFormat;
 import org.apache.sis.internal.metadata.MetadataUtilities;
 import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.internal.jaxb.gml.Measure;
@@ -38,14 +39,11 @@ import org.apache.sis.internal.util.Nume
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.util.ComparisonMode;
+import org.apache.sis.measure.Units;
 
 import static org.apache.sis.util.ArgumentChecks.ensureFinite;
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 
-// Branch-dependent imports
-import java.util.Objects;
-import org.apache.sis.internal.referencing.Formulas;
-
 
 /**
  * Defines the origin from which longitude values are determined.
@@ -149,9 +147,9 @@ public class DefaultPrimeMeridian extend
      *   </tr>
      * </table>
      *
-     * @param properties          The properties to be given to the identified object.
-     * @param greenwichLongitude  The longitude value relative to the Greenwich Meridian.
-     * @param angularUnit         The angular unit of the longitude.
+     * @param  properties          the properties to be given to the identified object.
+     * @param  greenwichLongitude  the longitude value relative to the Greenwich Meridian.
+     * @param  angularUnit         the angular unit of the longitude.
      *
      * @see org.apache.sis.referencing.factory.GeodeticObjectFactory#createPrimeMeridian(Map, double, Unit)
      */
@@ -172,7 +170,7 @@ public class DefaultPrimeMeridian extend
      *
      * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
      *
-     * @param meridian The prime meridian to copy.
+     * @param  meridian  the prime meridian to copy.
      *
      * @see #castOrCopy(PrimeMeridian)
      */
@@ -188,8 +186,8 @@ public class DefaultPrimeMeridian extend
      * Otherwise if the given object is already a SIS implementation, then the given object is returned unchanged.
      * Otherwise a new SIS implementation is created and initialized to the attribute values of the given object.
      *
-     * @param  object The object to get as a SIS implementation, or {@code null} if none.
-     * @return A SIS implementation containing the values of the given object (may be the
+     * @param  object  the object to get as a SIS implementation, or {@code null} if none.
+     * @return a SIS implementation containing the values of the given object (may be the
      *         given object itself), or {@code null} if the argument was null.
      */
     public static DefaultPrimeMeridian castOrCopy(final PrimeMeridian object) {
@@ -216,7 +214,7 @@ public class DefaultPrimeMeridian extend
     /**
      * Longitude of the prime meridian measured from the Greenwich meridian, positive eastward.
      *
-     * @return The prime meridian Greenwich longitude, in {@linkplain #getAngularUnit() angular unit}.
+     * @return the prime meridian Greenwich longitude, in {@linkplain #getAngularUnit() angular unit}.
      */
     @Override
     public double getGreenwichLongitude() {
@@ -229,11 +227,11 @@ public class DefaultPrimeMeridian extend
      * code, regardless of the underlying angular units of this prime meridian:
      *
      * {@preformat java
-     *     double longitudeInDegrees = primeMeridian.getGreenwichLongitude(NonSI.DEGREE_ANGLE);
+     *     double longitudeInDegrees = primeMeridian.getGreenwichLongitude(Units.DEGREE);
      * }
      *
-     * @param unit The unit in which to express longitude.
-     * @return The Greenwich longitude in the given units.
+     * @param  unit  the unit in which to express longitude.
+     * @return the Greenwich longitude in the given units.
      */
     public double getGreenwichLongitude(final Unit<Angle> unit) {
         return getAngularUnit().getConverterTo(unit).convert(getGreenwichLongitude());
@@ -242,7 +240,7 @@ public class DefaultPrimeMeridian extend
     /**
      * Returns the angular unit of the Greenwich longitude.
      *
-     * @return The angular unit of the {@linkplain #getGreenwichLongitude() Greenwich longitude}.
+     * @return the angular unit of the {@linkplain #getGreenwichLongitude() Greenwich longitude}.
      */
     @Override
     public Unit<Angle> getAngularUnit() {
@@ -252,7 +250,7 @@ public class DefaultPrimeMeridian extend
     /**
      * Compares this prime meridian with the specified object for equality.
      *
-     * @param  object The object to compare to {@code this}.
+     * @param  object  the object to compare to {@code this}.
      * @param  mode {@link ComparisonMode#STRICT STRICT} for performing a strict comparison, or
      *         {@link ComparisonMode#IGNORE_METADATA IGNORE_METADATA} for comparing only properties
      *         relevant to coordinate transformations.
@@ -261,7 +259,7 @@ public class DefaultPrimeMeridian extend
     @Override
     public boolean equals(final Object object, final ComparisonMode mode) {
         if (object == this) {
-            return true; // Slight optimization.
+            return true;                                // Slight optimization.
         }
         if (super.equals(object, mode)) switch (mode) {
             case STRICT: {
@@ -275,8 +273,8 @@ public class DefaultPrimeMeridian extend
                         Objects.equals(getAngularUnit(),        that.getAngularUnit());
             }
             default: {
-                final double v1 = getGreenwichLongitude(NonSI.DEGREE_ANGLE);
-                final double v2 = ReferencingUtilities.getGreenwichLongitude((PrimeMeridian) object, NonSI.DEGREE_ANGLE);
+                final double v1 = getGreenwichLongitude(Units.DEGREE);
+                final double v2 = ReferencingUtilities.getGreenwichLongitude((PrimeMeridian) object, Units.DEGREE);
                 if (mode == ComparisonMode.IGNORE_METADATA) {
                     /*
                      * We relax the check on unit of measurement because EPSG uses sexagesimal degrees
@@ -301,7 +299,7 @@ public class DefaultPrimeMeridian extend
      * See {@link org.apache.sis.referencing.AbstractIdentifiedObject#computeHashCode()}
      * for more information.
      *
-     * @return The hash code value. This value may change in any future Apache SIS version.
+     * @return the hash code value. This value may change in any future Apache SIS version.
      */
     @Override
     protected long computeHashCode() {
@@ -319,7 +317,7 @@ public class DefaultPrimeMeridian extend
      *       Datum[“Nouvelle Triangulation Francaise”,
      *         Ellipsoid[“NTF”, 6378249.2, 293.4660212936269]],
      *       PrimeMeridian[“Paris”, 2.5969213],
-     *       AngleUnit[“grade”, 0.015707963267948967]],
+     *       AngleUnit[“grad”, 0.015707963267948967]],
      *     Conversion[“Lambert zone II”,
      *       etc...
      * }
@@ -356,7 +354,7 @@ public class DefaultPrimeMeridian extend
      * See {@link #isElementOfBaseCRS(Formatter)} for more discussion.
      */
     private static boolean beConservative(final Formatter formatter, final Unit<Angle> contextualUnit) {
-        return !contextualUnit.equals(NonSI.DEGREE_ANGLE) && !isElementOfBaseCRS(formatter);
+        return !contextualUnit.equals(Units.DEGREE) && !isElementOfBaseCRS(formatter);
     }
 
     /**
@@ -371,12 +369,12 @@ public class DefaultPrimeMeridian extend
         super.formatTo(formatter);
         final Convention  convention = formatter.getConvention();
         final boolean     isWKT1 = (convention.majorVersion() == 1);
-        final Unit<Angle> contextualUnit = formatter.toContextualUnit(NonSI.DEGREE_ANGLE);
+        final Unit<Angle> contextualUnit = formatter.toContextualUnit(Units.DEGREE);
         Unit<Angle> unit = contextualUnit;
         if (!isWKT1) {
             unit = getAngularUnit();
             if (convention != Convention.INTERNAL) {
-                unit = PatchedUnitFormat.toFormattable(unit);
+                unit = WKTUtilities.toFormattable(unit);
             }
         }
         formatter.append(getGreenwichLongitude(unit));
@@ -439,7 +437,7 @@ public class DefaultPrimeMeridian extend
                  * (assuming that the missing unit was not applying an offset), so we can select a default.
                  * If the Greenwich longitude is not zero, presume egrees but log a warning.
                  */
-                angularUnit = NonSI.DEGREE_ANGLE;
+                angularUnit = Units.DEGREE;
                 if (greenwichLongitude != 0) {
                     Measure.missingUOM(DefaultPrimeMeridian.class, "setGreenwichMeasure");
                 }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -17,7 +17,7 @@
 package org.apache.sis.referencing.datum;
 
 import java.util.Map;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.measure.quantity.Length;
 import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.referencing.datum.Ellipsoid;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -33,7 +33,7 @@
  *   <li>{@link org.apache.sis.referencing.datum.DefaultEllipsoid#getAuthalicRadius()}</li>
  *   <li>{@link org.apache.sis.referencing.datum.DefaultEllipsoid#getEccentricity()}</li>
  *   <li>{@link org.apache.sis.referencing.datum.DefaultEllipsoid#orthodromicDistance(double, double, double, double)}</li>
- *   <li>{@link org.apache.sis.referencing.datum.DefaultPrimeMeridian#getGreenwichLongitude(javax.measure.unit.Unit)
+ *   <li>{@link org.apache.sis.referencing.datum.DefaultPrimeMeridian#getGreenwichLongitude(javax.measure.Unit)
  *       DefaultPrimeMeridian.getGreenwichLongitude(Unit)}</li>
  *   <li>{@link org.apache.sis.referencing.datum.DefaultGeodeticDatum#getBursaWolfParameters()}</li>
  *   <li>{@link org.apache.sis.referencing.datum.DefaultGeodeticDatum#getPositionVectorTransformation

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -19,7 +19,7 @@ package org.apache.sis.referencing.facto
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Locale;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import org.opengis.referencing.cs.*;
 import org.opengis.referencing.crs.*;
 import org.opengis.referencing.datum.*;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -23,9 +23,7 @@ import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
 import java.util.Collections;
 import java.util.Arrays;
-import javax.measure.unit.SI;
-import javax.measure.unit.NonSI;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.measure.quantity.Length;
 import org.opengis.util.FactoryException;
 import org.opengis.util.InternationalString;
@@ -191,7 +189,7 @@ import static org.apache.sis.internal.re
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see CommonCRS
@@ -275,7 +273,7 @@ public class CommonAuthorityFactory exte
      * of that authority is set to {@code "OGC"}. Apache SIS does that for consistency with the namespace used
      * in URNs (for example {@code "urn:ogc:def:crs:OGC:1.3:CRS84"}).</p>
      *
-     * @return The <cite>"Web Map Service"</cite> authority.
+     * @return the <cite>"Web Map Service"</cite> authority.
      *
      * @see #getCodeSpaces()
      * @see Citations#WMS
@@ -303,7 +301,7 @@ public class CommonAuthorityFactory exte
      * {@code "AUTO1"} or {@code "AUTO2"} namespaces if present. If a namespace is found and is a legacy one, then
      * this {@link #LEGACY_MASK} bit will be set.
      *
-     * @return Index where the code begin, possibly with the {@link #LEGACY_MASK} bit set.
+     * @return index where the code begin, possibly with the {@link #LEGACY_MASK} bit set.
      * @throws NoSuchAuthorityCodeException if an authority is present but is not one of the recognized authorities.
      */
     private static int skipNamespace(final String code) throws NoSuchAuthorityCodeException {
@@ -360,8 +358,8 @@ public class CommonAuthorityFactory exte
      * The returned set contains a namespace followed by numeric identifiers
      * like {@code "CRS:84"}, {@code "CRS:27"}, {@code "AUTO2:42001"}, <i>etc</i>.
      *
-     * @param  type The spatial reference objects type.
-     * @return The set of authority codes for spatial reference objects of the given type.
+     * @param  type  the spatial reference objects type.
+     * @return the set of authority codes for spatial reference objects of the given type.
      * @throws FactoryException if this method failed to provide the set of codes.
      */
     @Override
@@ -414,7 +412,7 @@ public class CommonAuthorityFactory exte
      *       but its scope is wider than the above-cited namespaces.</li>
      * </ul>
      *
-     * @return A set containing at least the {@code "CRS"}, {@code "AUTO"} and {@code "AUTO2"} strings.
+     * @return a set containing at least the {@code "CRS"}, {@code "AUTO"} and {@code "AUTO2"} strings.
      *
      * @see #getAuthority()
      * @see Citations#WMS
@@ -439,8 +437,8 @@ public class CommonAuthorityFactory exte
      *   <tr><td>{@code AUTO2:42001,1,-100,45}</td> <td>WGS 84 / UTM zone 47N</td></tr>
      * </table>
      *
-     * @param  code Value in the CRS or AUTO(2) code space.
-     * @return A description of the object.
+     * @param  code  value in the CRS or AUTO(2) code space.
+     * @return a description of the object.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if an error occurred while fetching the description.
      */
@@ -493,8 +491,8 @@ public class CommonAuthorityFactory exte
      *       Note that some codes require coma-separated parameters after the integer value.</li>
      * </ol>
      *
-     * @param  code Value allocated by OGC.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by OGC.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -566,13 +564,13 @@ public class CommonAuthorityFactory exte
     /**
      * Creates a projected CRS from parameters in the {@code AUTO(2)} namespace.
      *
-     * @param  code        The user-specified code, used only for error reporting.
-     * @param  projection  The projection code (e.g. 42001).
+     * @param  code        the user-specified code, used only for error reporting.
+     * @param  projection  the projection code (e.g. 42001).
      * @param  isLegacy    {@code true} if the code was found in {@code "AUTO"} or {@code "AUTO1"} namespace.
-     * @param  factor      The multiplication factor for the unit of measurement.
-     * @param  longitude   A longitude in the desired projection zone.
-     * @param  latitude    A latitude in the desired projection zone.
-     * @return The projected CRS for the given projection and parameters.
+     * @param  factor      the multiplication factor for the unit of measurement.
+     * @param  longitude   a longitude in the desired projection zone.
+     * @param  latitude    a latitude in the desired projection zone.
+     * @return the projected CRS for the given projection and parameters.
      */
     @SuppressWarnings("null")
     private ProjectedCRS createAuto(final String code, final int projection, final boolean isLegacy,
@@ -627,13 +625,14 @@ public class CommonAuthorityFactory exte
              * At this point we got a coordinate system with axes in metres.
              * If the user asked for another unit of measurement, change the axes now.
              */
-            final Unit<Length> unit;
+            Unit<Length> unit;
             if (isLegacy) {
                 unit = createUnitFromEPSG(factor).asType(Length.class);
             } else {
-                unit = (factor != 1) ? Units.multiply(SI.METRE, factor) : SI.METRE;
+                unit = Units.METRE;
+                if (factor != 1) unit = unit.multiply(factor);
             }
-            if (!SI.METRE.equals(unit)) {
+            if (!Units.METRE.equals(unit)) {
                 cs = (CartesianCS) CoordinateSystems.replaceLinearUnit(cs, unit);
             }
             /*
@@ -649,9 +648,9 @@ public class CommonAuthorityFactory exte
             } else {
                 builder.setConversionMethod(method)
                        .addName(PROJECTION_NAMES[projection - FIRST_PROJECTION_CODE])
-                       .setParameter(Constants.CENTRAL_MERIDIAN, longitude, NonSI.DEGREE_ANGLE);
+                       .setParameter(Constants.CENTRAL_MERIDIAN, longitude, Units.DEGREE);
                 if (param != null) {
-                    builder.setParameter(param, latitude, NonSI.DEGREE_ANGLE);
+                    builder.setParameter(param, latitude, Units.DEGREE);
                 }
             }
             return builder.createProjectedCRS(baseCRS, cs);
@@ -693,8 +692,8 @@ public class CommonAuthorityFactory exte
             final CSFactory csFactory = DefaultFactories.forBuildin(CSFactory.class);
             final CartesianCS cs = csFactory.createCartesianCS(
                     Collections.singletonMap(CartesianCS.NAME_KEY, "Computer display"),
-                    csFactory.createCoordinateSystemAxis(Collections.singletonMap(CartesianCS.NAME_KEY, "i"), "i", AxisDirection.EAST, NonSI.PIXEL),
-                    csFactory.createCoordinateSystemAxis(Collections.singletonMap(CartesianCS.NAME_KEY, "j"), "j", AxisDirection.SOUTH, NonSI.PIXEL));
+                    csFactory.createCoordinateSystemAxis(Collections.singletonMap(CartesianCS.NAME_KEY, "i"), "i", AxisDirection.EAST,  Units.PIXEL),
+                    csFactory.createCoordinateSystemAxis(Collections.singletonMap(CartesianCS.NAME_KEY, "j"), "j", AxisDirection.SOUTH, Units.PIXEL));
 
             final Map<String,Object> properties = new HashMap<>(4);
             properties.put(EngineeringDatum.NAME_KEY, cs.getName());
@@ -708,10 +707,10 @@ public class CommonAuthorityFactory exte
     /**
      * Creates an exception for an unknown authority code.
      *
-     * @param  localCode  The unknown authority code, without namespace.
-     * @param  code       The unknown authority code as specified by the user (may include namespace).
-     * @param  cause      The failure cause, or {@code null} if none.
-     * @return An exception initialized with an error message built from the specified informations.
+     * @param  localCode  the unknown authority code, without namespace.
+     * @param  code       the unknown authority code as specified by the user (may include namespace).
+     * @param  cause      the failure cause, or {@code null} if none.
+     * @return an exception initialized with an error message built from the specified informations.
      */
     private static NoSuchAuthorityCodeException noSuchAuthorityCode(String localCode, String code, Exception cause) {
         return (NoSuchAuthorityCodeException) new NoSuchAuthorityCodeException(Resources.format(Resources.Keys.NoSuchAuthorityCode_3,

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java [UTF-8] Tue Nov  1 21:03:06 2016
@@ -32,7 +32,7 @@ import java.lang.ref.WeakReference;
 import java.lang.ref.PhantomReference;
 import java.io.PrintWriter;
 import java.lang.reflect.Method;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import org.opengis.referencing.cs.*;
 import org.opengis.referencing.crs.*;
 import org.opengis.referencing.datum.*;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java?rev=1767577&r1=1767576&r2=1767577&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.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.Collections;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import org.opengis.referencing.*;
 import org.opengis.referencing.cs.*;
 import org.opengis.referencing.crs.*;



Mime
View raw message