sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1555456 [2/2] - in /sis/trunk: ./ application/sis-console/src/site/resources/css/ application/sis-webapp/src/site/resources/css/ application/src/site/resources/css/ core/sis-build-helper/src/site/resources/css/ core/sis-feature/src/site/ c...
Date Sun, 05 Jan 2014 04:29:22 GMT
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -370,6 +370,21 @@ public class DefaultEllipsoid extends Ab
     }
 
     /**
+     * Returns the GeoAPI interface implemented by this class.
+     * The SIS implementation returns {@code Ellipsoid.class}.
+     *
+     * {@note Subclasses usually do not need to override this method since GeoAPI does not define
+     *        <code>Ellipsoid</code> sub-interface. This method may be overridden if an implementor
+     *        extended GeoAPI with his own set of interfaces.}
+     *
+     * @return {@code Ellipsoid.class} or a user-defined sub-interface.
+     */
+    @Override
+    public Class<? extends Ellipsoid> getInterface() {
+        return Ellipsoid.class;
+    }
+
+    /**
      * Returns the linear unit of the {@linkplain #getSemiMajorAxis() semi-major}
      * and {@linkplain #getSemiMinorAxis() semi-minor} axis values.
      *
@@ -691,7 +706,7 @@ public class DefaultEllipsoid extends Ab
         if (object == this) {
             return true; // Slight optimization.
         }
-        if (!(object instanceof Ellipsoid && super.equals(object, mode))) {
+        if (!super.equals(object, mode)) {
             return false;
         }
         switch (mode) {
@@ -724,7 +739,7 @@ public class DefaultEllipsoid extends Ab
     }
 
     /**
-     * Invoked by {@link #hashCode()} for computing the hash code when first needed.
+     * Invoked by {@code hashCode()} for computing the hash code when first needed.
      * See {@link org.apache.sis.referencing.AbstractIdentifiedObject#computeHashCode()}
      * for more information.
      *
@@ -732,12 +747,8 @@ public class DefaultEllipsoid extends Ab
      */
     @Override
     protected long computeHashCode() {
-        /*
-         * The "serialVersionUID ^ …" is an arbitrary change applied to the hash code value in order to
-         * differentiate this Ellipsoid implementation from implementations of other GeoAPI interfaces.
-         */
-        return serialVersionUID ^ (super.computeHashCode() + Double.doubleToLongBits(semiMajorAxis) +
-               31 * Double.doubleToLongBits(ivfDefinitive ? inverseFlattening : semiMinorAxis));
+        return super.computeHashCode() + Double.doubleToLongBits(semiMajorAxis) +
+               31 * Double.doubleToLongBits(ivfDefinitive ? inverseFlattening : semiMinorAxis);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -23,7 +23,6 @@ import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.opengis.referencing.ReferenceIdentifier;
 import org.opengis.referencing.datum.EngineeringDatum;
-import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.io.wkt.Formatter;
 
 
@@ -149,36 +148,18 @@ public class DefaultEngineeringDatum ext
     }
 
     /**
-     * Compares this datum with the specified object for equality.
+     * Returns the GeoAPI interface implemented by this class.
+     * The SIS implementation returns {@code EngineeringDatum.class}.
      *
-     * @param  object The object to compare to {@code this}.
-     * @param  mode {@link ComparisonMode#STRICT STRICT} for performing a strict comparison, or
-     *         {@link ComparisonMode#IGNORE_METADATA IGNORE_METADATA} for comparing only properties
-     *         relevant to coordinate transformations.
-     * @return {@code true} if both objects are equal.
-     */
-    @Override
-    public boolean equals(final Object object, final ComparisonMode mode) {
-        if (object == this) {
-            return true; // Slight optimization.
-        }
-        return (object instanceof EngineeringDatum) && super.equals(object, mode);
-    }
-
-    /**
-     * Invoked by {@link #hashCode()} for computing the hash code when first needed.
-     * See {@link org.apache.sis.referencing.AbstractIdentifiedObject#computeHashCode()}
-     * for more information.
+     * {@note Subclasses usually do not need to override this method since GeoAPI does not define
+     *        <code>EngineeringDatum</code> sub-interface. Overriding possibility is left mostly
+     *        for implementors who wish to extend GeoAPI with their own set of interfaces.}
      *
-     * @return The hash code value. This value may change in any future Apache SIS version.
+     * @return {@code EngineeringDatum.class} or a user-defined sub-interface.
      */
     @Override
