sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1771937 [1/2] - in /sis/branches/JDK8: core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/ core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ core/sis-referencing/src/test/java/org/apache/sis/referencing/c...
Date Tue, 29 Nov 2016 18:21:30 GMT
Author: desruisseaux
Date: Tue Nov 29 18:21:30 2016
New Revision: 1771937

URL: http://svn.apache.org/viewvc?rev=1771937&view=rev
Log:
Refactor the code that provide the EPSG code for a given Coordinate System and unit of measurement.
That code has been moved into a new CoordinateSystems.getEpsgCode(Unit, AxisDirection...) method.
This will allow us to use the same functionality in more places than only the GeoTIFF reader.

Added:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Codes.java   (with props)
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CodesTest.java   (with props)
Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
    sis/branches/JDK8/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames.properties
    sis/branches/JDK8/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames_fr.properties
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/UnitFormatTest.java
    sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java

Added: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Codes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Codes.java?rev=1771937&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Codes.java (added)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Codes.java [UTF-8] Tue Nov 29 18:21:30 2016
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.referencing.cs;
+
+import java.util.Map;
+import java.util.HashMap;
+import javax.measure.Unit;
+import org.apache.sis.measure.Units;
+import org.apache.sis.util.ArraysExt;
+import org.opengis.referencing.cs.AxisDirection;
+
+import static org.apache.sis.internal.util.Constants.EPSG_METRE;
+import static org.apache.sis.internal.util.Constants.EPSG_AXIS_DEGREES;
+
+
+/**
+ * Map units of measurement and axis directions to {@link CoordinateSystem} objects defined in the EPSG database.
+ * Current version uses hard-coded mapping.
+ *
+ * @author  Rémi Marechal (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.8
+ * @version 0.8
+ * @module
+ */
+final class Codes {
+    /**
+     * Axis directions as a maximum of 4 directions packed in a single integer.
+     * Each byte is an {@link AxisDirection#ordinal()} value.
+     *
+     * @see #pack(AxisDirection[])
+     */
+    final int directions;
+
+    /**
+     * EPSG code of the target unit of measurement.
+     */
+    final short unit;
+
+    /**
+     * EPSG code of the coordinate reference system.
+     */
+    final short epsg;
+
+    /**
+     * Creates a new code for the given axis directions and units.
+     */
+    private Codes(final int directions, final short unit, final short epsg) {
+        this.directions = directions;
+        this.unit       = unit;
+        this.epsg       = epsg;
+    }
+
+    /**
+     * Packs the given axis directions in a single integer.
+     *
+     * @return the packed directions, or 0 if the given directions can not be packed.
+     */
+    private static int pack(final AxisDirection[] directions) {
+        int packed = 0;
+        int i = directions.length;
+        if (i <= Integer.BYTES) {
+            while (--i >= 0) {
+                final int ordinal = directions[i].ordinal();
+                if (ordinal <= 0 || ordinal > Byte.MAX_VALUE) {
+                    return 0;
+                }
+                packed = (packed << Byte.SIZE) | ordinal;
+            }
+        }
+        return packed;
+    }
+
+    /**
+     * Returns the EPSG code for the given axis directions and unit of measurement, or 0 if none.
+     */
+    static short lookup(final Unit<?> unit, final AxisDirection[] directions) {
+        final Integer uc = Units.getEpsgCode(unit, true);
+        if (uc != null) {
+            final int p = pack(directions);
+            if (p != 0) {
+                Codes m = new Codes(p, uc.shortValue(), (short) 0);
+                m = EPSG.get(m);
+                if (m != null) {
+                    return m.epsg;
+                }
+            }
+        }
+        return 0;
+    }
+
+    /**
+     * Returns the hash code value for this {@code Codes} instance.
+     * Note that {@link #lookup(AxisDirection[], Unit)} needs that the hash code excludes the EPSG code.
+     */
+    @Override
+    public int hashCode() {
+        return directions + unit;
+    }
+
+    /**
+     * Compares this {@code Codes} instance with the given object for equality.
+     * Note that {@link #lookup(AxisDirection[], Unit)} needs that the comparison excludes the EPSG code.
+     */
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj instanceof Codes) {
+            final Codes other = (Codes) obj;
+            return (directions == other.directions) && (unit == other.unit);
+        }
+        return false;
+    }
+
+    /**
+     * All hard-coded EPSG codes known to this class.
+     */
+    private static final Map<Codes,Codes> EPSG = new HashMap<>(20);
+    static {
+        final AxisDirection[] directions = new AxisDirection[] {AxisDirection.EAST, AxisDirection.NORTH};
+        int packed = pack(directions);
+        short unit = EPSG_METRE;
+loop:   for (int i=0; ; i++) {
+            final short epsg;
+            switch (i) {
+                case  0: epsg = 4400;                           break;      //  Cartesian   [E,N] in metres
+                case  1: epsg = 1039; unit = 9002;              break;      //  Cartesian   [E,N] in feet
+                case  2: epsg = 4497; unit = 9003;              break;      //  Cartesian   [E,N] in US survey feet
+                case  3: epsg = 4403; unit = 9005;              break;      //  Cartesian   [E,N] in Clarke feet
+                case  4: epsg = 6424; unit = EPSG_AXIS_DEGREES; break;      //  Ellipsoidal [E,N] in degrees
+                case  5: epsg = 6425; unit = 9105;              break;      //  Ellipsoidal [E,N] in gradians
+                case  6: epsg = 6429; unit = 9101;              break;      //  Ellipsoidal [E,N] in radians
+                case  7: ArraysExt.swap(directions, 0, 1);
+                         packed = pack(directions);
+                         epsg = 4500; unit = EPSG_METRE;        break;      //  Cartesian   [N,E] in metres
+                case  8: epsg = 1029; unit = 9002;              break;      //  Cartesian   [N,E] in feet
+                case  9: epsg = 4502; unit = 9005;              break;      //  Cartesian   [N,E] in Clarke feet
+                case 10: epsg = 6422; unit = EPSG_AXIS_DEGREES; break;      //  Ellipsoidal [N,E] in degrees
+                case 11: epsg = 6403; unit = 9105;              break;      //  Ellipsoidal [N,E] in gradians
+                case 12: epsg = 6428; unit = 9101;              break;      //  Ellipsoidal [N,E] in radians
+                case 13: directions[1] = AxisDirection.WEST;
+                         packed = pack(directions);
+                         epsg = 4501; unit = EPSG_METRE;        break;      //  Cartesian [N,W] in metres
+                case 14: ArraysExt.swap(directions, 0, 1);
+                         packed = pack(directions);
+                         epsg = 4491; break;                                //  Cartesian [W,N] in metres
+                case 15: directions[1] = AxisDirection.SOUTH;
+                         packed = pack(directions);
+                         epsg = 6503; break;                                //  Cartesian [W,S] in metres
+                case 16: ArraysExt.swap(directions, 0, 1);
+                         packed = pack(directions);
+                         epsg = 6501; break;                                //  Cartesian [S,W] in metres
+                default: break loop;
+            }
+            final Codes m = new Codes(packed, unit, epsg);
+            if (packed == 0 || EPSG.put(m, m) != null) {
+                throw new AssertionError(m.epsg);
+            }
+        }
+    }
+}

