Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -21,8 +21,8 @@ import java.util.Date;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
-import javax.measure.quantity.Duration;
-import javax.measure.converter.UnitConverter;
+import javax.measure.quantity.Time;
+import javax.measure.UnitConverter;
 import org.opengis.referencing.cs.CoordinateSystem;
 import org.opengis.referencing.cs.TimeCS;
 import org.opengis.referencing.crs.TemporalCRS;
@@ -59,7 +59,7 @@ import static org.apache.sis.util.Argume
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see org.apache.sis.referencing.datum.DefaultTemporalDatum
@@ -212,7 +212,7 @@ public class DefaultTemporalCRS extends
      */
     private void initializeConverter() {
         origin   = datum.getOrigin().getTime();
-        toMillis = 
getCoordinateSystem().getAxis(0).getUnit().asType(Duration.class).getConverterTo(Units.MILLISECOND);
+        toMillis = 
getCoordinateSystem().getAxis(0).getUnit().asType(Time.class).getConverterTo(Units.MILLISECOND);
     }
 
     /**

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -19,9 +19,7 @@ package org.apache.sis.referencing.cs;
 import java.util.Map;
 import java.util.EnumMap;
 import java.util.Arrays;
-import javax.measure.unit.SI;
-import javax.measure.unit.Unit;
-import javax.measure.unit.NonSI;
+import javax.measure.Unit;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -67,7 +65,7 @@ import static org.apache.sis.util.Utilit
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see DefaultCoordinateSystemAxis
@@ -271,7 +269,7 @@ public class AbstractCS extends Abstract
      * or an {@code INVALID_*} error code otherwise. This method is invoked at 
construction time for checking
      * argument validity. The default implementation returns {@code VALID} in 
all cases. Subclasses override
      * this method in order to put more restrictions on allowed axis 
directions and check for compatibility
-     * with {@linkplain SI#METRE metre} or {@linkplain NonSI#DEGREE_ANGLE 
degree} units.
+     * with {@linkplain Units#METRE metre} or {@linkplain Units#DEGREE degree} 
units.
      *
      * <p><b>Note for implementors:</b> since this method is invoked at 
construction time, it shall not depend
      * on this object's state. This method is not in public API for that 
reason.</p>

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -16,9 +16,7 @@
  */
 package org.apache.sis.referencing.cs;
 
-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.CoordinateSystem;                 // For 
javadoc
 import org.opengis.referencing.cs.CoordinateSystemAxis;