-    protected long computeHashCode() {
-        /*
-         * The "serialVersionUID ^ …" is an arbitrary change applied to the hash code value in order to
-         * differentiate this EngineeringDatum implementation from implementations of other GeoAPI interfaces.
-         */
-        return serialVersionUID ^ super.computeHashCode();
+    public Class<? extends EngineeringDatum> getInterface() {
+        return EngineeringDatum.class;
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -291,6 +291,21 @@ public class DefaultGeodeticDatum extend
     }
 
     /**
+     * Returns the GeoAPI interface implemented by this class.
+     * The SIS implementation returns {@code GeodeticDatum.class}.
+     *
+     * {@note Subclasses usually do not need to override this method since GeoAPI does not define
+     *        <code>GeodeticDatum</code> sub-interface. Overriding possibility is left mostly for
+     *        implementors who wish to extend GeoAPI with their own set of interfaces.}
+     *
+     * @return {@code GeodeticDatum.class} or a user-defined sub-interface.
+     */
+    @Override
+    public Class<? extends GeodeticDatum> getInterface() {
+        return GeodeticDatum.class;
+    }
+
+    /**
      * Returns the ellipsoid given at construction time.
      *
      * @return The ellipsoid.
@@ -441,7 +456,7 @@ public class DefaultGeodeticDatum extend
         if (object == this) {
             return true; // Slight optimization.
         }
-        if (!(object instanceof GeodeticDatum && super.equals(object, mode))) {
+        if (!super.equals(object, mode)) {
             return false;
         }
         switch (mode) {
@@ -470,7 +485,7 @@ public class DefaultGeodeticDatum extend
     }
 
     /**
-     * Invoked by {@link #hashCode()} for computing the hash code when first needed.
+     * Invoked by {@code hashCode()} for computing the hash code when first needed.
      * See {@link org.apache.sis.referencing.AbstractIdentifiedObject#computeHashCode()}
      * for more information.
      *
@@ -478,12 +493,7 @@ public class DefaultGeodeticDatum extend
      */
     @Override
     protected long computeHashCode() {
-        /*
-         * The "serialVersionUID ^ …" is an arbitrary change applied to the hash code value in order to
-         * differentiate this GeodeticDatum implementation from implementations of other GeoAPI interfaces.
-         */
-        return serialVersionUID ^ (super.computeHashCode() +
-                Objects.hashCode(ellipsoid) + 31 * Objects.hashCode(primeMeridian));
+        return super.computeHashCode() + Objects.hashCode(ellipsoid) + 31 * Objects.hashCode(primeMeridian);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -166,6 +166,21 @@ public class DefaultImageDatum extends A
     }
 
     /**
+     * Returns the GeoAPI interface implemented by this class.
+     * The SIS implementation returns {@code ImageDatum.class}.
+     *
+     * {@note Subclasses usually do not need to override this method since GeoAPI does not define
+     *        <code>ImageDatum</code> sub-interface. Overriding possibility is left mostly for
+     *        implementors who wish to extend GeoAPI with their own set of interfaces.}
+     *
+     * @return {@code ImageDatum.class} or a user-defined sub-interface.
+     */
+    @Override
+    public Class<? extends ImageDatum> getInterface() {
+        return ImageDatum.class;
+    }
+
+    /**
      * Specification of the way the image grid is associated with the image data attributes.
      *
      * @return The way image grid is associated with image data attributes.
@@ -189,7 +204,7 @@ public class DefaultImageDatum extends A
         if (object == this) {
             return true; // Slight optimization.
         }
-        if (!(object instanceof ImageDatum && super.equals(object, mode))) {
+        if (!super.equals(object, mode)) {
             return false;
         }
         switch (mode) {
@@ -203,7 +218,7 @@ public class DefaultImageDatum extends A
     }
 
     /**
-     * Invoked by {@link #hashCode()} for computing the hash code when first needed.
+     * Invoked by {@code hashCode()} for computing the hash code when first needed.
      * See {@link org.apache.sis.referencing.AbstractIdentifiedObject#computeHashCode()}
      * for more information.
      *
@@ -211,11 +226,7 @@ public class DefaultImageDatum extends A
      */
     @Override
     protected long computeHashCode() {
-        /*
-         * The "serialVersionUID ^ …" is an arbitrary change applied to the hash code value in order to
-         * differentiate this ImageDatum implementation from implementations of other GeoAPI interfaces.
-         */
-        return serialVersionUID ^ (super.computeHashCode() + Objects.hashCode(pixelInCell));
+        return super.computeHashCode() + Objects.hashCode(pixelInCell);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -35,6 +35,7 @@ import org.apache.sis.util.ComparisonMod
 
 import static org.apache.sis.util.ArgumentChecks.ensureFinite;
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
+import static org.apache.sis.internal.referencing.ReferencingUtilities.canSetProperty;
 
 // Related to JDK7
 import org.apache.sis.internal.jdk7.Objects;
@@ -94,14 +95,16 @@ public class DefaultPrimeMeridian extend
     /**
      * Longitude of the prime meridian measured from the Greenwich meridian, positive eastward.
      *
-     * <p>Consider this field as final. It is declared non-final only for JAXB unmarshalling.</p>
+     * <p><b>Consider this field as final!</b>
+     * This field is modified only at unmarshalling time by {@link #setGreenwichMeasure(Measure)}</p>
      */
     private double greenwichLongitude;
 
     /**
      * The angular unit of the {@linkplain #getGreenwichLongitude() Greenwich longitude}.
      *
-     * <p>Consider this field as final. It is declared non-final only for JAXB unmarshalling.</p>
+     * <p><b>Consider this field as final!</b>
+     * This field is modified only at unmarshalling time by {@link #setGreenwichMeasure(Measure)}</p>
      */
     private Unit<Angle> angularUnit;
 
@@ -194,6 +197,21 @@ public class DefaultPrimeMeridian extend
     }
 
     /**
+     * Returns the GeoAPI interface implemented by this class.
+     * The SIS implementation returns {@code PrimeMeridian.class}.
+     *
+     * {@note Subclasses usually do not need to override this method since GeoAPI does not define
+     *        <code>PrimeMeridian</code> sub-interface. Overriding possibility is left mostly for
+     *        implementors who wish to extend GeoAPI with their own set of interfaces.}
+     *
+     * @return {@code PrimeMeridian.class} or a user-defined sub-interface.
+     */
+    @Override
+    public Class<? extends PrimeMeridian> getInterface() {
+        return PrimeMeridian.class;
+    }
+
+    /**
      * Longitude of the prime meridian measured from the Greenwich meridian, positive eastward.
      *
      * @return The prime meridian Greenwich longitude, in {@linkplain #getAngularUnit() angular unit}.
@@ -241,18 +259,20 @@ public class DefaultPrimeMeridian extend
      * Invoked by JAXB for setting the Greenwich longitude and its unit of measurement.
      */
     private void setGreenwichMeasure(final Measure measure) {
-        greenwichLongitude = measure.value;
-        angularUnit = measure.getUnit(Angle.class);
-        if (angularUnit == null) {
-            /*
-             * Missing unit: if the Greenwich longitude is zero, any angular unit gives the same result
-             * (assuming that the missing unit was not applying an offset), so we can select a default.
-             * If the Greenwich longitude is not zero, we can not guess. Our object will be invalid.
-             */
-            if (greenwichLongitude == 0) {
-                angularUnit = NonSI.DEGREE_ANGLE;
-            } else {
-                Measure.missingUOM(DefaultPrimeMeridian.class, "setGreenwichMeasure");
+        if (measure != null && canSetProperty("greenwichLongitude", greenwichLongitude != 0 || angularUnit != null)) {
+            greenwichLongitude = measure.value;
+            angularUnit = measure.getUnit(Angle.class);
+            if (angularUnit == null) {
+                /*
+                 * Missing unit: if the Greenwich longitude is zero, any angular unit gives the same result
+                 * (assuming that the missing unit was not applying an offset), so we can select a default.
+                 * If the Greenwich longitude is not zero, we can not guess. Our object will be invalid.
+                 */
+                if (greenwichLongitude == 0) {
+                    angularUnit = NonSI.DEGREE_ANGLE;
+                } else {
+                    Measure.missingUOM(DefaultPrimeMeridian.class, "setGreenwichMeasure");
+                }
             }
         }
     }
@@ -271,7 +291,7 @@ public class DefaultPrimeMeridian extend
         if (object == this) {
             return true; // Slight optimization.
         }
-        if (!(object instanceof PrimeMeridian && super.equals(object, mode))) {
+        if (!super.equals(object, mode)) {
             return false;
         }
         switch (mode) {
@@ -299,7 +319,7 @@ public class DefaultPrimeMeridian extend
     }
 
     /**
-     * Invoked by {@link #hashCode()} for computing the hash code when first needed.
+     * Invoked by {@code hashCode()} for computing the hash code when first needed.
      * See {@link org.apache.sis.referencing.AbstractIdentifiedObject#computeHashCode()}
      * for more information.
      *
@@ -307,12 +327,7 @@ public class DefaultPrimeMeridian extend
      */
     @Override
     protected long computeHashCode() {
-        /*
-         * The "serialVersionUID ^ …" is an arbitrary change applied to the hash code value in order to
-         * differentiate this PrimeMeridian implementation from implementations of other GeoAPI interfaces.
-         */
-        return serialVersionUID ^ (super.computeHashCode() +
-                Double.doubleToLongBits(greenwichLongitude) + Objects.hashCode(angularUnit));
+        return super.computeHashCode() + Double.doubleToLongBits(greenwichLongitude) + Objects.hashCode(angularUnit);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java Sun Jan  5 04:29:20 2014
@@ -31,6 +31,7 @@ import org.apache.sis.internal.metadata.
 import org.apache.sis.util.ComparisonMode;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
+import static org.apache.sis.internal.referencing.ReferencingUtilities.canSetProperty;
 
 // Related to JDK7
 import org.apache.sis.internal.jdk7.Objects;
@@ -73,6 +74,8 @@ import org.apache.sis.internal.jdk7.Obje
  * @module
  *
  * @see org.apache.sis.referencing.GeodeticObjects.Temporal#datum()
+ * @see org.apache.sis.referencing.cs.DefaultTimeCS
+ * @see org.apache.sis.referencing.crs.DefaultTemporalCRS
  */
 @XmlType(name = "TemporalDatumType")
 @XmlRootElement(name = "TemporalDatum")
@@ -87,7 +90,8 @@ public class DefaultTemporalDatum extend
      * This information is mandatory, but SIS is tolerant to missing value is case a XML
      * fragment was incomplete.
      *
-     * <p>Consider this field as final. It is non-final only for the need of XML unmarshalling.</p>
+     * <p><b>Consider this field as final!</b>
+     * This field is modified only at unmarshalling time by {@link #setOrigin(Date)}</p>
      */
     private long origin;
 
@@ -194,6 +198,21 @@ public class DefaultTemporalDatum extend
     }
 
     /**
+     * Returns the GeoAPI interface implemented by this class.
+     * The SIS implementation returns {@code TemporalDatum.class}.
+     *
+     * {@note Subclasses usually do not need to override this method since GeoAPI does not define
+     *        <code>TemporalDatum</code> sub-interface. Overriding possibility is left mostly for
+     *        implementors who wish to extend GeoAPI with their own set of interfaces.}
+     *
+     * @return {@code TemporalDatum.class} or a user-defined sub-interface.
+     */
+    @Override
+    public Class<? extends TemporalDatum> getInterface() {
+        return TemporalDatum.class;
+    }
+
+    /**
      * Returns the date and time origin of this temporal datum.
      *
      * @return The date and time origin of this temporal datum.
@@ -209,7 +228,9 @@ public class DefaultTemporalDatum extend
      * Invoked by JAXB only at unmarshalling time.
      */
     private void setOrigin(final Date value) {
-        origin = MetadataUtilities.toMilliseconds(value);
+        if (value != null && canSetProperty("origin", origin != Long.MIN_VALUE)) {
+            origin = value.getTime();
+        }
     }
 
     /**
@@ -226,7 +247,7 @@ public class DefaultTemporalDatum extend
         if (object == this) {
             return true; // Slight optimization.
         }
-        if (!(object instanceof TemporalDatum && super.equals(object, mode))) {
+        if (!super.equals(object, mode)) {
             return false;
         }
         switch (mode) {
@@ -240,8 +261,7 @@ public class DefaultTemporalDatum extend
     }
 
     /**
-    /**
-     * Invoked by {@link #hashCode()} for computing the hash code when first needed.
+     * Invoked by {@code hashCode()} for computing the hash code when first needed.
      * See {@link org.apache.sis.referencing.AbstractIdentifiedObject#computeHashCode()}
      * for more information.
      *
@@ -249,10 +269,6 @@ public class DefaultTemporalDatum extend
      */
     @Override
     protected long computeHashCode() {
-        /*
-         * The "serialVersionUID ^ …" is an arbitrary change applied to the hash code value in order to
-         * differentiate this TemporalDatum implementation from implementations of other GeoAPI interfaces.
-         */
-        return serialVersionUID ^ (super.computeHashCode() + origin);
+        return super.computeHashCode() + origin;
     }
 }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -32,6 +32,7 @@ import org.apache.sis.internal.jaxb.Lega
 import org.apache.sis.internal.referencing.VerticalDatumTypes;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
+import static org.apache.sis.internal.referencing.ReferencingUtilities.canSetProperty;
 
 // Related to JDK7
 import org.apache.sis.internal.jdk7.Objects;
@@ -77,6 +78,8 @@ import org.apache.sis.internal.jdk7.Obje
  * @module
  *
  * @see org.apache.sis.referencing.GeodeticObjects.Vertical#datum()
+ * @see org.apache.sis.referencing.cs.DefaultVerticalCS
+ * @see org.apache.sis.referencing.crs.DefaultVerticalCRS
  */
 @XmlType(name = "VerticalDatumType")
 @XmlRootElement(name = "VerticalDatum")
@@ -87,7 +90,7 @@ public class DefaultVerticalDatum extend
     private static final long serialVersionUID = 380347456670516572L;
 
     /**
-     * The type of this vertical datum. Consider this field as final.
+     * The type of this vertical datum.
      * If {@code null}, a value will be inferred from the name by {@link #type()}.
      */
     private VerticalDatumType type;
@@ -194,6 +197,21 @@ public class DefaultVerticalDatum extend
     }
 
     /**
+     * Returns the GeoAPI interface implemented by this class.
+     * The SIS implementation returns {@code VerticalDatum.class}.
+     *
+     * {@note Subclasses usually do not need to override this method since GeoAPI does not define
+     *        <code>VerticalDatum</code> sub-interface. Overriding possibility is left mostly for
+     *        implementors who wish to extend GeoAPI with their own set of interfaces.}
+     *
+     * @return {@code VerticalDatum.class} or a user-defined sub-interface.
+     */
+    @Override
+    public Class<? extends VerticalDatum> getInterface() {
+        return VerticalDatum.class;
+    }
+
+    /**
      * Returns the type of this datum, or infers the type from the datum name if no type were specified.
      * The later case occurs after unmarshalling, since GML 3.2 does not contain any attribute for the datum type.
      * It may also happen if the datum were created using reflection.
@@ -245,10 +263,9 @@ public class DefaultVerticalDatum extend
      * Invoked by JAXB only. The vertical datum type is set only if it has not already been specified.
      */
     private void setTypeElement(final VerticalDatumType t) {
-        if (type != null) {
-            throw new IllegalStateException();
+        if (t != null && canSetProperty("verticalDatumType", type != null)) {
+            type = t;
         }
-        type = t;
     }
 
     /**
@@ -265,7 +282,7 @@ public class DefaultVerticalDatum extend
         if (object == this) {
             return true; // Slight optimization.
         }
-        if (!(object instanceof VerticalDatum && super.equals(object, mode))) {
+        if (!super.equals(object, mode)) {
             return false;
         }
         switch (mode) {
@@ -279,7 +296,7 @@ public class DefaultVerticalDatum extend
     }
 
     /**
-     * Invoked by {@link #hashCode()} for computing the hash code when first needed.
+     * Invoked by {@code hashCode()} for computing the hash code when first needed.
      * See {@link org.apache.sis.referencing.AbstractIdentifiedObject#computeHashCode()}
      * for more information.
      *
@@ -287,11 +304,7 @@ public class DefaultVerticalDatum extend
      */
     @Override
     protected long computeHashCode() {
-        /*
-         * The "serialVersionUID ^ …" is an arbitrary change applied to the hash code value in order to
-         * differentiate this VerticalDatum implementation from implementations of other GeoAPI interfaces.
-         */
-        return serialVersionUID ^ (super.computeHashCode() + type().hashCode());
+        return super.computeHashCode() + type().hashCode();
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration [UTF-8] Sun Jan  5 04:29:20 2014
@@ -1 +1,2 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
 org.apache.sis.internal.referencing.ReferencingTypes

Modified: sis/trunk/core/sis-referencing/src/site/resources/css/site.css
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/site/resources/css/site.css?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/site/resources/css/site.css (original)
+++ sis/trunk/core/sis-referencing/src/site/resources/css/site.css Sun Jan  5 04:29:20 2014
@@ -1 +1 @@
-link ../../../../../sis-build-helper/src/site/resources/css/site.css
\ No newline at end of file
+link ../../../../../../src/main/link-target/site-module.css
\ No newline at end of file

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -27,8 +27,9 @@ import org.opengis.referencing.datum.Pri
 import org.opengis.referencing.datum.GeodeticDatum;
 import org.opengis.referencing.datum.VerticalDatum;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
-import org.opengis.referencing.cs.EllipsoidalCS;
 import org.opengis.referencing.cs.AxisDirection;
+import org.opengis.referencing.cs.CartesianCS;
+import org.opengis.referencing.cs.EllipsoidalCS;
 import org.opengis.referencing.cs.RangeMeaning;
 
 import static org.apache.sis.test.Assert.*;
@@ -65,15 +66,20 @@ public final strictfp class GeodeticObje
      * for example a polygon encompassing the world.</p>
      *
      * @param extent The extent to verify, or {@code null} if none.
+     * @param isMandatory {@code true} if an absence of world extent is a failure.
      */
-    private static void assertIsWorld(final Extent extent) {
+    private static void assertIsWorld(final Extent extent, boolean isMandatory) {
         if (extent != null) {
             for (final GeographicExtent element : extent.getGeographicElements()) {
                 if (element instanceof GeographicBoundingBox) {
                     assertIsWorld((GeographicBoundingBox) element);
+                    isMandatory = false;
                 }
             }
         }
+        if (isMandatory) {
+            fail("Expected a world extent element.");
+        }
     }
 
     /**
@@ -194,10 +200,12 @@ public final strictfp class GeodeticObje
      * </table>
      *
      * @param datum The datum to verify.
+     * @param isExtentMandatory {@code true} if the domain of validity is required to contain an {@code Extent} element
+     *        for the world, or {@code false} if optional.
      */
-    public static void assertIsWGS84(final GeodeticDatum datum) {
+    public static void assertIsWGS84(final GeodeticDatum datum, final boolean isExtentMandatory) {
         assertEquals("name", "World Geodetic System 1984", datum.getName().getCode());
-        assertIsWorld    (datum.getDomainOfValidity());
+        assertIsWorld    (datum.getDomainOfValidity(), isExtentMandatory);
         assertIsGreenwich(datum.getPrimeMeridian());
         assertIsWGS84    (datum.getEllipsoid());
     }
@@ -215,39 +223,99 @@ public final strictfp class GeodeticObje
      * </table>
      *
      * @param datum The datum to verify.
+     * @param isExtentMandatory {@code true} if the domain of validity is required to contain an {@code Extent} element
+     *        for the world, or {@code false} if optional.
      */
-    public static void assertIsMeanSeaLevel(final VerticalDatum datum) {
+    public static void assertIsMeanSeaLevel(final VerticalDatum datum, final boolean isExtentMandatory) {
         assertEquals("name", "Mean Sea Level", datum.getName().getCode());
-        assertIsWorld(datum.getDomainOfValidity());
+        assertIsWorld(datum.getDomainOfValidity(), isExtentMandatory);
     }
 
     /**
-     * Asserts that the given coordinate system contains the geodetic (latitude, longitude) axes.
+     * Asserts that the given coordinate system contains the (easting, northing) axes in metres.
      * This method verifies the following properties:
      *
      * <table class="sis">
-     * <tr><th>Property</th> <th>Expected value</th></tr>
+     * <tr><th>Property</th> <th colspan="2">Expected value</th></tr>
+     * <tr><td>{@linkplain CartesianCS#getDimension() Dimension}</td>
+     *     <td colspan="2">2</td></tr>
+     * <tr><td>Axes {@linkplain ReferenceIdentifier#getCode() Code} of the {@linkplain GeodeticDatum#getName() name}</td>
+     *     <td>{@code "Easting"}</td>
+     *     <td>{@code "Northing"}</td></tr>
+     * <tr><td>Axes {@linkplain CoordinateSystemAxis#getAbbreviation() abbreviation}</td>
+     *     <td>{@code "E"}</td>
+     *     <td>{@code "N"}</td></tr>
+     * <tr><td>Axes {@linkplain CoordinateSystemAxis#getDirection() direction}</td>
+     *     <td>{@link AxisDirection#EAST EAST}</td>
+     *     <td>{@link AxisDirection#NORTH NORTH}</td></tr>
+     * <tr><td>Axes {@linkplain CoordinateSystemAxis#getUnit() units}</td>
+     *     <td>{@link SI#METRE}</td>
+     *     <td>{@link SI#METRE}</td></tr>
+     * <tr><td>Axes range</td>
+     *     <td>[-∞ … ∞]</td>
+     *     <td>[-∞ … ∞]</td></tr>
+     * <tr><td>Axes range meaning</td>
+     *     <td>{@code null}</td>
+     *     <td>{@code null}</td>
+     * </table>
+     *
+     * @param cs The coordinate system to verify.
+     */
+    public static void assertIsProjected2D(final CartesianCS cs) {
+        assertEquals("dimension", 2, cs.getDimension());
+        final CoordinateSystemAxis E = cs.getAxis(0);
+        final CoordinateSystemAxis N = cs.getAxis(1);
+        assertNotNull("axis", E);
+        assertNotNull("axis", N);
+        assertEquals("axis[0].name",         "Easting",           E.getName().getCode());
+        assertEquals("axis[1].name",         "Northing",          N.getName().getCode());
+        assertEquals("axis[0].abbreviation", "E",                 E.getAbbreviation());
+        assertEquals("axis[1].abbreviation", "N",                 N.getAbbreviation());
+        assertEquals("axis[0].direction",    AxisDirection.EAST,  E.getDirection());
+        assertEquals("axis[1].direction",    AxisDirection.NORTH, N.getDirection());
+        assertEquals("axis[0].unit",         SI.METRE,            E.getUnit());
+        assertEquals("axis[1].unit",         SI.METRE,            N.getUnit());
+        verifyRange(E, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null, true);
+        verifyRange(N, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null, true);
+    }
+
+    /**
+     * Asserts that the given coordinate system contains the geodetic (latitude, longitude) axes in degrees.
+     * This method verifies the following properties:
+     *
+     * <table class="sis">
+     * <tr><th>Property</th> <th colspan="2">Expected value</th></tr>
      * <tr><td>{@linkplain EllipsoidalCS#getDimension() Dimension}</td>
-     *     <td>2</td></tr>
-     * <tr><td>Axis[0] name code</td>
-     *     <td>{@code "Geodetic latitude"}</td></tr>
-     * <tr><td>Axis[1] name code</td>
+     *     <td colspan="2">2</td></tr>
+     * <tr><td>Axes {@linkplain ReferenceIdentifier#getCode() Code} of the {@linkplain GeodeticDatum#getName() name}</td>
+     *     <td>{@code "Geodetic latitude"}</td>
      *     <td>{@code "Geodetic longitude"}</td></tr>
-     * <tr><td>Axis[0] {@linkplain CoordinateSystemAxis#getDirection() direction}</td>
-     *     <td>{@link AxisDirection#NORTH NORTH}</td></tr>
-     * <tr><td>Axis[1] {@linkplain CoordinateSystemAxis#getDirection() direction}</td>
+     * <tr><td>Axes {@linkplain CoordinateSystemAxis#getDirection() direction}</td>
+     *     <td>{@link AxisDirection#NORTH NORTH}</td>
      *     <td>{@link AxisDirection#EAST EAST}</td></tr>
      * <tr><td>Axes {@linkplain CoordinateSystemAxis#getUnit() units}</td>
+     *     <td>{@link NonSI#DEGREE_ANGLE}</td>
      *     <td>{@link NonSI#DEGREE_ANGLE}</td></tr>
-     * <tr><td>Axis[0] range</td>
-     *     <td>[-90 … 90] with {@link RangeMeaning#EXACT}, or all range properties missing</td></tr>
-     * <tr><td>Axis[1] range</td>
-     *     <td>[-180 … 180] with {@link RangeMeaning#WRAPAROUND}, or all range properties missing</td></tr>
+     * <tr><td>Axes range</td>
+     *     <td>[-90 … 90] (see below)</td>
+     *     <td>[-180 … 180] (see below)</td></tr>
+     * <tr><td>Axes range meaning</td>
+     *     <td>{@link RangeMeaning#EXACT} or missing</td>
+     *     <td>{@link RangeMeaning#WRAPAROUND} or missing</td></tr>
      * </table>
      *
+     * <b>Notes:</b>
+     * <ul>
+     *   <li>The axes range may be missing if and only if the range meaning is also missing.</li>
+     *   <li>This method does not verify {@linkplain CoordinateSystemAxis#getAbbreviation() abbreviations}
+     *       because the classical symbols (φ,λ) are often replaced by (lat,long).</li>
+     * </ul>
+     *
      * @param cs The coordinate system to verify.
+     * @param rangeIsMandatory {@code true} if the axes range and range meaning properties shall be defined,
+     *        or {@code false} if they are optional.
      */
-    public static void assertIsGeodetic2D(final EllipsoidalCS cs) {
+    public static void assertIsGeodetic2D(final EllipsoidalCS cs, final boolean rangeIsMandatory) {
         assertEquals("dimension", 2, cs.getDimension());
         final CoordinateSystemAxis latitude  = cs.getAxis(0);
         final CoordinateSystemAxis longitude = cs.getAxis(1);
@@ -259,23 +327,26 @@ public final strictfp class GeodeticObje
         assertEquals("axis[1].direction", AxisDirection.EAST,   longitude.getDirection());
         assertEquals("axis[0].unit",      NonSI.DEGREE_ANGLE,   latitude .getUnit());
         assertEquals("axis[1].unit",      NonSI.DEGREE_ANGLE,   longitude.getUnit());
-        verifyRange(latitude,   -90,  +90, RangeMeaning.EXACT);
-        verifyRange(longitude, -180, +180, RangeMeaning.WRAPAROUND);
+        verifyRange(latitude,   -90,  +90, RangeMeaning.EXACT, rangeIsMandatory);
+        verifyRange(longitude, -180, +180, RangeMeaning.WRAPAROUND, rangeIsMandatory);
     }
 
     /**
      * Asserts that the axis range is either fully missing, or defined to exactly the given properties.
      */
     private static void verifyRange(final CoordinateSystemAxis axis,
-            final double min, final double max, final RangeMeaning rm)
+            final double min, final double max, final RangeMeaning expected, final boolean isMandatory)
     {
         final double       minimumValue = axis.getMinimumValue();
         final double       maximumValue = axis.getMaximumValue();
         final RangeMeaning rangeMeaning = axis.getRangeMeaning();
-        if (minimumValue != Double.NEGATIVE_INFINITY || maximumValue != Double.POSITIVE_INFINITY || rangeMeaning != null) {
+        if (isMandatory || rangeMeaning != null ||
+                minimumValue != Double.NEGATIVE_INFINITY ||
+                maximumValue != Double.POSITIVE_INFINITY)
+        {
             assertEquals("axis.minimumValue", min, minimumValue, STRICT);
             assertEquals("axis.maximumValue", max, maximumValue, STRICT);
-            assertEquals("axis.rangeMeaning", rm,  rangeMeaning);
+            assertEquals("axis.rangeMeaning", expected, rangeMeaning);
         }
     }
 }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CommonAxes.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CommonAxes.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CommonAxes.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CommonAxes.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -50,7 +50,7 @@ public final strictfp class CommonAxes {
      * @see #GEODETIC_LATITUDE
      */
     public static final DefaultCoordinateSystemAxis GEODETIC_LONGITUDE = create("Geodetic longitude", "λ",
-            AxisDirection.EAST, 180, NonSI.DEGREE_ANGLE);
+            AxisDirection.EAST, -180, 180, NonSI.DEGREE_ANGLE, RangeMeaning.WRAPAROUND);
 
     /**
      * Default axis info for geodetic latitudes in a
@@ -67,7 +67,7 @@ public final strictfp class CommonAxes {
      * @see #GEODETIC_LONGITUDE
      */
     public static final DefaultCoordinateSystemAxis GEODETIC_LATITUDE = create("Geodetic latitude", "φ",
-            AxisDirection.NORTH, 90, NonSI.DEGREE_ANGLE);
+            AxisDirection.NORTH, -90, 90, NonSI.DEGREE_ANGLE, RangeMeaning.EXACT);
 
     /**
      * Default axis info for longitudes.
@@ -82,7 +82,7 @@ public final strictfp class CommonAxes {
      * @see #LATITUDE
      */
     public static final DefaultCoordinateSystemAxis LONGITUDE = create("Longitude", "λ",
-            AxisDirection.EAST, 180, NonSI.DEGREE_ANGLE);
+            AxisDirection.EAST, -180, 180, NonSI.DEGREE_ANGLE, RangeMeaning.WRAPAROUND);
 
     /**
      * Default axis info for latitudes.
@@ -97,7 +97,7 @@ public final strictfp class CommonAxes {
      * @see #LONGITUDE
      */
     public static final DefaultCoordinateSystemAxis LATITUDE = create("Latitude", "φ",
-            AxisDirection.NORTH, 90, NonSI.DEGREE_ANGLE);
+            AxisDirection.NORTH, -90, 90, NonSI.DEGREE_ANGLE, RangeMeaning.EXACT);
 
     /**
      * The default axis for height values above the ellipsoid in a
@@ -114,7 +114,7 @@ public final strictfp class CommonAxes {
      * @see #DEPTH
      */
     public static final DefaultCoordinateSystemAxis ELLIPSOIDAL_HEIGHT = create("Ellipsoidal height", "h",
-            AxisDirection.UP, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.UP, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * The default axis for height values measured from gravity.
@@ -127,13 +127,13 @@ public final strictfp class CommonAxes {
      * @see #DEPTH
      */
     public static final DefaultCoordinateSystemAxis GRAVITY_RELATED_HEIGHT = create("Gravity-related height", "H",
-            AxisDirection.UP, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.UP, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * A height in centimetres, for {@link CoordinateSystemsTest} only.
      */
     static final DefaultCoordinateSystemAxis HEIGHT_cm = create("Height", "h",
-            AxisDirection.UP, Double.POSITIVE_INFINITY, SI.CENTIMETRE);
+            AxisDirection.UP, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.CENTIMETRE, null);
 
     /**
      * The default axis for altitude values.
@@ -148,7 +148,7 @@ public final strictfp class CommonAxes {
      * @see #DEPTH
      */
     public static final DefaultCoordinateSystemAxis ALTITUDE = create("Altitude", "h",
-            AxisDirection.UP, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.UP, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * The default axis for depth.
@@ -161,7 +161,7 @@ public final strictfp class CommonAxes {
      * @see #GRAVITY_RELATED_HEIGHT
      */
     public static final DefaultCoordinateSystemAxis DEPTH = create("Depth", "d",
-            AxisDirection.DOWN, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.DOWN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * Default axis info for radius in a
@@ -179,7 +179,7 @@ public final strictfp class CommonAxes {
      * @see #DEPTH
      */
     public static final DefaultCoordinateSystemAxis GEOCENTRIC_RADIUS = create("Geocentric radius", "r",
-            AxisDirection.UP, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.UP, 0, Double.POSITIVE_INFINITY, SI.METRE, RangeMeaning.EXACT);
 
     /**
      * Default axis info for longitudes in a
@@ -197,7 +197,7 @@ public final strictfp class CommonAxes {
      * @see #SPHERICAL_LATITUDE
      */
     public static final DefaultCoordinateSystemAxis SPHERICAL_LONGITUDE = create("Spherical longitude", "Ω",
-            AxisDirection.EAST, 180, NonSI.DEGREE_ANGLE);
+            AxisDirection.EAST, -180, 180, NonSI.DEGREE_ANGLE, RangeMeaning.WRAPAROUND);
 
     /**
      * Default axis info for latitudes in a
@@ -215,7 +215,7 @@ public final strictfp class CommonAxes {
      * @see #SPHERICAL_LONGITUDE
      */
     public static final DefaultCoordinateSystemAxis SPHERICAL_LATITUDE = create("Spherical latitude", "Θ",
-            AxisDirection.NORTH, 90, NonSI.DEGREE_ANGLE);
+            AxisDirection.NORTH, -90, 90, NonSI.DEGREE_ANGLE, RangeMeaning.EXACT);
 
     /**
      * Default axis info for <var>x</var> values in a
@@ -233,7 +233,7 @@ public final strictfp class CommonAxes {
      * @see #COLUMN
      */
     public static final DefaultCoordinateSystemAxis X = create("x", "x",
-            AxisDirection.EAST, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.EAST, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * Default axis info for <var>y</var> values in a
@@ -251,7 +251,7 @@ public final strictfp class CommonAxes {
      * @see #ROW
      */
     public static final DefaultCoordinateSystemAxis Y = create("y", "y",
-            AxisDirection.NORTH, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.NORTH, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * Default axis info for <var>z</var> values in a
@@ -263,7 +263,7 @@ public final strictfp class CommonAxes {
      * <p>This axis is usually part of a {@link #X}, {@link #Y}, {@link #Z} set.</p>
      */
     public static final DefaultCoordinateSystemAxis Z = create("z", "z",
-            AxisDirection.UP, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.UP, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * Default axis info for <var>x</var> values in a
@@ -279,7 +279,7 @@ public final strictfp class CommonAxes {
      * <p>This axis is usually part of a {@link #GEOCENTRIC_X}, {@link #GEOCENTRIC_Y}, {@link #GEOCENTRIC_Z} set.</p>
      */
     public static final DefaultCoordinateSystemAxis GEOCENTRIC_X = create("X", "X",
-            AxisDirection.GEOCENTRIC_X, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.GEOCENTRIC_X, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * Default axis info for <var>y</var> values in a
@@ -295,7 +295,7 @@ public final strictfp class CommonAxes {
      * <p>This axis is usually part of a {@link #GEOCENTRIC_X}, {@link #GEOCENTRIC_Y}, {@link #GEOCENTRIC_Z} set.</p>
      */
     public static final DefaultCoordinateSystemAxis GEOCENTRIC_Y = create("Y", "Y",
-            AxisDirection.GEOCENTRIC_Y, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.GEOCENTRIC_Y, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * Default axis info for <var>z</var> values in a
@@ -311,7 +311,7 @@ public final strictfp class CommonAxes {
      * <p>This axis is usually part of a {@link #GEOCENTRIC_X}, {@link #GEOCENTRIC_Y}, {@link #GEOCENTRIC_Z} set.</p>
      */
     public static final DefaultCoordinateSystemAxis GEOCENTRIC_Z = create("Z", "Z",
-            AxisDirection.GEOCENTRIC_Z, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.GEOCENTRIC_Z, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * Default axis info for Easting values in a
@@ -326,7 +326,7 @@ public final strictfp class CommonAxes {
      * @see #WESTING
      */
     public static final DefaultCoordinateSystemAxis EASTING = create("Easting", "E",
-            AxisDirection.EAST, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.EAST, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * Default axis info for Westing values in a
@@ -339,7 +339,7 @@ public final strictfp class CommonAxes {
      * @see #WESTING
      */
     public static final DefaultCoordinateSystemAxis WESTING = create("Westing", "W",
-            AxisDirection.WEST, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.WEST, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * Default axis info for Northing values in a
@@ -354,7 +354,7 @@ public final strictfp class CommonAxes {
      * @see #SOUTHING
      */
     public static final DefaultCoordinateSystemAxis NORTHING = create("Northing", "N",
-            AxisDirection.NORTH, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.NORTH, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * Default axis info for Southing values in a
@@ -367,19 +367,19 @@ public final strictfp class CommonAxes {
      * @see #SOUTHING
      */
     public static final DefaultCoordinateSystemAxis SOUTHING = create("Southing", "S",
-            AxisDirection.SOUTH, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.SOUTH, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * An axis with North-East orientation.
      */
     static final DefaultCoordinateSystemAxis NORTH_EAST = create("NORTH_EAST", "NE",
-            AxisDirection.NORTH_EAST, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.NORTH_EAST, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * An axis with South-East orientation.
      */
     static final DefaultCoordinateSystemAxis SOUTH_EAST = create("SOUTH_EAST", "SE",
-            AxisDirection.SOUTH_EAST, Double.POSITIVE_INFINITY, SI.METRE);
+            AxisDirection.SOUTH_EAST, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null);
 
     /**
      * A default axis for time values in a {@linkplain org.opengis.referencing.cs.TimeCS time CS}.
@@ -387,7 +387,7 @@ public final strictfp class CommonAxes {
      * The abbreviation is lower case "<var>t</var>".
      */
     public static final DefaultCoordinateSystemAxis TIME = create("Time", "t",
-            AxisDirection.FUTURE, Double.POSITIVE_INFINITY, NonSI.DAY);
+            AxisDirection.FUTURE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, NonSI.DAY, null);
 
     /**
      * A default axis for column indices in a {@linkplain org.opengis.coverage.grid.GridCoverage grid coverage}.
@@ -395,7 +395,7 @@ public final strictfp class CommonAxes {
      * The abbreviation is lower case "<var>i</var>".
      */
     public static final DefaultCoordinateSystemAxis COLUMN = create("Column", "i",
-            AxisDirection.COLUMN_POSITIVE, Double.POSITIVE_INFINITY, Unit.ONE);
+            AxisDirection.COLUMN_POSITIVE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Unit.ONE, null);
 
     /**
      * A default axis for row indices in a {@linkplain org.opengis.coverage.grid.GridCoverage grid coverage}.
@@ -403,7 +403,7 @@ public final strictfp class CommonAxes {
      * The abbreviation is lower case "<var>j</var>".
      */
     public static final DefaultCoordinateSystemAxis ROW = create("Row", "j",
-            AxisDirection.ROW_POSITIVE, Double.POSITIVE_INFINITY, Unit.ONE);
+            AxisDirection.ROW_POSITIVE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Unit.ONE, null);
 
     /**
      * A default axis for <var>x</var> values in a display device. Increasing values go toward
@@ -411,7 +411,7 @@ public final strictfp class CommonAxes {
      * The abbreviation is lower case "<var>x</var>".
      */
     public static final DefaultCoordinateSystemAxis DISPLAY_X = create("x", "x",
-            AxisDirection.DISPLAY_RIGHT, Double.POSITIVE_INFINITY, Unit.ONE);
+            AxisDirection.DISPLAY_RIGHT, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Unit.ONE, null);
 
     /**
      * A default axis for <var>y</var> values in a display device. Increasing values go toward
@@ -419,7 +419,7 @@ public final strictfp class CommonAxes {
      * The abbreviation is lower case "<var>y</var>".
      */
     public static final DefaultCoordinateSystemAxis DISPLAY_Y = create("y", "y",
-            AxisDirection.DISPLAY_DOWN, Double.POSITIVE_INFINITY, Unit.ONE);
+            AxisDirection.DISPLAY_DOWN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Unit.ONE, null);
 
     /**
      * Undefined or unknown axis. Axis direction is {@link AxisDirection#OTHER OTHER}
@@ -427,17 +427,17 @@ public final strictfp class CommonAxes {
      * for axes that were not properly defined.
      */
     public static final DefaultCoordinateSystemAxis UNDEFINED = create("Undefined", "?",
-            AxisDirection.OTHER, Double.POSITIVE_INFINITY, Unit.ONE);
+            AxisDirection.OTHER, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Unit.ONE, null);
 
     /**
      * Creates a new axis of the given name, abbreviation, direction and unit.
      */
     private static DefaultCoordinateSystemAxis create(final String name, final String abbreviation,
-            final AxisDirection direction, final double maximum, final Unit<?> unit)
+            final AxisDirection direction, final double minimum, final double maximum, final Unit<?> unit,
+            final RangeMeaning meaning)
     {
         return new DefaultCoordinateSystemAxis(singletonMap(DefaultCoordinateSystemAxis.NAME_KEY, name),
-                abbreviation, direction, unit, name.endsWith("radius") ? 0 : -maximum, maximum,
-                name.endsWith("longitude") ? RangeMeaning.WRAPAROUND : RangeMeaning.EXACT);
+                abbreviation, direction, unit, minimum, maximum, meaning);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -17,13 +17,17 @@
 package org.apache.sis.referencing.cs;
 
 import java.util.Map;
+import javax.xml.bind.JAXBException;
 import org.opengis.test.Validators;
-import org.apache.sis.test.TestCase;
+import org.opengis.referencing.cs.CoordinateSystemAxis;
+import org.apache.sis.referencing.GeodeticObjectVerifier;
+import org.apache.sis.test.XMLTestCase;
 import org.apache.sis.test.DependsOn;
 import org.junit.Test;
 
 import static org.apache.sis.test.Assert.*;
 import static java.util.Collections.singletonMap;
+import static org.apache.sis.test.TestUtilities.getSingleton;
 
 
 /**
@@ -35,7 +39,12 @@ import static java.util.Collections.sing
  * @module
  */
 @DependsOn(DefaultCoordinateSystemAxisTest.class)
-public final strictfp class DefaultCartesianCSTest extends TestCase {
+public final strictfp class DefaultCartesianCSTest extends XMLTestCase {
+    /**
+     * An XML file in this package containing a Cartesian coordinate system definition.
+     */
+    private static final String XML_FILE = "CartesianCS.xml";
+
     /**
      * Tests the creation of a Cartesian CS with legal axes.
      */
@@ -103,4 +112,31 @@ public final strictfp class DefaultCarte
             assertFalse(e.getMessage().isEmpty());
         }
     }
+
+    /**
+     * Tests (un)marshalling of a Cartesian coordinate system.
+     *
+     * @throws JAXBException If an error occurred during unmarshalling.
+     */
+    @Test
+    public void testXML() throws JAXBException {
+        final DefaultCartesianCS cs = unmarshalFile(DefaultCartesianCS.class, XML_FILE);
+        Validators.validate(cs);
+        GeodeticObjectVerifier.assertIsProjected2D(cs);
+        /*
+         * Values in the following tests are specific to our XML file.
+         * The actual texts in the EPSG database are more descriptive.
+         */
+        final CoordinateSystemAxis E = cs.getAxis(0);
+        final CoordinateSystemAxis N = cs.getAxis(1);
+        assertEquals("name",    "Easting, northing (E,N)", cs.getName().getCode());
+        assertEquals("remarks", "Used in ProjectedCRS.", cs.getRemarks().toString());
+        assertIdentifierEquals(        "identifier", "OGP", "EPSG", null, "4400", getSingleton(cs.getIdentifiers()));
+        assertIdentifierEquals("axis[0].identifier", "OGP", "EPSG", null, "1",    getSingleton(E.getIdentifiers()));
+        assertIdentifierEquals("axis[1].identifier", "OGP", "EPSG", null, "2",    getSingleton(N.getIdentifiers()));
+        /*
+         * Marshal and compare with the original file.
+         */
+        assertMarshalEqualsFile(XML_FILE, cs, "xmlns:*", "xsi:schemaLocation");
+    }
 }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -19,7 +19,6 @@ package org.apache.sis.referencing.cs;
 import javax.xml.bind.JAXBException;
 import org.opengis.test.Validators;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
-import org.opengis.referencing.cs.RangeMeaning;
 import org.apache.sis.test.XMLTestCase;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.referencing.GeodeticObjectVerifier;
@@ -45,34 +44,31 @@ public final strictfp class DefaultEllip
     private static final String XML_FILE = "EllipsoidalCS.xml";
 
     /**
-     * Tests unmarshalling of an ellipsoidal coordinate system.
+     * Tests (un)marshalling of an ellipsoidal coordinate system.
      *
      * @throws JAXBException If an error occurred during unmarshalling.
      */
     @Test
-    public void testUnmarshalling() throws JAXBException {
+    public void testXML() throws JAXBException {
         final DefaultEllipsoidalCS cs = unmarshalFile(DefaultEllipsoidalCS.class, XML_FILE);
         Validators.validate(cs);
-        GeodeticObjectVerifier.assertIsGeodetic2D(cs);
+        GeodeticObjectVerifier.assertIsGeodetic2D(cs, true);
         /*
          * Values in the following tests are specific to our XML file.
          * The actual texts in the EPSG database are more descriptive.
          */
+        final CoordinateSystemAxis φ = cs.getAxis(0);
+        final CoordinateSystemAxis λ = cs.getAxis(1);
         assertEquals("name",    "Latitude (north), Longitude (east)",     cs.getName().getCode());
         assertEquals("remarks", "Used in two-dimensional GeographicCRS.", cs.getRemarks().toString());
-        assertIdentifierEquals("identifier", "OGP", "EPSG", null, "6422", getSingleton(cs.getIdentifiers()));
-
-        final CoordinateSystemAxis latitude  = cs.getAxis(0);
-        final CoordinateSystemAxis longitude = cs.getAxis(1);
-        assertIdentifierEquals("axis[0].identifier", "OGP", "EPSG", null, "106", getSingleton(latitude.getIdentifiers()));
-        assertIdentifierEquals("axis[1].identifier", "OGP", "EPSG", null, "107", getSingleton(longitude.getIdentifiers()));
-        assertEquals("axis[0].abbreviation", "Lat",                   latitude .getAbbreviation());
-        assertEquals("axis[1].abbreviation", "Long",                  longitude.getAbbreviation());
-        assertEquals("axis[0].rangeMeaning", RangeMeaning.EXACT,      latitude .getRangeMeaning());
-        assertEquals("axis[1].abbreviation", RangeMeaning.WRAPAROUND, longitude.getRangeMeaning());
+        assertIdentifierEquals(        "identifier", "OGP", "EPSG", null, "6422", getSingleton(cs.getIdentifiers()));
+        assertIdentifierEquals("axis[0].identifier", "OGP", "EPSG", null, "106",  getSingleton(φ.getIdentifiers()));
+        assertIdentifierEquals("axis[1].identifier", "OGP", "EPSG", null, "107",  getSingleton(λ.getIdentifiers()));
+        assertEquals("axis[0].abbreviation", "φ", φ.getAbbreviation());
+        assertEquals("axis[1].abbreviation", "λ", λ.getAbbreviation());
         /*
-         * Minimum and maximum values have been verified by GeodeticObjectVerifier.assertIsGeodetic2D(cs)
-         * if range meanings were not null.
+         * Marshal and compare with the original file.
          */
+        assertMarshalEqualsFile(XML_FILE, cs, "xmlns:*", "xsi:schemaLocation");
     }
 }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -45,7 +45,7 @@ public final strictfp class BursaWolfPar
     /**
      * The conversion factor from arc-seconds to radians.
      */
-    private static final double TO_RADIANS = Math.PI / (180 * 60 * 60);
+    private static final double TO_RADIANS = StrictMath.PI / (180 * 60 * 60);
 
     /**
      * Returns the parameters for the <cite>WGS 72 to WGS 84 (2)</cite> transformation (EPSG:1238).

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultEllipsoidTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultEllipsoidTest.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultEllipsoidTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultEllipsoidTest.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -41,7 +41,10 @@ import static org.apache.sis.referencing
  * @version 0.4
  * @module
  */
-@DependsOn(org.apache.sis.internal.referencing.FormulasTest.class)
+@DependsOn({
+    org.apache.sis.internal.referencing.FormulasTest.class,
+    org.apache.sis.internal.jaxb.referencing.SecondDefiningParameterTest.class
+})
 public final strictfp class DefaultEllipsoidTest extends XMLTestCase {
     /**
      * An XML file in this package containing an ellipsoid definition.

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -23,7 +23,6 @@ import javax.measure.unit.SI;
 import javax.measure.unit.NonSI;
 import javax.xml.bind.JAXBException;
 import org.opengis.metadata.extent.Extent;
-import org.opengis.metadata.extent.GeographicBoundingBox;
 import org.opengis.referencing.operation.Matrix;
 import org.opengis.referencing.datum.GeodeticDatum;
 import org.opengis.test.Validators;
@@ -36,7 +35,6 @@ import org.apache.sis.test.DependsOn;
 import org.junit.Test;
 
 import static org.apache.sis.referencing.Assert.*;
-import static org.apache.sis.test.TestUtilities.getSingleton;
 import static org.apache.sis.test.mock.GeodeticDatumMock.*;
 import static org.apache.sis.referencing.GeodeticObjectVerifier.*;
 
@@ -227,8 +225,7 @@ public final strictfp class DefaultGeode
     @Test
     public void testUnmarshalling() throws JAXBException {
         final DefaultGeodeticDatum datum = unmarshalFile(DefaultGeodeticDatum.class, XML_FILE);
-        assertIsWGS84(datum);
-        assertIsWorld((GeographicBoundingBox) getSingleton(datum.getDomainOfValidity().getGeographicElements()));
+        assertIsWGS84(datum, true);
         /*
          * Values in the following tests are specific to our XML file.
          * The actual texts in the EPSG database are more descriptive.

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultVerticalDatumTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultVerticalDatumTest.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultVerticalDatumTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultVerticalDatumTest.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -18,7 +18,6 @@ package org.apache.sis.referencing.datum
 
 import java.lang.reflect.Field;
 import javax.xml.bind.JAXBException;
-import org.opengis.metadata.extent.GeographicBoundingBox;
 import org.opengis.referencing.datum.VerticalDatumType;
 import org.apache.sis.internal.referencing.VerticalDatumTypes;
 import org.apache.sis.test.XMLTestCase;
@@ -27,7 +26,6 @@ import org.junit.Test;
 
 import static java.util.Collections.singletonMap;
 import static org.apache.sis.referencing.Assert.*;
-import static org.apache.sis.test.TestUtilities.getSingleton;
 import static org.apache.sis.referencing.GeodeticObjectVerifier.*;
 
 
@@ -94,8 +92,7 @@ public final strictfp class DefaultVerti
     @Test
     public void testUnmarshalling() throws JAXBException {
         final DefaultVerticalDatum datum = unmarshalFile(DefaultVerticalDatum.class, XML_FILE);
-        assertIsMeanSeaLevel(datum);
-        assertIsWorld((GeographicBoundingBox) getSingleton(datum.getDomainOfValidity().getGeographicElements()));
+        assertIsMeanSeaLevel(datum, true);
         /*
          * Values in the following tests are specific to our XML file.
          * The actual texts in the EPSG database are more descriptive.

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -71,7 +71,7 @@ public abstract strictfp class MatrixTes
     /**
      * Tolerance factor for comparisons of floating point numbers between SIS and JAMA implementation,
      * which is {@value}. Note that the matrix element values used in this class vary between 0 and 100,
-     * and the {@code Math.ulp(100.0)} value is approximatively 1.4E-14.
+     * and the {@code StrictMath.ulp(100.0)} value is approximatively 1.4E-14.
      *
      * {@section How this value is determined}
      * Experience (by looking at {@link #statistics}) shows that the differences are usually smaller than 1E-12.

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -49,6 +49,7 @@ import org.junit.BeforeClass;
     org.apache.sis.io.wkt.SymbolsTest.class,
     org.apache.sis.io.wkt.FormatterTest.class,
     org.apache.sis.internal.jaxb.referencing.CodeTest.class,
+    org.apache.sis.internal.jaxb.referencing.SecondDefiningParameterTest.class,
     org.apache.sis.referencing.IdentifiedObjectsTest.class,
     org.apache.sis.referencing.NamedIdentifierTest.class,
     org.apache.sis.referencing.AbstractIdentifiedObjectTest.class,
@@ -76,7 +77,9 @@ import org.junit.BeforeClass;
     org.apache.sis.geometry.GeneralEnvelopeTest.class,
     org.apache.sis.geometry.SubEnvelopeTest.class,
     org.apache.sis.geometry.ImmutableEnvelopeTest.class,
-    org.apache.sis.geometry.Envelope2DTest.class
+    org.apache.sis.geometry.Envelope2DTest.class,
+
+    org.apache.sis.test.integration.ReferencingInMetadataTest.class
 })
 public final strictfp class ReferencingTestSuite extends TestSuite {
     /**

Modified: sis/trunk/core/sis-referencing/src/test/resources/org/apache/sis/referencing/cs/EllipsoidalCS.xml
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/resources/org/apache/sis/referencing/cs/EllipsoidalCS.xml?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/resources/org/apache/sis/referencing/cs/EllipsoidalCS.xml (original)
+++ sis/trunk/core/sis-referencing/src/test/resources/org/apache/sis/referencing/cs/EllipsoidalCS.xml Sun Jan  5 04:29:20 2014
@@ -29,7 +29,7 @@
     <gml:CoordinateSystemAxis gml:id="epsg-axis-106" uom="urn:ogc:def:uom:EPSG::9122">
       <gml:identifier codeSpace="OGP">urn:ogc:def:axis:EPSG::106</gml:identifier>
       <gml:name>Geodetic latitude</gml:name>
-      <gml:axisAbbrev>Lat</gml:axisAbbrev>
+      <gml:axisAbbrev>φ</gml:axisAbbrev>
       <gml:axisDirection codeSpace="EPSG">north</gml:axisDirection>
       <gml:minimumValue>-90</gml:minimumValue>
       <gml:maximumValue>+90</gml:maximumValue>
@@ -40,7 +40,7 @@
     <gml:CoordinateSystemAxis gml:id="epsg-axis-107" uom="urn:ogc:def:uom:EPSG::9122">
       <gml:identifier codeSpace="OGP">urn:ogc:def:axis:EPSG::107</gml:identifier>
       <gml:name>Geodetic longitude</gml:name>
-      <gml:axisAbbrev>Long</gml:axisAbbrev>
+      <gml:axisAbbrev>λ</gml:axisAbbrev>
       <gml:axisDirection codeSpace="EPSG">east</gml:axisDirection>
       <gml:minimumValue>-180</gml:minimumValue>
       <gml:maximumValue>+180</gml:maximumValue>

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/Measure.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/Measure.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/Measure.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/Measure.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -125,7 +125,7 @@ public final class Measure {
      */
     @XmlAttribute(name = "uom", required = true)
     public String getUOM() {
-        return getUOM(unit, asXPointer);
+        return getUOM(unit, asXPointer, false);
     }
 
     /**
@@ -135,11 +135,12 @@ public final class Measure {
      *
      * @param  unit The unit to format.
      * @param  asXPointer {@code true} if the units shall be formatted as {@code xpointer}.
-     * @return
+     * @param  inAxis {@code true} for a unit used in Coordinate System Axis definition.
+     * @return The string representation of the unit of measure.
      */
-    static String getUOM(final Unit<?> unit, final boolean asXPointer) {
+    static String getUOM(final Unit<?> unit, final boolean asXPointer, final boolean inAxis) {
         if (!asXPointer) {
-            final Integer code = Units.getEpsgCode(unit);
+            final Integer code = Units.getEpsgCode(unit, inAxis);
             if (code != null) {
                 return "urn:ogc:def:uom:EPSG::" + code;
             }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/UnitAdapter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/UnitAdapter.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/UnitAdapter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/UnitAdapter.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -58,13 +58,16 @@ public class UnitAdapter extends XmlAdap
     }
 
     /**
-     * A variant of {@link UnitAdapter} which marshal units as an URN.
+     * A variant of {@link UnitAdapter} which marshal units as an URN for Coordinate System (CS) axes.
      * Example: {@code "urn:ogc:def:uom:EPSG::9001"}.
+     *
+     * The difference between coordinate system axis and other uses (prime meridian, etc.) is in the choice of EPSG
+     * code for the degrees. See {@link org.apache.sis.measure.Units#getEpsgCode(Unit, boolean)} for more information.
      */
-    public static final class AsURN extends UnitAdapter {
+    public static final class ForCS extends UnitAdapter {
         @Override
         public String marshal(final Unit<?> value) {
-            return Measure.getUOM(value, false);
+            return Measure.getUOM(value, false, true);
         }
     }
 }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -439,7 +439,7 @@ public final class Units extends Static 
     /**
      * Returns {@code true} if the given unit seems to be an URI. Example:
      * <ul>
-     *   <li>{@code "urn:ogc:def:uom:EPSG::9102"}</li>
+     *   <li>{@code "urn:ogc:def:uom:EPSG::9001"}</li>
      *   <li>{@code "http://schemas.opengis.net/iso/19139/20070417/resources/uom/gmxUom.xml#xpointer(//*[@gml:id='m'])"}</li>
      * </ul>
      */
@@ -460,17 +460,17 @@ public final class Units extends Static 
      * {@code null}.
      *
      * <p>The list of units recognized by this method is not exhaustive. This method recognizes
-     * the base units declared in the {@code [TARGET_UOM_CODE]} column of the above-cited table,
+     * the base units declared in the {@code TARGET_UOM_CODE} column of the above-cited table,
      * and some frequently-used units. The list of recognized units may be updated in any future
      * version of SIS.</p>
      *
      * <p>The {@link org.apache.sis.referencing.factory.epsg.DirectEpsgFactory} uses this method
      * for fetching the base units, and derives automatically other units from the information
-     * found in the EPSG database. This method is also used by other code not directly related
+     * found in the EPSG database. This method is also used by other classes not directly related
      * to the EPSG database, like {@link org.apache.sis.referencing.factory.web.AutoCRSFactory}
      * which uses EPSG code for identifying units.</p>
      *
-     * <p>The values currently recognized are:</p>
+     * <p>The currently recognized values are:</p>
      * <table class="sis">
      *   <tr>
      *     <th>Linear units</th>
@@ -507,6 +507,10 @@ public final class Units extends Static 
      *   </tr>
      * </table>
      *
+     * <b>Note:</b> EPSG uses code 9102 (<cite>degree</cite>) for prime meridian and coordinate operation parameters,
+     * and code 9122 (<cite>degree (supplier to define representation)</cite>) for coordinate system axes.
+     * But Apache SIS considers those two codes as synonymous.
+     *
      * @param  code The EPSG code for a unit of measurement.
      * @return The unit, or {@code null} if the code is unrecognized.
      */
@@ -538,12 +542,26 @@ public final class Units extends Static 
      * Returns the EPSG code of the given units, or {@code null} if unknown.
      * This method is the converse of {@link #valueOfEPSG(int)}.
      *
+     * <p>The same unit may be represented by different EPSG codes depending on the context:</p>
+     * <ul>
+     *   <li>EPSG:9102 – <cite>degree</cite> – is used for prime meridian and coordinate operation parameters.</li>
+     *   <li>EPSG:9122 – <cite>degree (supplier to define representation)</cite> – is used for coordinate system axes.</li>
+     * </ul>
+     *
+     * When such choice exists, the code to return is determined by the {@code inAxis} argument,
+     * which specifies whether the code will be used for axis definition or in other context.
+     *
      * @param  unit The unit for which to get the EPSG code.
+     * @param  inAxis {@code true} for a unit used in Coordinate System Axis definition.
      * @return The EPSG code of the given units, or {@code null} if unknown.
      *
      * @since 0.4
      */
-    public static Integer getEpsgCode(final Unit<?> unit) {
-        return UnitsMap.EPSG_CODES.get(unit);
+    public static Integer getEpsgCode(final Unit<?> unit, final boolean inAxis) {
+        Integer code = UnitsMap.EPSG_CODES.get(unit);
+        if (inAxis && code != null && code.intValue() == 9102) {
+            code = UnitsMap.I9122;
+        }
+        return code;
     }
 }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/UnitsMap.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/UnitsMap.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/UnitsMap.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/UnitsMap.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -46,6 +46,12 @@ final class UnitsMap extends Static {
     }
 
     /**
+     * The 9122 integer, used as an alternative code for the degrees unit.
+     * See {@link Units#getEpsgCode(Unit, boolean)} for more information.
+     */
+    static final Integer I9122 = 9122;
+
+    /**
      * EPSG codes of some units. This map is the reverse of {@link Units#valueOfEPSG(int)}.
      * The map is defined in this class rather than in the {@code Units} class in order to
      * avoid loading the {@code SexagesimalConverter} class before needed, since their

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -122,7 +122,7 @@ public final class ArgumentChecks extend
      *
      * @param  name    The name of the argument to be checked. Used only if an exception is thrown.
      * @param  index   The Index of the element to check in an array or a list. Used only if an exception is thrown.
-     * @param  element The array or list element to check against null null.
+     * @param  element The array or list element to check against null value.
      * @throws NullArgumentException if {@code element} is null.
      */
     public static void ensureNonNullElement(final String name, final int index, final Object element)

Modified: sis/trunk/core/sis-utility/src/site/resources/css/site.css
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/site/resources/css/site.css?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/site/resources/css/site.css (original)
+++ sis/trunk/core/sis-utility/src/site/resources/css/site.css Sun Jan  5 04:29:20 2014
@@ -1 +1 @@
-link ../../../../../sis-build-helper/src/site/resources/css/site.css
\ No newline at end of file
+link ../../../../../../src/main/link-target/site-module.css
\ No newline at end of file

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/DoubleDoubleTest.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -373,11 +373,11 @@ public final strictfp class DoubleDouble
     }
 
     /**
-     * Tests π values using the {@link Math#PI} constant.
+     * Tests π values using the {@link StrictMath#PI} constant.
      * This test method serves two purposes:
      *
      * <ul>
-     *   <li>Ensure that the results of small arithmetic operations on {@link Math#PI} produce
+     *   <li>Ensure that the results of small arithmetic operations on {@link StrictMath#PI} produce
      *       numbers that {@link DoubleDouble#errorForWellKnownValue(double)} can find.</li>
      *   <li>Compare with the values computed by the {@code qd-2.3.14} package (a C/C++ library),
      *       which is taken as the reference implementation.</li>

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/NumericsTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/NumericsTest.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/NumericsTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/NumericsTest.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -63,7 +63,7 @@ public final strictfp class NumericsTest
     @Test
     public void testToExp10() {
         for (int i=-2620; i<=2620; i++) {
-            assertEquals(Math.floor(i * MathFunctions.LOG10_2), toExp10(i), 0);
+            assertEquals(StrictMath.floor(i * MathFunctions.LOG10_2), toExp10(i), 0);
         }
         for (int i=-307; i<=308; i++) {
             final String value = "1E" + i;

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/math/DecimalFunctionsTest.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -66,7 +66,7 @@ public final strictfp class DecimalFunct
         for (int i=EXPONENT_FOR_ZERO; i<=EXPONENT_FOR_MAX; i++) { // Range of allowed exponents in base 10.
             assertEquals(parseDouble("1E"+i), pow10(i), STRICT);
         }
-        assertEquals(1000000000000000000L, Math.round(pow10(18))); // Highest value having an exact representation.
+        assertEquals(1000000000000000000L, StrictMath.round(pow10(18))); // Highest value having an exact representation.
     }
 
     /**

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/UnitsTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/UnitsTest.java?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/UnitsTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/UnitsTest.java [UTF-8] Sun Jan  5 04:29:20 2014
@@ -255,7 +255,8 @@ public final strictfp class UnitsTest ex
     @Test
     public void testValueOfEPSG() {
         assertSame(METRE,        valueOfEPSG(9001));
-        assertSame(DEGREE_ANGLE, valueOfEPSG(9102));
+        assertSame(DEGREE_ANGLE, valueOfEPSG(9102)); // Used in prime meridian and operation parameters.
+        assertSame(DEGREE_ANGLE, valueOfEPSG(9122)); // Used in coordinate system axes.
         assertSame(METRE,        valueOf("EPSG:9001"));
         assertSame(DEGREE_ANGLE, valueOf(" epsg : 9102"));
         assertSame(DEGREE_ANGLE, valueOf("urn:ogc:def:uom:EPSG::9102"));
@@ -264,12 +265,14 @@ public final strictfp class UnitsTest ex
     }
 
     /**
-     * Tests {@link Units#getEpsgCode(Unit)}.
+     * Tests {@link Units#getEpsgCode(Unit, boolean)}.
      */
     @Test
     public void testGetEpsgCode() {
-        assertEquals(Integer.valueOf(9001), getEpsgCode(METRE));
-        assertEquals(Integer.valueOf(9102), getEpsgCode(DEGREE_ANGLE));
-        assertEquals(Integer.valueOf(9110), getEpsgCode(DMS));
+        assertEquals(Integer.valueOf(9001), getEpsgCode(METRE, false));
+        assertEquals(Integer.valueOf(9102), getEpsgCode(DEGREE_ANGLE, false));
+        assertEquals(Integer.valueOf(9122), getEpsgCode(DEGREE_ANGLE, true));
+        assertEquals(Integer.valueOf(9110), getEpsgCode(DMS, false));
+        assertEquals(Integer.valueOf(9110), getEpsgCode(DMS, true));
     }
 }

Modified: sis/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/sis/trunk/src/site/site.xml?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/src/site/site.xml (original)
+++ sis/trunk/src/site/site.xml Sun Jan  5 04:29:20 2014
@@ -72,7 +72,7 @@
       <item name="Utilities"      href="sis-utility/index.html"/>
       <item name="Metadata"       href="sis-metadata/index.html"/>
       <item name="Referencing"    href="sis-referencing/index.html"/>
-      <item name="Features"       href="sis-features/index.html"/>
+      <item name="Features"       href="sis-feature/index.html"/>
       <item name="Storage"        href="sis-storage/index.html"/>
       <item name="Shapefile"      href="sis-shapefile/index.html"/>
       <item name="NetCDF"         href="sis-netcdf/index.html"/>

Modified: sis/trunk/storage/sis-netcdf/src/site/resources/css/site.css
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-netcdf/src/site/resources/css/site.css?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/storage/sis-netcdf/src/site/resources/css/site.css (original)
+++ sis/trunk/storage/sis-netcdf/src/site/resources/css/site.css Sun Jan  5 04:29:20 2014
@@ -1 +1 @@
-link ../../../../../../core/sis-build-helper/src/site/resources/css/site.css
\ No newline at end of file
+link ../../../../../../src/main/link-target/site-module.css
\ No newline at end of file

Modified: sis/trunk/storage/src/site/resources/css/site.css
URL: http://svn.apache.org/viewvc/sis/trunk/storage/src/site/resources/css/site.css?rev=1555456&r1=1555455&r2=1555456&view=diff
==============================================================================
--- sis/trunk/storage/src/site/resources/css/site.css (original)
+++ sis/trunk/storage/src/site/resources/css/site.css Sun Jan  5 04:29:20 2014
@@ -1 +1 @@
-link ../../../../../core/src/site/resources/css/site.css
\ No newline at end of file
+link ../../../../../src/main/link-target/site-module-group.css
\ No newline at end of file



Mime
View raw message