Propchange: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Codes.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Codes.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

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=1771937&r1=1771936&r2=1771937&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] Tue Nov 29 18:21:30 2016
@@ -31,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.util.NullArgumentException;
 import org.apache.sis.internal.util.DoubleDouble;
 import org.apache.sis.internal.metadata.AxisDirections;
 import org.apache.sis.internal.referencing.Resources;
@@ -38,6 +39,7 @@ import org.apache.sis.referencing.operat
 import org.apache.sis.referencing.operation.matrix.MatrixSIS;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
+import static org.apache.sis.util.ArgumentChecks.ensureNonNullElement;
 
 
 /**
@@ -229,20 +231,6 @@ 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.
-     */
-    private static AxisDirection[] getAxisDirections(final CoordinateSystem cs) {
-        final AxisDirection[] directions = new AxisDirection[cs.getDimension()];
-        for (int i=0; i<directions.length; i++) {
-            directions[i] = cs.getAxis(i).getDirection();
-        }
-        return directions;
-    }
-
-    /**
      * Returns an affine transform between two coordinate systems.
      * Only units and axes order (e.g. transforming from
      * ({@linkplain AxisDirection#NORTH North}, {@linkplain AxisDirection#WEST West}) to
@@ -429,7 +417,7 @@ 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,
+     * @return the modified coordinate system as a new instance, or {@code null} if the given {@code cs} was null,
      *         or {@code cs} if all linear units were already equal to the given one.
      *
      * @see Units#isLinear(Unit)
@@ -460,7 +448,7 @@ 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,
+     * @return the modified coordinate system as a new instance, or {@code null} if the given {@code cs} was null,
      *         or {@code cs} if all angular units were already equal to the given one.
      *
      * @see Units#isAngular(Unit)
@@ -475,4 +463,74 @@ public final class CoordinateSystems ext
             }
         });
     }
+
+    /**
+     * Returns the axis directions for the specified coordinate system.
+     * This method guarantees that the returned array is non-null and does not contain any null direction.
+     *
+     * @param  cs  the coordinate system.
+     * @return the axis directions for the specified coordinate system.
+     * @throws NullArgumentException if {@code cs} is null, or one of its axes is null,
+     *         or a value returned by {@link CoordinateSystemAxis#getDirection()} is null.
+     *
+     * @since 0.8
+     */
+    public static AxisDirection[] getAxisDirections(final CoordinateSystem cs) {
+        ensureNonNull("cs", cs);
+        final AxisDirection[] directions = new AxisDirection[cs.getDimension()];
+        for (int i=0; i<directions.length; i++) {
+            final CoordinateSystemAxis axis = cs.getAxis(i);
+            ensureNonNullElement("cs", i, cs);
+            ensureNonNullElement("cs[#].direction", i, directions[i] = axis.getDirection());
+        }
+        return directions;
+    }
+
+    /**
+     * Returns the EPSG code of a coordinate system using the given unit and axis directions.
+     * If no suitable coordinate system is known to Apache SIS, then this method returns {@code null}.
+     *
+     * <p>Current implementation uses a hard-coded list of known coordinate systems;
+     * it does not yet scan the EPSG database (this may change in future Apache SIS version).
+     * The current list of known coordinate systems is given below.</p>
+     *
+     * <table>
+     *   <caption>Known coordinate systems (CS)</caption>
+     *   <tr><th>EPSG</th> <th>CS type</th> <th colspan="2">Axis directions</th> <th>Unit</th></tr>
+     *   <tr><td>6424</td> <td>Ellipsoidal</td> <td>east</td>  <td>north</td> <td>degree</td></tr>
+     *   <tr><td>6422</td> <td>Ellipsoidal</td> <td>north</td> <td>east</td>  <td>degree</td></tr>
+     *   <tr><td>6425</td> <td>Ellipsoidal</td> <td>east</td>  <td>north</td> <td>grads</td></tr>
+     *   <tr><td>6403</td> <td>Ellipsoidal</td> <td>north</td> <td>east</td>  <td>grads</td></tr>
+     *   <tr><td>6429</td> <td>Ellipsoidal</td> <td>east</td>  <td>north</td> <td>radian</td></tr>
+     *   <tr><td>6428</td> <td>Ellipsoidal</td> <td>north</td> <td>east</td>  <td>radian</td></tr>
+     *   <tr><td>4400</td> <td>Cartesian</td>   <td>east</td>  <td>north</td> <td>metre</td></tr>
+     *   <tr><td>4500</td> <td>Cartesian</td>   <td>north</td> <td>east</td>  <td>metre</td></tr>
+     *   <tr><td>4491</td> <td>Cartesian</td>   <td>west</td>  <td>north</td> <td>metre</td></tr>
+     *   <tr><td>4501</td> <td>Cartesian</td>   <td>north</td> <td>west</td>  <td>metre</td></tr>
+     *   <tr><td>6503</td> <td>Cartesian</td>   <td>west</td>  <td>south</td> <td>metre</td></tr>
+     *   <tr><td>6501</td> <td>Cartesian</td>   <td>south</td> <td>west</td>  <td>metre</td></tr>
+     *   <tr><td>1039</td> <td>Cartesian</td>   <td>east</td>  <td>north</td> <td>foot</td></tr>
+     *   <tr><td>1029</td> <td>Cartesian</td>   <td>north</td> <td>east</td>  <td>foot</td></tr>
+     *   <tr><td>4403</td> <td>Cartesian</td>   <td>east</td>  <td>north</td> <td>Clarke’s foot</td></tr>
+     *   <tr><td>4502</td> <td>Cartesian</td>   <td>north</td> <td>east</td>  <td>Clarke’s foot</td></tr>
+     *   <tr><td>4497</td> <td>Cartesian</td>   <td>east</td>  <td>north</td> <td>US survey foot</td></tr>
+     * </table>
+     *
+     * @param  unit        desired unit of measurement.
+     * @param  directions  desired axis directions.
+     * @return EPSG codes for a coordinate system using the given axis directions and unit of measurement,
+     *         or {@code null} if unknown to this method. Note that a null value does not mean that a more
+     *         extensive search in the EPSG database would not find a matching coordinate system.
+     *
+     * @see Units#getEpsgCode(Unit, boolean)
+     * @see org.apache.sis.referencing.factory.GeodeticAuthorityFactory#createCoordinateSystem(String)
+     *
+     * @since 0.8
+     */
+    public static Integer getEpsgCode(final Unit<?> unit, final AxisDirection... directions) {
+        ensureNonNull("unit", unit);
+        ensureNonNull("directions", directions);
+        final int code = Codes.lookup(unit, directions);
+        return (code != 0) ? code : null;
+    }
 }

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=1771937&r1=1771936&r2=1771937&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] Tue Nov 29 18:21:30 2016
@@ -98,7 +98,7 @@ public abstract class GeodeticAuthorityF
      *
      * The online resource description with a “Connection” function is a SIS extension.</div>
      *