@@ -108,7 +106,7 @@ import org.apache.sis.measure.Units;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see AbstractCS#forConvention(AxesConvention)
@@ -123,9 +121,9 @@ public enum AxesConvention implements Ax
      *   <li>Axes are oriented and ordered as defined for {@link 
#CONVENTIONALLY_ORIENTED} coordinate systems.</li>
      *   <li>Known units are normalized (this list may be expanded in future 
SIS versions):
      *     <ul>
-     *       <li>Angular units are set to {@link 
javax.measure.unit.NonSI#DEGREE_ANGLE}.</li>
-     *       <li>Linear units are set to {@link 
javax.measure.unit.SI#METRE}.</li>
-     *       <li>Temporal units are set to {@link 
javax.measure.unit.NonSI#DAY}.</li>
+     *       <li>Angular units are set to {@link 
javax.measure.Units#DEGREE}.</li>
+     *       <li>Linear units are set to {@link 
javax.measure.unit.Units#METRE}.</li>
+     *       <li>Temporal units are set to {@link 
javax.measure.unit.Units#DAY}.</li>
      *     </ul>
      *   </li>
      * </ul>
@@ -150,11 +148,11 @@ public enum AxesConvention implements Ax
         @Override
         public Unit<?> getUnitReplacement(final CoordinateSystemAxis axis, 
Unit<?> unit) {
             if (Units.isLinear(unit)) {
-                unit = SI.METRE;
+                unit = Units.METRE;
             } else if (Units.isAngular(unit)) {
-                unit = NonSI.DEGREE_ANGLE;
+                unit = Units.DEGREE;
             } else if (Units.isTemporal(unit)) {
-                unit = NonSI.DAY;
+                unit = Units.DAY;
             }
             return unit;
         }

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxisFilter.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxisFilter.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxisFilter.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxisFilter.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -19,7 +19,7 @@ package org.apache.sis.referencing.cs;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.CoordinateSystem;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 
 
 /**
@@ -104,7 +104,7 @@ public interface AxisFilter {
      *     &#64;Override
      *     public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, 
Unit<?> unit) {
      *         if (Units.isAngular(unit)) {
-     *             unit = NonSI.DEGREE_ANGLE;
+     *             unit = Units.DEGREE;
      *         }
      *         return unit;
      *     }

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -17,11 +17,10 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Arrays;
-import javax.measure.unit.Unit;
+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.UnitConverter;
+import javax.measure.IncommensurableException;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.CoordinateSystem;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
@@ -51,7 +50,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 {
@@ -271,18 +270,18 @@ 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[])
      */
     public static Matrix swapAndScaleAxes(final CoordinateSystem sourceCS,
                                           final CoordinateSystem targetCS)
-            throws IllegalArgumentException, ConversionException
+            throws IllegalArgumentException, IncommensurableException
     {
         ensureNonNull("sourceCS", sourceCS);
         ensureNonNull("targetCS", targetCS);
@@ -326,8 +325,8 @@ public final class CoordinateSystems ext
                     continue;
                 }
                 final UnitConverter converter = 
sourceUnit.getConverterToAny(targetUnit);
-                if (!(converter instanceof LinearConverter)) {
-                    throw new ConversionException(Resources.format(
+                if (!converter.isLinear()) {
+                    throw new IncommensurableException(Resources.format(
                               Resources.Keys.NonLinearUnitConversion_2, 
sourceUnit, targetUnit));
                 }
                 final double offset = converter.convert(0);
@@ -353,7 +352,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;
      *         }

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java
 [UTF-8] Thu Oct 13 13:38:49 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;
@@ -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.ONE.equals(unit)) {
             return INVALID_UNIT;
         }
         return VALID;

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java
 [UTF-8] Thu Oct 13 13:38:49 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.ONE.equals(unit)) {
             return INVALID_UNIT;
         }
         return VALID;

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java
 [UTF-8] Thu Oct 13 13:38:49 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.ONE))         // Sigma-level (percentage from 
sea surface to ocean floor).
         {
             return VALID;
         }

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/package-info.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/package-info.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/package-info.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/package-info.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -17,13 +17,13 @@
 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 javax.measure.UnitConverter;
 import org.opengis.geometry.Envelope;
 import org.opengis.geometry.MismatchedDimensionException;
 import org.opengis.referencing.operation.Matrix;
@@ -37,9 +37,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.
@@ -132,12 +129,12 @@ import java.util.Objects;
  *
  * @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 +142,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()
      */
@@ -247,8 +244,8 @@ 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 UnitConverter c = 
coordinateUnit.getSystemUnit().getConverterTo(coordinateUnit);
+        if (c.isLinear() && c.convert(0) == 0) {
             final Matrix m = coordinateToGrid.getMatrix();
             if (Matrices.isAffine(m)) {
                 final int n = m.getNumCol() - 1;
@@ -328,7 +325,7 @@ 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.
      *

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -17,8 +17,7 @@
 package org.apache.sis.referencing.datum;
 
 import java.util.Map;
-import javax.measure.unit.Unit;
-import javax.measure.unit.NonSI;
+import javax.measure.Unit;
 import javax.measure.quantity.Angle;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
@@ -38,6 +37,7 @@ 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;
@@ -229,7 +229,7 @@ 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.
@@ -275,8 +275,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
@@ -319,7 +319,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 +356,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,7 +371,7 @@ 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();
@@ -439,7 +439,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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
 [UTF-8] Thu Oct 13 13:38:49 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
@@ -631,9 +629,9 @@ public class CommonAuthorityFactory exte
             if (isLegacy) {
                 unit = createUnitFromEPSG(factor).asType(Length.class);
             } else {
-                unit = (factor != 1) ? Units.multiply(SI.METRE, factor) : 
SI.METRE;
+                unit = (factor != 1) ? Units.multiply(Units.METRE, factor) : 
Units.METRE;
             }
-            if (!SI.METRE.equals(unit)) {
+            if (!Units.METRE.equals(unit)) {
                 cs = (CartesianCS) CoordinateSystems.replaceLinearUnit(cs, 
unit);
             }
             /*
@@ -649,9 +647,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 +691,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());

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
 [UTF-8] Thu Oct 13 13:38:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java
 [UTF-8] Thu Oct 13 13:38:49 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.*;

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -28,7 +28,7 @@ import java.util.concurrent.atomic.Atomi
 import java.lang.reflect.Constructor;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.measure.quantity.Angle;
 import javax.measure.quantity.Length;
 import javax.xml.bind.JAXBException;

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -33,7 +33,7 @@ import java.util.concurrent.atomic.Atomi
 import java.util.ConcurrentModificationException;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import org.opengis.referencing.*;
 import org.opengis.referencing.cs.*;
 import org.opengis.referencing.crs.*;

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/BursaWolfInfo.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/BursaWolfInfo.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/BursaWolfInfo.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/BursaWolfInfo.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -21,10 +21,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.LinkedHashMap;
 import java.sql.ResultSet;
-import javax.measure.unit.Unit;
-import javax.measure.unit.NonSI;
-import javax.measure.unit.SI;
-import javax.measure.converter.ConversionException;
+import javax.measure.Unit;
+import javax.measure.IncommensurableException;
 import org.opengis.util.FactoryException;
 import org.opengis.metadata.extent.Extent;
 import org.apache.sis.internal.referencing.ExtentSelector;
@@ -46,7 +44,7 @@ import org.apache.sis.measure.Units;
  *
  * @author  Martin Desruisseaux (IRD)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see BursaWolfParameters
@@ -92,13 +90,13 @@ final class BursaWolfInfo {
     {
         Unit<?> target = unit;
         if (code >= 8605) {
-            if      (code <= 8607) target = SI   .METRE;
-            else if (code <= 8610) target = NonSI.SECOND_ANGLE;
+            if      (code <= 8607) target = Units.METRE;
+            else if (code <= 8610) target = Units.ARC_SECOND;
             else if (code == 8611) target = Units.PPM;
         }
         if (target != unit) try {
             value = unit.getConverterToAny(target).convert(value);
-        } catch (ConversionException e) {
+        } catch (IncommensurableException e) {
             throw new 
FactoryDataException(Errors.getResources(locale).getString(Errors.Keys.IncompatibleUnit_1,
 unit), e);
         }
         switch (code) {

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -42,9 +42,10 @@ import java.text.DateFormat;
 import java.text.ParseException;
 import java.net.URI;
 import java.net.URISyntaxException;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.measure.quantity.Angle;
 import javax.measure.quantity.Length;
+import javax.measure.format.ParserException;
 
 import org.opengis.util.NameSpace;
 import org.opengis.util.GenericName;
@@ -2407,7 +2408,7 @@ addURIs:    for (int i=0; ; i++) {
                         unit = Units.multiply(base, b/c);
                     } else try {
                         unit = Units.valueOf(getString(code, result, 5));      
     // Try parsing the unit symbol as a fallback.
-                    } catch (IllegalArgumentException e) {
+                    } catch (ParserException e) {
                         throw new 
FactoryDataException(error().getString(Errors.Keys.UnknownUnit_1, code), e);
                     }
                 }

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/TableInfo.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/TableInfo.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/TableInfo.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/TableInfo.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -16,7 +16,7 @@
  */
 package org.apache.sis.referencing.factory.sql;
 
-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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -24,7 +24,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlSeeAlso;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
-import javax.measure.converter.ConversionException;
+import javax.measure.IncommensurableException;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.extent.Extent;
@@ -821,7 +821,7 @@ check:      for (int isTarget=0; ; isTar
                                     
CoordinateSystems.swapAndScaleAxes(that.getTargetCRS().getCoordinateSystem(),
                                                                        
this.getTargetCRS().getCoordinateSystem()));
                             tr2 = MathTransforms.concatenate(before, tr2, 
after);
-                        } catch (ConversionException | RuntimeException e) {
+                        } catch (IncommensurableException | RuntimeException 
e) {
                             
Logging.recoverableException(Logging.getLogger(Loggers.COORDINATE_OPERATION),
                                     AbstractCoordinateOperation.class, 
"equals", e);
                         }

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -20,9 +20,9 @@ import java.util.Map;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Collections;
-import javax.measure.unit.Unit;
-import javax.measure.quantity.Duration;
-import javax.measure.converter.ConversionException;
+import javax.measure.Unit;
+import javax.measure.quantity.Time;
+import javax.measure.IncommensurableException;
 import org.opengis.util.FactoryException;
 import org.opengis.referencing.IdentifiedObject;
 import org.opengis.referencing.cs.*;
@@ -107,7 +107,7 @@ import static org.apache.sis.util.Utilit
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see 
DefaultCoordinateOperationFactory#createOperation(CoordinateReferenceSystem, 
CoordinateReferenceSystem, CoordinateOperationContext)
@@ -199,7 +199,7 @@ public class CoordinateOperationFinder e
         if (equalsIgnoreMetadata(sourceCRS, targetCRS)) try {
             return createFromAffineTransform(AXIS_CHANGES, sourceCRS, 
targetCRS,
                     
CoordinateSystems.swapAndScaleAxes(sourceCRS.getCoordinateSystem(), 
targetCRS.getCoordinateSystem()));
-        } catch (IllegalArgumentException | ConversionException e) {
+        } catch (IllegalArgumentException | IncommensurableException e) {
             throw new 
FactoryException(Resources.format(Resources.Keys.CanNotInstantiateGeodeticObject_1,
 new CRSPair(sourceCRS, targetCRS)), e);
         }
         /*
@@ -672,7 +672,7 @@ public class CoordinateOperationFinder e
         final Matrix matrix;
         try {
             matrix = CoordinateSystems.swapAndScaleAxes(sourceCS, targetCS);
-        } catch (IllegalArgumentException | ConversionException exception) {
+        } catch (IllegalArgumentException | IncommensurableException 
exception) {
             throw new OperationNotFoundException(notFoundMessage(sourceCRS, 
targetCRS), exception);
         }
         return createFromAffineTransform(AXIS_CHANGES, sourceCRS, targetCRS, 
matrix);
@@ -702,7 +702,7 @@ public class CoordinateOperationFinder e
          * much to add to a time in 'sourceCRS' in order to get a time in 
'targetCRS'. This "epoch shift" is
          * in units of 'targetCRS'.
          */
-        final Unit<Duration> targetUnit = 
targetCS.getAxis(0).getUnit().asType(Duration.class);
+        final Unit<Time> targetUnit = 
targetCS.getAxis(0).getUnit().asType(Time.class);
         double epochShift = sourceDatum.getOrigin().getTime() -
                             targetDatum.getOrigin().getTime();
         epochShift = 
Units.MILLISECOND.getConverterTo(targetUnit).convert(epochShift);
@@ -718,7 +718,7 @@ public class CoordinateOperationFinder e
         final Matrix matrix;
         try {
             matrix = CoordinateSystems.swapAndScaleAxes(sourceCS, targetCS);
-        } catch (IllegalArgumentException | ConversionException exception) {
+        } catch (IllegalArgumentException | IncommensurableException 
exception) {
             throw new OperationNotFoundException(notFoundMessage(sourceCRS, 
targetCRS), exception);
         }
         final int translationColumn = matrix.getNumCol() - 1;           // 
Paranoiac check: should always be 1.

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -25,7 +25,7 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
-import javax.measure.converter.ConversionException;
+import javax.measure.IncommensurableException;
 
 import org.opengis.util.FactoryException;
 import org.opengis.util.NoSuchIdentifierException;
@@ -103,7 +103,7 @@ import java.util.function.Predicate;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  */
 class CoordinateOperationRegistry {
@@ -334,7 +334,7 @@ class CoordinateOperationRegistry {
                     }
                     return operation;
                 }
-            } catch (IllegalArgumentException | ConversionException e) {
+            } catch (IllegalArgumentException | IncommensurableException e) {
                 String message = 
Resources.format(Resources.Keys.CanNotInstantiateGeodeticObject_1, new 
CRSPair(sourceCRS, targetCRS));
                 String details = e.getLocalizedMessage();
                 if (details != null) {
@@ -358,12 +358,12 @@ class CoordinateOperationRegistry {
      * @return A coordinate operation from {@code sourceCRS} to {@code 
targetCRS}, or {@code null}
      *         if no such operation is explicitly defined in the underlying 
database.
      * @throws IllegalArgumentException if the coordinate systems are not of 
the same type or axes do not match.
-     * @throws ConversionException if the units are not compatible or a unit 
conversion is non-linear.
+     * @throws IncommensurableException if the units are not compatible or a 
unit conversion is non-linear.
      * @throws FactoryException if an error occurred while creating the 
operation.
      */
     private CoordinateOperation search(final CoordinateReferenceSystem 
sourceCRS,
                                        final CoordinateReferenceSystem 
targetCRS)
-            throws IllegalArgumentException, ConversionException, 
FactoryException
+            throws IllegalArgumentException, IncommensurableException, 
FactoryException
     {
         final String sourceID = findCode(sourceCRS);
         if (sourceID == null) {
@@ -576,13 +576,13 @@ class CoordinateOperationRegistry {
      * @param  targetCRS  the target CRS requested by the user.
      * @return a coordinate operation for the given source and target CRS.
      * @throws IllegalArgumentException if the coordinate systems are not of 
the same type or axes do not match.
-     * @throws ConversionException if the units are not compatible or a unit 
conversion is non-linear.
+     * @throws IncommensurableException if the units are not compatible or a 
unit conversion is non-linear.
      * @throws FactoryException if the operation can not be constructed.
      */
     private CoordinateOperation complete(final CoordinateOperation       
operation,
                                          final CoordinateReferenceSystem 
sourceCRS,
                                          final CoordinateReferenceSystem 
targetCRS)
-            throws IllegalArgumentException, ConversionException, 
FactoryException
+            throws IllegalArgumentException, IncommensurableException, 
FactoryException
     {
         CoordinateReferenceSystem source = operation.getSourceCRS();
         CoordinateReferenceSystem target = operation.getTargetCRS();
@@ -603,13 +603,13 @@ class CoordinateOperationRegistry {
      * @param  mtFactory  the math transform factory to use.
      * @return the transform from the given source to the given target CRS, or 
{@code null} if none is needed.
      * @throws IllegalArgumentException if the coordinate systems are not of 
the same type or axes do not match.
-     * @throws ConversionException if the units are not compatible or a unit 
conversion is non-linear.
+     * @throws IncommensurableException if the units are not compatible or a 
unit conversion is non-linear.
      * @throws FactoryException if an error occurred while creating a math 
transform.
      */
     private static MathTransform swapAndScaleAxes(final 
CoordinateReferenceSystem sourceCRS,
                                                   final 
CoordinateReferenceSystem targetCRS,
                                                   final MathTransformFactory   
   mtFactory)
-            throws IllegalArgumentException, ConversionException, 
FactoryException
+            throws IllegalArgumentException, IncommensurableException, 
FactoryException
     {
         assert ReferencingUtilities.getDimension(sourceCRS) != 
ReferencingUtilities.getDimension(targetCRS)
                 || Utilities.deepEquals(sourceCRS, targetCRS, 
ComparisonMode.ALLOW_VARIANT);

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -19,7 +19,7 @@ package org.apache.sis.referencing.opera
 import java.util.Map;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
-import javax.measure.converter.ConversionException;
+import javax.measure.IncommensurableException;
 import org.opengis.util.FactoryException;
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.referencing.operation.Conversion;
@@ -483,7 +483,7 @@ public class DefaultConversion extends A
                 transform = factory.createConcatenatedTransform(isSource ? s : 
transform,
                                                                 isSource ? 
transform : s);
             }
-        } catch (ConversionException e) {
+        } catch (IncommensurableException e) {
             throw new 
IllegalArgumentException(Errors.format(Errors.Keys.IllegalArgumentValue_2,
                     (isSource ? "sourceCRS" : "targetCRS"),
                     (isSource ?  sourceCRS  :  targetCRS).getName()), e);

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/InverseOperationMethod.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/InverseOperationMethod.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/InverseOperationMethod.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/InverseOperationMethod.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -20,7 +20,7 @@ import java.util.Map;
 import java.util.HashMap;
 import java.util.Collection;
 import javax.xml.bind.annotation.XmlTransient;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.quality.PositionalAccuracy;
 import org.opengis.util.InternationalString;

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/MathTransformContext.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/MathTransformContext.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/MathTransformContext.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/MathTransformContext.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -16,7 +16,6 @@
  */
 package org.apache.sis.referencing.operation;
 
-import javax.measure.unit.NonSI;
 import org.opengis.util.FactoryException;
 import org.opengis.referencing.cs.CartesianCS;
 import org.opengis.referencing.cs.CoordinateSystem;
@@ -29,6 +28,7 @@ import org.apache.sis.referencing.operat
 import 
org.apache.sis.referencing.operation.transform.ContextualParameters.MatrixRole;
 import 
org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory.Context;
 import org.apache.sis.util.resources.Errors;
+import org.apache.sis.measure.Units;
 
 
 /**
@@ -40,7 +40,7 @@ import org.apache.sis.util.resources.Err
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  */
 final class MathTransformContext extends Context {
@@ -59,8 +59,8 @@ final class MathTransformContext extends
      * to the information provided by the super-class.
      */
     MathTransformContext(final GeodeticDatum source, final GeodeticDatum 
target) {
-        final double rs = 
ReferencingUtilities.getGreenwichLongitude(source.getPrimeMeridian(), 
NonSI.DEGREE_ANGLE);
-        final double rt = 
ReferencingUtilities.getGreenwichLongitude(target.getPrimeMeridian(), 
NonSI.DEGREE_ANGLE);
+        final double rs = 
ReferencingUtilities.getGreenwichLongitude(source.getPrimeMeridian(), 
Units.DEGREE);
+        final double rt = 
ReferencingUtilities.getGreenwichLongitude(target.getPrimeMeridian(), 
Units.DEGREE);
         if (rs != rt) {
             sourceMeridian = rs;
             targetMeridian = rt;

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -19,8 +19,6 @@ package org.apache.sis.referencing.opera
 import java.util.List;
 import java.util.Arrays;
 import java.io.Serializable;
-import javax.measure.unit.SI;
-import javax.measure.unit.NonSI;
 import org.opengis.util.FactoryException;
 import org.opengis.geometry.DirectPosition;
 import org.opengis.geometry.MismatchedDimensionException;
@@ -82,7 +80,7 @@ import static org.apache.sis.util.Argume
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.5
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see DefaultMathTransformFactory
@@ -158,7 +156,7 @@ public abstract class AbstractMathTransf
      * <div class="note"><b>Relationship with ISO 19111:</b>
      * This method is similar to {@link OperationMethod#getParameters()}, 
except that typical
      * {@link MathTransform} implementations return parameters in standard 
units (usually
-     * {@linkplain SI#METRE metres} or {@linkplain NonSI#DEGREE_ANGLE decimal 
degrees}).
+     * {@linkplain Units#METRE metres} or {@linkplain Units#DEGREE decimal 
degrees}).
      * </div>
      *
      * @return The parameter descriptors for this math transform, or {@code 
null} if unspecified.

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameter.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameter.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameter.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameter.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -16,7 +16,7 @@
  */
 package org.apache.sis.referencing.operation.transform;
 
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import org.opengis.parameter.ParameterDescriptor;
 import org.apache.sis.parameter.DefaultParameterValue;
 

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -18,7 +18,7 @@ package org.apache.sis.referencing.opera
 
 import java.util.Map;
 import java.util.Collections;
-import javax.measure.converter.ConversionException;
+import javax.measure.IncommensurableException;
 import org.opengis.util.FactoryException;
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.referencing.cs.CartesianCS;
@@ -47,7 +47,7 @@ import org.apache.sis.referencing.operat
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  */
 abstract class CoordinateSystemTransform extends AbstractMathTransform {
@@ -204,7 +204,7 @@ abstract class CoordinateSystemTransform
                 return factory.createConcatenatedTransform(before,
                        factory.createConcatenatedTransform(tr, after));
             }
-        } catch (IllegalArgumentException | ConversionException e) {
+        } catch (IllegalArgumentException | IncommensurableException e) {
             cause = e;
         }
         throw new 
OperationNotFoundException(Resources.format(Resources.Keys.CoordinateOperationNotFound_2,

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DatumShiftTransform.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DatumShiftTransform.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DatumShiftTransform.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DatumShiftTransform.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -17,9 +17,9 @@
 package org.apache.sis.referencing.operation.transform;
 
 import java.io.Serializable;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.measure.quantity.Length;
-import javax.measure.converter.UnitConverter;
+import javax.measure.UnitConverter;
 import org.opengis.referencing.datum.Ellipsoid;
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.parameter.ParameterDescriptorGroup;

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -30,9 +30,8 @@ import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.io.Serializable;
 import javax.measure.quantity.Length;
-import javax.measure.unit.SI;
-import javax.measure.unit.Unit;
-import javax.measure.converter.ConversionException;
+import javax.measure.Unit;
+import javax.measure.IncommensurableException;
 
 import org.opengis.parameter.ParameterValue;
 import org.opengis.parameter.ParameterValueGroup;
@@ -73,6 +72,7 @@ import org.apache.sis.referencing.cs.Coo
 import org.apache.sis.referencing.factory.InvalidGeodeticParameterException;
 import org.apache.sis.referencing.operation.DefaultOperationMethod;
 import org.apache.sis.referencing.operation.matrix.Matrices;
+import org.apache.sis.measure.Units;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Classes;
@@ -161,7 +161,7 @@ import org.apache.sis.util.resources.Err
  *
  * @author  Martin Desruisseaux (Geomatys, IRD)
  * @since   0.6
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see MathTransformProvider
@@ -659,7 +659,7 @@ public class DefaultMathTransformFactory
                 } else {
                     return CoordinateSystems.swapAndScaleAxes(specified, 
normalized);
                 }
-            } catch (IllegalArgumentException | ConversionException cause) {
+            } catch (IllegalArgumentException | IncommensurableException 
cause) {
                 throw new 
InvalidGeodeticParameterException(cause.getLocalizedMessage(), cause);
             }
         }
@@ -784,7 +784,7 @@ public class DefaultMathTransformFactory
                      */
                     final double a   = getValue(ap, unit);
                     final double b   = getValue(bp, unit);
-                    final double tol = 
SI.METRE.getConverterTo(unit).convert(ELLIPSOID_PRECISION);
+                    final double tol = 
Units.METRE.getConverterTo(unit).convert(ELLIPSOID_PRECISION);
                     if (ensureSet(ap, a, ellipsoid.getSemiMajorAxis(), unit, 
tol)) {
                         mismatchedParam = ap;
                         mismatchedValue = a;

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -22,7 +22,7 @@ import java.util.Collections;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.Serializable;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.measure.quantity.Length;
 import org.opengis.util.FactoryException;
 import org.opengis.geometry.DirectPosition;

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -16,7 +16,7 @@
  */
 package org.apache.sis.referencing.operation.transform;
 
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.measure.quantity.Angle;
 import javax.measure.quantity.Length;
 import org.opengis.util.FactoryException;

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransform.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransform.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransform.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransform.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -17,7 +17,7 @@
 package org.apache.sis.referencing.operation.transform;
 
 import java.util.Arrays;
-import javax.measure.unit.Unit;
+import javax.measure.Unit;
 import javax.measure.quantity.Angle;
 import javax.measure.quantity.Length;
 import org.opengis.util.FactoryException;
@@ -36,6 +36,7 @@ import org.apache.sis.metadata.iso.citat
 import org.apache.sis.parameter.Parameters;
 import org.apache.sis.parameter.ParameterBuilder;
 import org.apache.sis.referencing.datum.DatumShiftGrid;
+import org.apache.sis.measure.Units;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.Debug;
 
@@ -61,7 +62,7 @@ import org.apache.sis.util.Debug;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see InterpolatedGeocentricTransform
@@ -219,7 +220,7 @@ public class InterpolatedMolodenskyTrans
         if (pg != context) {
             Δf = Δfmod / semiMinor;
             pg.getOrCreate(Molodensky.AXIS_LENGTH_DIFFERENCE).setValue(Δa, 
unit);
-            pg.getOrCreate(Molodensky.FLATTENING_DIFFERENCE) .setValue(Δf, 
Unit.ONE);
+            pg.getOrCreate(Molodensky.FLATTENING_DIFFERENCE) .setValue(Δf, 
Units.ONE);
         }
         if (grid instanceof DatumShiftGridFile<?,?>) {
             ((DatumShiftGridFile<?,?>) grid).setFileParameters(pg);

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedTransform.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedTransform.java?rev=1764673&r1=1764672&r2=1764673&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedTransform.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedTransform.java
 [UTF-8] Thu Oct 13 13:38:49 2016
@@ -17,11 +17,10 @@
 package org.apache.sis.referencing.operation.transform;
 
 import java.util.Arrays;
-import javax.measure.unit.Unit;
-import javax.measure.unit.NonSI;
-import javax.measure.quantity.Quantity;
-import javax.measure.converter.UnitConverter;
-import javax.measure.converter.LinearConverter;
+import java.util.Objects;
+import javax.measure.Unit;
+import javax.measure.Quantity;
+import javax.measure.UnitConverter;
 import org.opengis.util.FactoryException;
 import org.opengis.referencing.operation.Matrix;
 import org.opengis.referencing.operation.MathTransform;
@@ -41,9 +40,6 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.referencing.provider.NTv2;
 import org.apache.sis.internal.referencing.provider.DatumShiftGridFile;
 
-// Branch-specific imports
-import java.util.Objects;
-
 
 /**
  * Transforms between two CRS by performing translations interpolated from a 
grid file.
@@ -75,7 +71,7 @@ import java.util.Objects;
  * @author  Simon Reynard (Geomatys)
  * @author  Rueben Schulz (UBC)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  */
 public class InterpolatedTransform extends DatumShiftTransform {
@@ -132,7 +128,7 @@ public class InterpolatedTransform exten
      * @see #createGeodeticTransformation(MathTransformFactory, DatumShiftGrid)
      */
     @SuppressWarnings("OverridableMethodCallDuringObjectConstruction")
-    protected <T extends Quantity> InterpolatedTransform(final 
DatumShiftGrid<T,T> grid)
+    protected <T extends Quantity<T>> InterpolatedTransform(final 
DatumShiftGrid<T,T> grid)
             throws NoninvertibleMatrixException
     {
         /*
@@ -166,10 +162,10 @@ public class InterpolatedTransform exten
          * We concatenate the unit conversion with above "coordinate to grid" 
conversion.
          */
         @SuppressWarnings("unchecked")
-        final Unit<T> normalized = Units.isAngular(unit) ? (Unit<T>) 
NonSI.DEGREE_ANGLE : unit.toSI();
+        final Unit<T> normalized = Units.isAngular(unit) ? (Unit<T>) 
Units.DEGREE : unit.getSystemUnit();
         if (!unit.equals(normalized)) {
             final UnitConverter converter = normalized.getConverterTo(unit);
-            if (!(converter instanceof LinearConverter)) {
+            if (!converter.isLinear()) {
                 throw new 
IllegalArgumentException(Resources.format(Resources.Keys.NonLinearUnitConversion_2,
 normalized, unit));
             }
             final Double offset = converter.convert(0);
@@ -212,7 +208,7 @@ public class InterpolatedTransform exten
      * @return The transformation between geodetic coordinates.
      * @throws FactoryException if an error occurred while creating a 
transform.
      */
-    public static <T extends Quantity> MathTransform 
createGeodeticTransformation(
+    public static <T extends Quantity<T>> MathTransform 
createGeodeticTransformation(
             final MathTransformFactory factory, final DatumShiftGrid<T,T> 
grid) throws FactoryException
     {
         ArgumentChecks.ensureNonNull("grid", grid);



Reply via email to