-     * @return The organization responsible for definition of the database, or {@code null} if unknown.
+     * @return the organization responsible for definition of the database, or {@code null} if unknown.
      *
      * @see #getVendor()
      */
@@ -135,7 +135,7 @@ public abstract class GeodeticAuthorityF
      * Subclasses can override this method, but the set should always contain the same elements during
      * all factory lifetime.
      *
-     * @return The namespaces recognized by this factory, or an empty set if none.
+     * @return the namespaces recognized by this factory, or an empty set if none.
      */
     public Set<String> getCodeSpaces() {
         final String authority = Citations.getCodeSpace(getAuthority());
@@ -152,8 +152,8 @@ public abstract class GeodeticAuthorityF
      * This may be costly since it involves a full object creation.
      * Subclasses are encouraged to provide a more efficient implementation if they can.
      *
-     * @param  code Value allocated by authority.
-     * @return A description of the object, or {@code null} if the object
+     * @param  code  value allocated by authority.
+     * @return a description of the object, or {@code null} if the object
      *         corresponding to the specified {@code code} has no description.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if an error occurred while fetching the description.
@@ -176,8 +176,8 @@ public abstract class GeodeticAuthorityF
      * Overriding this method is sufficient for supporting the more specific {@code createFoo(String)} methods,
      * but subclasses are encouraged to override the later for efficiency.
      *
-     * @param  code Value allocated by authority.
-     * @return The object for the given code.
+     * @param  code  value allocated by authority.
+     * @return the object for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -217,8 +217,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createObject(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate reference system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -262,8 +262,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate reference system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -296,8 +296,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate reference system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed.
      *
@@ -331,8 +331,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate reference system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -362,8 +362,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate reference system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -381,8 +381,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate reference system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -400,8 +400,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate reference system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -429,8 +429,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate reference system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -448,8 +448,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate reference system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -476,8 +476,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate reference system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -496,8 +496,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate reference system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate reference system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -530,8 +530,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createObject(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The datum for the given code.
+     * @param  code  value allocated by authority.
+     * @return the datum for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -563,8 +563,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createDatum(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The datum for the given code.
+     * @param  code  value allocated by authority.
+     * @return the datum for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -597,8 +597,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createDatum(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The datum for the given code.
+     * @param  code  value allocated by authority.
+     * @return the datum for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -616,8 +616,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createDatum(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The datum for the given code.
+     * @param  code  value allocated by authority.
+     * @return the datum for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -635,8 +635,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createDatum(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The datum for the given code.
+     * @param  code  value allocated by authority.
+     * @return the datum for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -666,8 +666,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createDatum(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The datum for the given code.
+     * @param  code  value allocated by authority.
+     * @return the datum for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -686,8 +686,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createDatum(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The datum for the given code.
+     * @param  code  value allocated by authority.
+     * @return the datum for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -717,8 +717,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createObject(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The ellipsoid for the given code.
+     * @param  code  value allocated by authority.
+     * @return the ellipsoid for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -750,8 +750,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createObject(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The prime meridian for the given code.
+     * @param  code  value allocated by authority.
+     * @return the prime meridian for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -780,8 +780,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createObject(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The extent for the given code.
+     * @param  code  value allocated by authority.
+     * @return the extent for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -815,12 +815,13 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createObject(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
      * @see org.apache.sis.referencing.cs.AbstractCS
+     * @see org.apache.sis.referencing.cs.CoordinateSystems#getEpsgCode(Unit, AxisDirection...)
      */
     public CoordinateSystem createCoordinateSystem(final String code) throws NoSuchAuthorityCodeException, FactoryException {
         return cast(CoordinateSystem.class, createObject(code), code);
@@ -847,8 +848,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -876,8 +877,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -895,8 +896,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -913,8 +914,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -945,8 +946,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -974,8 +975,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -993,8 +994,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -1012,8 +1013,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The coordinate system for the given code.
+     * @param  code  value allocated by authority.
+     * @return the coordinate system for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -1043,8 +1044,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createObject(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The axis for the given code.
+     * @param  code  value allocated by authority.
+     * @return the axis for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -1079,8 +1080,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createObject(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The unit of measurement for the given code.
+     * @param  code  value allocated by authority.
+     * @return the unit of measurement for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -1111,8 +1112,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createObject(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The parameter descriptor for the given code.
+     * @param  code  value allocated by authority.
+     * @return the parameter descriptor for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -1139,8 +1140,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createObject(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The operation method for the given code.
+     * @param  code  value allocated by authority.
+     * @return the operation method for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -1173,8 +1174,8 @@ public abstract class GeodeticAuthorityF
      * The default implementation delegates to {@link #createObject(String)} and casts the result.
      * If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
      *
-     * @param  code Value allocated by authority.
-     * @return The operation for the given code.
+     * @param  code  value allocated by authority.
+     * @return the operation for the given code.
      * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      *
@@ -1194,9 +1195,9 @@ public abstract class GeodeticAuthorityF
      * <div class="section">Default implementation</div>
      * The default implementation returns an empty set.
      *
-     * @param  sourceCRS  Coded value of source coordinate reference system.
-     * @param  targetCRS  Coded value of target coordinate reference system.
-     * @return The operations from {@code sourceCRS} to {@code targetCRS}.
+     * @param  sourceCRS  coded value of source coordinate reference system.
+     * @param  targetCRS  coded value of target coordinate reference system.
+     * @return the operations from {@code sourceCRS} to {@code targetCRS}.
      * @throws NoSuchAuthorityCodeException if a specified code was not found.
      * @throws FactoryException if the object creation failed for some other reason.
      */
@@ -1212,7 +1213,7 @@ public abstract class GeodeticAuthorityF
      * from an incomplete one, for example from an object without "{@code ID[…]}" or
      * "{@code AUTHORITY[…]}" element in <cite>Well Known Text</cite>.
      *
-     * @return A finder to use for looking up unidentified objects.
+     * @return a finder to use for looking up unidentified objects.
      * @throws FactoryException if the finder can not be created.
      *
      * @see org.apache.sis.referencing.IdentifiedObjects#newFinder(String)
@@ -1233,8 +1234,8 @@ public abstract class GeodeticAuthorityF
      * and the specified code start with the {@code "EPSG:"} prefix, then the prefix is removed.
      * Otherwise, the string is returned unchanged (except for leading and trailing spaces).
      *
-     * @param  code The code to trim.
-     * @return The code with the namespace part removed if that part matched one of the values given by
+     * @param  code  the code to trim.
+     * @return the code with the namespace part removed if that part matched one of the values given by
      *         {@link #getCodeSpaces()}.
      */
     final String trimNamespace(final String code) {
@@ -1265,10 +1266,10 @@ public abstract class GeodeticAuthorityF
      * Casts the given object to the given type, or throws an exception if the object can not be casted.
      * This convenience method is provided for implementation of {@code createXXX} methods.
      *
-     * @param  type   The type to return (e.g. {@code CoordinateReferenceSystem.class}).
-     * @param  object The object to cast.
-     * @param  code   The authority code, used only for formatting an error message.
-     * @return The object casted to the given type.
+     * @param  type    the type to return (e.g. {@code CoordinateReferenceSystem.class}).
+     * @param  object  the object to cast.
+     * @param  code    the authority code, used only for formatting an error message.
+     * @return the object casted to the given type.
      * @throws NoSuchAuthorityCodeException if the given object is not an instance of the given type.
      */
     @SuppressWarnings("unchecked")

Added: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CodesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CodesTest.java?rev=1771937&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CodesTest.java (added)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CodesTest.java [UTF-8] Tue Nov 29 18:21:30 2016
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.referencing.cs;
+
+import java.util.Map;
+import javax.measure.Unit;
+import java.lang.reflect.Field;
+import org.opengis.util.FactoryException;
+import org.opengis.referencing.cs.AxisDirection;
+import org.opengis.referencing.cs.CoordinateSystem;
+import org.opengis.referencing.cs.CSAuthorityFactory;
+import org.opengis.referencing.crs.CRSAuthorityFactory;
+import org.apache.sis.referencing.factory.UnavailableFactoryException;
+import org.apache.sis.referencing.factory.sql.EPSGFactory;
+import org.apache.sis.referencing.CRS;
+import org.apache.sis.test.TestCase;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+import static org.junit.Assume.*;
+
+
+/**
+ * Compares the {@link Codes} elements with the EPSG geodetic database.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.8
+ * @version 0.8
+ * @module
+ */
+public final strictfp class CodesTest extends TestCase {
+    /**
+     * Returns the EPSG factory, or skips the test if the factory is not available.
+     */
+    private static CSAuthorityFactory factory() throws FactoryException {
+        final CRSAuthorityFactory factory = CRS.getAuthorityFactory("EPSG");
+        assumeTrue("No connection to EPSG dataset.", factory instanceof EPSGFactory);
+        try {
+            assertNotNull(factory.createGeographicCRS("4326"));
+        } catch (UnavailableFactoryException e) {
+            assumeTrue("No connection to EPSG dataset.", false);
+        }
+        return (EPSGFactory) factory;
+    }
+
+    /**
+     * Compares the axis directions and units with EPSG definitions.
+     *
+     * @throws Exception if an error occurred while fetching the codes or querying the database.
+     */
+    @Test
+    @SuppressWarnings("unchecked")
+    public void verify() throws Exception {
+        final CSAuthorityFactory factory = factory();
+        final Field field = Codes.class.getDeclaredField("EPSG");
+        field.setAccessible(true);
+        for (final Codes c : ((Map<Codes,?>) field.get(null)).keySet()) {
+            final CoordinateSystem cs = factory.createCoordinateSystem(String.valueOf(c.epsg));
+            final Unit<?> unit = cs.getAxis(0).getUnit();
+            final AxisDirection[] directions = new AxisDirection[cs.getDimension()];
+            for (int i=0; i<directions.length; i++) {
+                assertEquals(unit, cs.getAxis(i).getUnit());
+                directions[i] = cs.getAxis(i).getDirection();
+            }
+            assertEquals("Codes.lookpup(…)", c.epsg, Codes.lookup(unit, directions));
+        }
+    }
+}

Propchange: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CodesTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CodesTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1771937&r1=1771936&r2=1771937&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Tue Nov 29 18:21:30 2016
@@ -216,6 +216,7 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.factory.sql.EPSGDataFormatterTest.class,
     org.apache.sis.referencing.EPSGFactoryFallbackTest.class,
     org.apache.sis.referencing.AuthorityFactoriesTest.class,
+    org.apache.sis.referencing.cs.CodesTest.class,
     org.apache.sis.referencing.CRSTest.class,
 
     // Coordinate operation finders are last, since they need everything else.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java?rev=1771937&r1=1771936&r2=1771937&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8] Tue Nov 29 18:21:30 2016
@@ -22,8 +22,9 @@ import javax.measure.UnitConverter;
 import javax.measure.format.ParserException;
 import javax.measure.Quantity;
 import javax.measure.quantity.*;
-import javax.measure.quantity.Angle;            // Because of name collision with Angle in this SIS package.
-import org.opengis.geometry.DirectPosition;     // For javadoc
+import javax.measure.quantity.Angle;                // Because of name collision with Angle in this SIS package.
+import org.opengis.geometry.DirectPosition;         // For javadoc
+import org.opengis.referencing.cs.AxisDirection;    // For javadoc
 
 import org.apache.sis.util.Static;
 import org.apache.sis.util.Workaround;
@@ -86,7 +87,7 @@ public final class Units extends Static
      * <div class="note"><p class="simpleTagLabel" style="margin-bottom:0">Related units:</p>
      * <table class="compact" summary="Related units" style="margin-left:30px; line-height:1.25">
      *   <tr><td>SI units:</td>         <td style="word-spacing:1em"><u>{@code NANOMETRE}</u>, {@link #MILLIMETRE}, {@link #CENTIMETRE}, <b>{@link #METRE}</b>, {@link #KILOMETRE}.</td></tr>
-     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
+     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #CLARKE_FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
      *   <tr><td>Derived units:</td>    <td style="word-spacing:1em">{@link #SQUARE_METRE}, {@link #CUBIC_METRE}, {@link #METRES_PER_SECOND}.</td></tr>
      * </table></div>
      *
@@ -104,7 +105,7 @@ public final class Units extends Static
      * <div class="note"><p class="simpleTagLabel" style="margin-bottom:0">Related units:</p>
      * <table class="compact" summary="Related units" style="margin-left:30px; line-height:1.25">
      *   <tr><td>SI length units:</td>  <td style="word-spacing:1em">{@link #NANOMETRE}, <u>{@code MILLIMETRE}</u>, {@link #CENTIMETRE}, <b>{@link #METRE}</b>, {@link #KILOMETRE}.</td></tr>
-     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
+     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #CLARKE_FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
      *   <tr><td>Derived units:</td>    <td style="word-spacing:1em">{@link #SQUARE_METRE}, {@link #CUBIC_METRE}, {@link #METRES_PER_SECOND}.</td></tr>
      * </table></div>
      *
@@ -120,7 +121,7 @@ public final class Units extends Static
      * <div class="note"><p class="simpleTagLabel" style="margin-bottom:0">Related units:</p>
      * <table class="compact" summary="Related units" style="margin-left:30px; line-height:1.25">
      *   <tr><td>SI length units:</td>  <td style="word-spacing:1em">{@link #NANOMETRE}, {@link #MILLIMETRE}, <u>{@code CENTIMETRE}</u>, <b>{@link #METRE}</b>, {@link #KILOMETRE}.</td></tr>
-     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
+     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #CLARKE_FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
      *   <tr><td>Derived units:</td>    <td style="word-spacing:1em">{@link #SQUARE_METRE}, {@link #CUBIC_METRE}, {@link #METRES_PER_SECOND}.</td></tr>
      * </table></div>
      *
@@ -136,7 +137,7 @@ public final class Units extends Static
      * <div class="note"><p class="simpleTagLabel" style="margin-bottom:0">Related units:</p>
      * <table class="compact" summary="Related units" style="margin-left:30px; line-height:1.25">
      *   <tr><td>SI length units:</td>  <td style="word-spacing:1em">{@link #NANOMETRE}, {@link #MILLIMETRE}, {@link #CENTIMETRE}, <u><b>{@code METRE}</b></u>, {@link #KILOMETRE}.</td></tr>
-     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
+     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #CLARKE_FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
      *   <tr><td>Derived units:</td>    <td style="word-spacing:1em">{@link #SQUARE_METRE}, {@link #CUBIC_METRE}, {@link #METRES_PER_SECOND}.</td></tr>
      * </table></div>
      *
@@ -152,7 +153,7 @@ public final class Units extends Static
      * <div class="note"><p class="simpleTagLabel" style="margin-bottom:0">Related units:</p>
      * <table class="compact" summary="Related units" style="margin-left:30px; line-height:1.25">
      *   <tr><td>SI length units:</td>  <td style="word-spacing:1em">{@link #NANOMETRE}, {@link #MILLIMETRE}, {@link #CENTIMETRE}, <b>{@link #METRE}</b>, <u>{@code KILOMETRE}</u>.</td></tr>
-     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
+     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #CLARKE_FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
      *   <tr><td>Derived units:</td>    <td style="word-spacing:1em">{@link #SQUARE_METRE}, {@link #CUBIC_METRE}, {@link #KILOMETRES_PER_HOUR}.</td></tr>
      * </table></div>
      *
@@ -174,7 +175,7 @@ public final class Units extends Static
      * <div class="note"><p class="simpleTagLabel" style="margin-bottom:0">Related units:</p>
      * <table class="compact" summary="Related units" style="margin-left:30px; line-height:1.25">
      *   <tr><td>SI length units:</td>  <td style="word-spacing:1em">{@link #NANOMETRE}, {@link #MILLIMETRE}, {@link #CENTIMETRE}, <b>{@link #METRE}</b>, {@link #KILOMETRE}.</td></tr>
-     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, <u>{@code NAUTICAL_MILE}</u>.</td></tr>
+     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #CLARKE_FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, <u>{@code NAUTICAL_MILE}</u>.</td></tr>
      *   <tr><td>Derived units:</td>    <td style="word-spacing:1em">{@link #SQUARE_METRE}, {@link #CUBIC_METRE}, {@link #KILOMETRES_PER_HOUR}.</td></tr>
      * </table></div>
      *
@@ -194,7 +195,7 @@ public final class Units extends Static
      * <div class="note"><p class="simpleTagLabel" style="margin-bottom:0">Related units:</p>
      * <table class="compact" summary="Related units" style="margin-left:30px; line-height:1.25">
      *   <tr><td>SI length units:</td>  <td style="word-spacing:1em">{@link #NANOMETRE}, {@link #MILLIMETRE}, {@link #CENTIMETRE}, <b>{@link #METRE}</b>, {@link #KILOMETRE}.</td></tr>
-     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #US_SURVEY_FOOT}, <u>{@code STATUTE_MILE}</u>, {@link #NAUTICAL_MILE}.</td></tr>
+     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #CLARKE_FOOT}, {@link #US_SURVEY_FOOT}, <u>{@code STATUTE_MILE}</u>, {@link #NAUTICAL_MILE}.</td></tr>
      *   <tr><td>Derived units:</td>    <td style="word-spacing:1em">{@link #SQUARE_METRE}, {@link #CUBIC_METRE}, {@link #KILOMETRES_PER_HOUR}.</td></tr>
      * </table></div>
      *
@@ -211,7 +212,7 @@ public final class Units extends Static
      * <div class="note"><p class="simpleTagLabel" style="margin-bottom:0">Related units:</p>
      * <table class="compact" summary="Related units" style="margin-left:30px; line-height:1.25">
      *   <tr><td>SI length units:</td>  <td style="word-spacing:1em">{@link #NANOMETRE}, {@link #MILLIMETRE}, {@link #CENTIMETRE}, <b>{@link #METRE}</b>, {@link #KILOMETRE}.</td></tr>
-     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, <u>{@code US_SURVEY_FOOT}</u>, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
+     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, {@link #CLARKE_FOOT}, <u>{@code US_SURVEY_FOOT}</u>, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
      *   <tr><td>Derived units:</td>    <td style="word-spacing:1em">{@link #SQUARE_METRE}, {@link #CUBIC_METRE}, {@link #METRES_PER_SECOND}.</td></tr>
      * </table></div>
      *
@@ -220,6 +221,22 @@ public final class Units extends Static
     public static final Unit<Length> US_SURVEY_FOOT;
 
     /**
+     * Unit of measurement defined as 0.3047972654 metres.
+     * The {@linkplain ConventionalUnit#getSystemUnit() system unit} is {@link #METRE},
+     * the unlocalized name is “Clarke’s foot” and the identifier is EPSG:9005.
+     *
+     * <div class="note"><p class="simpleTagLabel" style="margin-bottom:0">Related units:</p>
+     * <table class="compact" summary="Related units" style="margin-left:30px; line-height:1.25">
+     *   <tr><td>SI length units:</td>  <td style="word-spacing:1em">{@link #NANOMETRE}, {@link #MILLIMETRE}, {@link #CENTIMETRE}, <b>{@link #METRE}</b>, {@link #KILOMETRE}.</td></tr>
+     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, {@link #FOOT}, <u>{@code CLARKE_FOOT}</u>, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
+     *   <tr><td>Derived units:</td>    <td style="word-spacing:1em">{@link #SQUARE_METRE}, {@link #CUBIC_METRE}, {@link #METRES_PER_SECOND}.</td></tr>
+     * </table></div>
+     *
+     * @since 0.8
+     */
+    public static final Unit<Length> CLARKE_FOOT;
+
+    /**
      * Unit of measurement defined as exactly 0.3048 metres (1 ft).
      * The {@linkplain ConventionalUnit#getSystemUnit() system unit} is {@link #METRE},
      * the unlocalized name is “foot” and the identifier is EPSG:9002.
@@ -227,7 +244,7 @@ public final class Units extends Static
      * <div class="note"><p class="simpleTagLabel" style="margin-bottom:0">Related units:</p>
      * <table class="compact" summary="Related units" style="margin-left:30px; line-height:1.25">
      *   <tr><td>SI length units:</td>  <td style="word-spacing:1em">{@link #NANOMETRE}, {@link #MILLIMETRE}, {@link #CENTIMETRE}, <b>{@link #METRE}</b>, {@link #KILOMETRE}.</td></tr>
-     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, <u>{@code FOOT}</u>, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
+     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, {@link #INCH}, <u>{@code FOOT}</u>, {@link #CLARKE_FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
      *   <tr><td>Derived units:</td>    <td style="word-spacing:1em">{@link #SQUARE_METRE}, {@link #CUBIC_METRE}, {@link #METRES_PER_SECOND}.</td></tr>
      * </table></div>
      *
@@ -243,7 +260,7 @@ public final class Units extends Static
      * <div class="note"><p class="simpleTagLabel" style="margin-bottom:0">Related units:</p>
      * <table class="compact" summary="Related units" style="margin-left:30px; line-height:1.25">
      *   <tr><td>SI length units:</td>  <td style="word-spacing:1em">{@link #NANOMETRE}, {@link #MILLIMETRE}, {@link #CENTIMETRE}, <b>{@link #METRE}</b>, {@link #KILOMETRE}.</td></tr>
-     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, <u>{@code INCH}</u>, {@link #FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
+     *   <tr><td>In other systems:</td> <td style="word-spacing:1em">{@link #POINT}, <u>{@code INCH}</u>, {@link #FOOT}, {@link #CLARKE_FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
      *   <tr><td>Derived units:</td>    <td style="word-spacing:1em">{@link #SQUARE_METRE}, {@link #CUBIC_METRE}, {@link #METRES_PER_SECOND}.</td></tr>
      * </table></div>
      *
@@ -260,7 +277,7 @@ public final class Units extends Static
      * <div class="note"><p class="simpleTagLabel" style="margin-bottom:0">Related units:</p>
      * <table class="compact" summary="Related units" style="margin-left:30px; line-height:1.25">
      *   <tr><td>SI length units:</td>  <td style="word-spacing:1em">{@link #NANOMETRE}, {@link #MILLIMETRE}, {@link #CENTIMETRE}, <b>{@link #METRE}</b>, {@link #KILOMETRE}.</td></tr>
-     *   <tr><td>In other systems:</td> <td style="word-spacing:1em"><u>{@code POINT}</u>, {@link #INCH}, {@link #FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
+     *   <tr><td>In other systems:</td> <td style="word-spacing:1em"><u>{@code POINT}</u>, {@link #INCH}, {@link #FOOT}, {@link #CLARKE_FOOT}, {@link #US_SURVEY_FOOT}, {@link #STATUTE_MILE}, {@link #NAUTICAL_MILE}.</td></tr>
      *   <tr><td>Derived units:</td>    <td style="word-spacing:1em">{@link #SQUARE_METRE}, {@link #CUBIC_METRE}, {@link #METRES_PER_SECOND}.</td></tr>
      * </table></div>
      *
@@ -1078,7 +1095,7 @@ public final class Units extends Static
         /*
          * All Unit<Length>.
          */
-        m.related(6);
+        m.related(7);
         METRE          = m;
         NANOMETRE      = add(m, nano,                                     "nm",    UnitRegistry.SI,       (short) 0);
         MILLIMETRE     = add(m, milli,                                    "mm",    UnitRegistry.SI,       (short) 1025);
@@ -1086,7 +1103,8 @@ public final class Units extends Static
         KILOMETRE      = add(m, kilo,                                     "km",    UnitRegistry.SI,       (short) 9036);
         NAUTICAL_MILE  = add(m, LinearConverter.scale(   1852,        1), "M",     UnitRegistry.OTHER,    (short) 9030);
         STATUTE_MILE   = add(m, LinearConverter.scale(1609344,      100), "mi",    UnitRegistry.IMPERIAL, (short) 9093);
-        US_SURVEY_FOOT = add(m, LinearConverter.scale(   1200,     3937), "ft_US", UnitRegistry.OTHER,    (short) 9003);
+        US_SURVEY_FOOT = add(m, LinearConverter.scale(   1200,     3937), "ftUS",  UnitRegistry.OTHER,    (short) 9003);
+        CLARKE_FOOT    = add(m, LinearConverter.scale(3047972654d, 1E10), "ftCla", UnitRegistry.OTHER,    (short) 9005);
         FOOT           = add(m, LinearConverter.scale(   3048,    10000), "ft",    UnitRegistry.IMPERIAL, (short) 9002);
         INCH           = add(m, LinearConverter.scale(    254,    10000), "in",    UnitRegistry.IMPERIAL, (short) 0);
         POINT          = add(m, LinearConverter.scale( 996264, 72000000), "pt",    UnitRegistry.OTHER,    (short) 0);
@@ -1681,6 +1699,8 @@ public final class Units extends Static
      * @return the EPSG code of the given units, or {@code null} if unknown.
      *
      * @since 0.4
+     *
+     * @see org.apache.sis.referencing.cs.CoordinateSystems#getEpsgCode(Unit, AxisDirection...)
      */
     public static Integer getEpsgCode(Unit<?> unit, final boolean inAxis) {
         if (unit != null) {

Modified: sis/branches/JDK8/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames.properties?rev=1771937&r1=1771936&r2=1771937&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames.properties [ISO-8859-1] Tue Nov 29 18:21:30 2016
@@ -9,7 +9,8 @@ d=day
 dbar=decibar
 F=farad
 ft=foot
-ft_US=US survey foot
+ftCla=Clarke\u2019s foot
+ftUS=US survey foot
 grad=grad
 h=hour
 ha=hectare
@@ -26,8 +27,8 @@ lm=lumen
 lx=lux
 M=nautical mile
 m=metre
-m²=square metre
-m³=cubic metre
+m\u00b2=square metre
+m\u00b3=cubic metre
 m\u2215s=metres per second
 mi=statute mile
 min=minute
@@ -51,11 +52,11 @@ V=volt
 W=watt
 Wb=weber
 wk=week
-µrad=microradian
+\u00b5rad=microradian
 \u03a9=ohm
 %=percentage
-°=degree
+\u00b0=degree
 \u2032=arc-minute
 \u2033=arc-second
-°C=Celsius
-°F=Fahrenheit
+\u00b0C=Celsius
+\u00b0F=Fahrenheit

Modified: sis/branches/JDK8/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames_fr.properties?rev=1771937&r1=1771936&r2=1771937&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames_fr.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames_fr.properties [ISO-8859-1] Tue Nov 29 18:21:30 2016
@@ -1,31 +1,33 @@
 # Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
-A=ampère
-a=année
-atm=atmosphère
-cm=centimètre
+A=amp\u00e8re
+a=ann\u00e9e
+atm=atmosph\u00e8re
+cm=centim\u00e8tre
 d=jour
 ft=pied
+ftCla=pied de Clarke
+ftUS=pied am\u00e9ricain
 grad=grade
 h=heure
 in=pouce
 kg=kilogramme
-km=kilomètre
-km\u2215h=kilomètres par heure
+km=kilom\u00e8tre
+km\u2215h=kilom\u00e8tres par heure
 M=mille marin international
-m=mètre
-m²=mètre carré
-m³=mètre cube
-m\u2215s=mètres par seconde
+m=m\u00e8tre
+m\u00b2=m\u00e8tre carr\u00e9
+m\u00b3=m\u00e8tre cube
+m\u2215s=m\u00e8tres par seconde
 mi=mille terrestre international
-mm=millimètre
+mm=millim\u00e8tre
 ms=milliseconde
-nm=nanomètre
+nm=nanom\u00e8tre
 ppm=parties par million
 s=seconde
-sr=stéradian
-unity=unité
+sr=st\u00e9radian
+unity=unit\u00e9
 wk=semaine
 %=pourcentage
-°=degrée
+\u00b0=degr\u00e9e
 \u2032=arc-minute
 \u2033=arc-seconde

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/UnitFormatTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/UnitFormatTest.java?rev=1771937&r1=1771936&r2=1771937&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/UnitFormatTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/UnitFormatTest.java [UTF-8] Tue Nov 29 18:21:30 2016
@@ -64,7 +64,8 @@ public final strictfp class UnitFormatTe
         verify(declared, "KILOMETRE",           "L",            "km",    "kilometre",               Units.KILOMETRE);
         verify(declared, "NAUTICAL_MILE",       "L",            "M",     "nautical mile",           Units.NAUTICAL_MILE);
         verify(declared, "STATUTE_MILE",        "L",            "mi",    "statute mile",            Units.STATUTE_MILE);
-        verify(declared, "US_SURVEY_FOOT",      "L",            "ft_US", "US survey foot",          Units.US_SURVEY_FOOT);
+        verify(declared, "US_SURVEY_FOOT",      "L",            "ftUS",  "US survey foot",          Units.US_SURVEY_FOOT);
+        verify(declared, "CLARKE_FOOT",         "L",            "ftCla", "Clarke’s foot",           Units.CLARKE_FOOT);
         verify(declared, "FOOT",                "L",            "ft",    "foot",                    Units.FOOT);
         verify(declared, "INCH",                "L",            "in",    "inch",                    Units.INCH);
         verify(declared, "POINT",               "L",            "pt",    "point",                   Units.POINT);



Mime
View raw message