sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1740177 [4/8] - in /sis/trunk: ./ core/sis-feature/ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-feature/src/main/java/org/apache/sis/internal/ core/sis-feature/src/main/java/org/apache/sis/internal/feature/ core/sis-fea...
Date Wed, 20 Apr 2016 17:40:13 GMT
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffineBetweenGeographic.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffineBetweenGeographic.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffineBetweenGeographic.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffineBetweenGeographic.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -101,11 +101,15 @@ public abstract class GeocentricAffineBe
     /**
      * Constructs a provider with the specified parameters.
      *
-     * @param sourceDimensions Number of dimensions in the source CRS of this operation method.
-     * @param targetDimensions Number of dimensions in the target CRS of this operation method.
+     * @param sourceDimensions  number of dimensions in the source CRS of this operation method.
+     * @param targetDimensions  number of dimensions in the target CRS of this operation method.
+     * @param parameters        description of parameters expected by this operation.
+     * @param redimensioned     providers for all combinations between 2D and 3D cases, or {@code null}.
      */
-    GeocentricAffineBetweenGeographic(int sourceDimensions, int targetDimensions, ParameterDescriptorGroup parameters) {
-        super(sourceDimensions, targetDimensions, parameters);
+    GeocentricAffineBetweenGeographic(int sourceDimensions, int targetDimensions,
+            ParameterDescriptorGroup parameters, GeodeticOperation[] redimensioned)
+    {
+        super(sourceDimensions, targetDimensions, parameters, redimensioned);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricTranslation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricTranslation.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricTranslation.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricTranslation.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -52,7 +52,7 @@ public final class GeocentricTranslation
      * Constructs the provider.
      */
     public GeocentricTranslation() {
-        super(3, 3, PARAMETERS);
+        super(3, 3, PARAMETERS, null);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricTranslation2D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricTranslation2D.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricTranslation2D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricTranslation2D.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -56,7 +56,22 @@ public final class GeocentricTranslation
      * Constructs the provider.
      */
     public GeocentricTranslation2D() {
-        super(2, 2, PARAMETERS);
+        this(null);
+    }
+
+    /**
+     * Constructs a provider that can be resized.
+     */
+    GeocentricTranslation2D(GeodeticOperation[] redimensioned) {
+        super(2, 2, PARAMETERS, redimensioned);
+    }
+
+    /**
+     * Returns the three-dimensional variant of this operation method.
+     */
+    @Override
+    Class<GeocentricTranslation3D> variant3D() {
+        return GeocentricTranslation3D.class;
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricTranslation3D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricTranslation3D.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricTranslation3D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricTranslation3D.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -51,8 +51,24 @@ public final class GeocentricTranslation
     /**
      * Constructs the provider.
      */
+    @SuppressWarnings("ThisEscapedInObjectConstruction")
     public GeocentricTranslation3D() {
-        super(3, 3, PARAMETERS);
+        this(3, 3, new GeocentricAffineBetweenGeographic[4]);
+        redimensioned[0] = new GeocentricTranslation2D(      redimensioned);
+        redimensioned[1] = new GeocentricTranslation3D(2, 3, redimensioned);
+        redimensioned[2] = new GeocentricTranslation3D(3, 2, redimensioned);
+        redimensioned[3] = this;
+    }
+
+    /**
+     * Constructs a provider for the given dimensions.
+     *
+     * @param sourceDimensions  number of dimensions in the source CRS of this operation method.
+     * @param targetDimensions  number of dimensions in the target CRS of this operation method.
+     * @param redimensioned     providers for all combinations between 2D and 3D cases, or {@code null}.
+     */
+    private GeocentricTranslation3D(int sourceDimensions, int targetDimensions, GeodeticOperation[] redimensioned) {
+        super(sourceDimensions, targetDimensions, PARAMETERS, redimensioned);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Geographic3Dto2D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Geographic3Dto2D.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Geographic3Dto2D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Geographic3Dto2D.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -37,7 +37,7 @@ import org.apache.sis.internal.referenci
 /**
  * The provider for <cite>"Geographic 3D to 2D conversion"</cite> (EPSG:9659).
  * This is a trivial operation that just drop the height in a geographic coordinate.
- * The inverse operation arbitrarily set the ellipsoidal height to zero.
+ * The inverse operation arbitrarily sets the ellipsoidal height to zero.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
@@ -54,7 +54,7 @@ public final class Geographic3Dto2D exte
     /**
      * The group of all parameters expected by this coordinate operation (in this case, none).
      */
-    static final ParameterDescriptorGroup PARAMETERS = builder()
+    public static final ParameterDescriptorGroup PARAMETERS = builder()
             .addIdentifier("9659").addName("Geographic3D to 2D conversion").createGroup();
 
     /**
@@ -113,9 +113,9 @@ public final class Geographic3Dto2D exte
     }
 
     /**
-     * A temporary placeholder used for formatting a {@code PARAM_MT["Geographic 3D to 2D conversion"]}
-     * element in Well-Known Text format. This placeholder is needed there is no {@link MathTransform}
-     * implementation for the Geographic 3D to 2D conversion, since we use affine transform instead.
+     * A temporary placeholder used for formatting a {@code PARAM_MT["Geographic 3D to 2D conversion"]} element in
+     * Well-Known Text format. This placeholder is needed because there is no {@link MathTransform} implementation
+     * for the Geographic 3D to 2D conversion, since we use affine transform instead.
      */
     public static final class WKT extends FormattableObject implements Parameterized {
         /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -25,7 +25,6 @@ import org.opengis.parameter.ParameterDe
 import org.opengis.parameter.ParameterNotFoundException;
 import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.MathTransformFactory;
-import org.opengis.referencing.operation.Transformation;
 import org.apache.sis.parameter.ParameterBuilder;
 import org.apache.sis.parameter.Parameters;
 import org.apache.sis.referencing.operation.matrix.Matrix4;
@@ -43,7 +42,7 @@ import org.apache.sis.referencing.operat
  * @module
  */
 @XmlTransient
-public class GeographicOffsets extends AbstractProvider {
+public class GeographicOffsets extends GeodeticOperation {
     /**
      * Serial number for inter-operability with different versions.
      */
@@ -79,35 +78,22 @@ public class GeographicOffsets extends A
     /**
      * Constructs a provider with default parameters.
      */
+    @SuppressWarnings("ThisEscapedInObjectConstruction")
     public GeographicOffsets() {
-        super(3, 3, PARAMETERS);
+        super(3, 3, PARAMETERS, new GeographicOffsets[4]);
+        redimensioned[0] = new GeographicOffsets2D(redimensioned);
+        redimensioned[1] = new GeographicOffsets(2, 3, PARAMETERS, redimensioned);
+        redimensioned[2] = new GeographicOffsets(3, 2, PARAMETERS, redimensioned);
+        redimensioned[3] = this;
     }
 
     /**
      * For subclasses constructor only.
      */
-    GeographicOffsets(int dim, ParameterDescriptorGroup parameters) {
-        super(dim, dim, parameters);
-    }
-
-    /**
-     * Returns the operation type.
-     *
-     * @return Interface implemented by all coordinate operations that use this method.
-     */
-    @Override
-    public final Class<Transformation> getOperationType() {
-        return Transformation.class;
-    }
-
-    /**
-     * The inverse of this operation is the same operation with parameter signs inverted.
-     *
-     * @return {@code true} for all {@code GeocentricAffine}.
-     */
-    @Override
-    public final boolean isInvertible() {
-        return true;
+    GeographicOffsets(int sourceDimensions, int targetDimensions,
+            ParameterDescriptorGroup parameters, GeodeticOperation[] redimensioned)
+    {
+        super(sourceDimensions, targetDimensions, parameters, redimensioned);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets2D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets2D.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets2D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets2D.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -53,7 +53,22 @@ public final class GeographicOffsets2D e
      * Constructs a provider with default parameters.
      */
     public GeographicOffsets2D() {
-        super(2, PARAMETERS);
+        this(null);
+    }
+
+    /**
+     * Constructs a provider that can be resized.
+     */
+    GeographicOffsets2D(GeodeticOperation[] redimensioned) {
+        super(2, 2, PARAMETERS, redimensioned);
+    }
+
+    /**
+     * Returns the three-dimensional variant of this operation method.
+     */
+    @Override
+    Class<GeographicOffsets> variant3D() {
+        return GeographicOffsets.class;
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -65,8 +65,24 @@ public final class LongitudeRotation ext
     /**
      * Constructs a provider with default parameters.
      */
+    @SuppressWarnings("ThisEscapedInObjectConstruction")
     public LongitudeRotation() {
-        super(2, PARAMETERS);
+        this(2, 2, new LongitudeRotation[4]);
+        redimensioned[0] = this;
+        redimensioned[1] = new LongitudeRotation(2, 3, redimensioned);
+        redimensioned[2] = new LongitudeRotation(3, 2, redimensioned);
+        redimensioned[3] = new LongitudeRotation(3, 3, redimensioned);
+    }
+
+    /**
+     * Constructs a provider for the given dimensions.
+     *
+     * @param sourceDimensions  number of dimensions in the source CRS of this operation method.
+     * @param targetDimensions  number of dimensions in the target CRS of this operation method.
+     * @param redimensioned     providers for all combinations between 2D and 3D cases.
+     */
+    private LongitudeRotation(int sourceDimensions, int targetDimensions, GeodeticOperation[] redimensioned) {
+        super(sourceDimensions, targetDimensions, PARAMETERS, redimensioned);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -29,7 +29,6 @@ import org.opengis.parameter.ParameterNo
 import org.opengis.parameter.InvalidParameterValueException;
 import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.MathTransformFactory;
-import org.opengis.referencing.operation.OperationMethod;
 import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.parameter.ParameterBuilder;
 import org.apache.sis.parameter.Parameters;
@@ -39,7 +38,6 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.referencing.Formulas;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.util.resources.Errors;
-import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.Debug;
 
 
@@ -134,22 +132,11 @@ public final class Molodensky extends Ge
     }
 
     /**
-     * The providers for all combinations between 2D and 3D cases.
-     * Array length is 4. Index is built with following rule:
-     * <ul>
-     *   <li>Bit 1: dimension of source coordinates (0 for 2D, 1 for 3D).</li>
-     *   <li>Bit 0: dimension of target coordinates (0 for 2D, 1 for 3D).</li>
-     * </ul>
-     */
-    private final Molodensky[] redimensioned;
-
-    /**
      * Constructs a new provider.
      */
     @SuppressWarnings("ThisEscapedInObjectConstruction")
     public Molodensky() {
-        super(3, 3, PARAMETERS);
-        redimensioned = new Molodensky[4];
+        this(3, 3, new Molodensky[4]);
         redimensioned[0] = new Molodensky(2, 2, redimensioned);
         redimensioned[1] = new Molodensky(2, 3, redimensioned);
         redimensioned[2] = new Molodensky(3, 2, redimensioned);
@@ -159,27 +146,12 @@ public final class Molodensky extends Ge
     /**
      * Constructs a provider for the given dimensions.
      *
-     * @param sourceDimensions Number of dimensions in the source CRS of this operation method.
-     * @param targetDimensions Number of dimensions in the target CRS of this operation method.
-     * @param redimensioned    Providers for all combinations between 2D and 3D cases.
-     */
-    private Molodensky(final int sourceDimensions, final int targetDimensions, final Molodensky[] redimensioned) {
-        super(sourceDimensions, targetDimensions, PARAMETERS);
-        this.redimensioned = redimensioned;
-    }
-
-    /**
-     * Returns the same operation method, but for different number of dimensions.
-     *
-     * @param  sourceDimensions The desired number of input dimensions.
-     * @param  targetDimensions The desired number of output dimensions.
-     * @return The redimensioned operation method, or {@code this} if no change is needed.
-     */
-    @Override
-    public OperationMethod redimension(final int sourceDimensions, final int targetDimensions) {
-        ArgumentChecks.ensureBetween("sourceDimensions", 2, 3, sourceDimensions);
-        ArgumentChecks.ensureBetween("targetDimensions", 2, 3, targetDimensions);
-        return redimensioned[((sourceDimensions & 1) << 1) | (targetDimensions & 1)];
+     * @param sourceDimensions  number of dimensions in the source CRS of this operation method.
+     * @param targetDimensions  number of dimensions in the target CRS of this operation method.
+     * @param redimensioned     providers for all combinations between 2D and 3D cases.
+     */
+    private Molodensky(int sourceDimensions, int targetDimensions, GeodeticOperation[] redimensioned) {
+        super(sourceDimensions, targetDimensions, PARAMETERS, redimensioned);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MolodenskyInterpolation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MolodenskyInterpolation.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MolodenskyInterpolation.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MolodenskyInterpolation.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -68,15 +68,15 @@ public final class MolodenskyInterpolati
     /**
      * Constructs a provider for the given number of dimensions.
      *
-     * @param sourceDimensions Number of dimensions in the source CRS of this operation method.
-     * @param targetDimensions Number of dimensions in the target CRS of this operation method.
-     * @param parameters       The set of parameters (never {@code null}).
-     * @param redimensioned    Providers for all combinations between 2D and 3D cases.
+     * @param sourceDimensions  number of dimensions in the source CRS of this operation method.
+     * @param targetDimensions  number of dimensions in the target CRS of this operation method.
+     * @param parameters        description of parameters expected by this operation.
+     * @param redimensioned     providers for all combinations between 2D and 3D cases, or {@code null}.
      */
     private MolodenskyInterpolation(final int sourceDimensions,
                                     final int targetDimensions,
                                     final ParameterDescriptorGroup parameters,
-                                    final FranceGeocentricInterpolation[] redimensioned)
+                                    final GeodeticOperation[] redimensioned)
     {
         super(sourceDimensions, targetDimensions, parameters, redimensioned);
     }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PositionVector7Param.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PositionVector7Param.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PositionVector7Param.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PositionVector7Param.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -56,7 +56,7 @@ public final class PositionVector7Param
      * Constructs the provider.
      */
     public PositionVector7Param() {
-        super(3, 3, PARAMETERS);
+        super(3, 3, PARAMETERS, null);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PositionVector7Param2D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PositionVector7Param2D.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PositionVector7Param2D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PositionVector7Param2D.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -59,7 +59,22 @@ public final class PositionVector7Param2
      * Constructs the provider.
      */
     public PositionVector7Param2D() {
-        super(2, 2, PARAMETERS);
+        this(null);
+    }
+
+    /**
+     * Constructs a provider that can be resized.
+     */
+    PositionVector7Param2D(GeodeticOperation[] redimensioned) {
+        super(2, 2, PARAMETERS, redimensioned);
+    }
+
+    /**
+     * Returns the three-dimensional variant of this operation method.
+     */
+    @Override
+    Class<PositionVector7Param3D> variant3D() {
+        return PositionVector7Param3D.class;
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PositionVector7Param3D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PositionVector7Param3D.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PositionVector7Param3D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PositionVector7Param3D.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -54,8 +54,24 @@ public final class PositionVector7Param3
     /**
      * Constructs the provider.
      */
+    @SuppressWarnings("ThisEscapedInObjectConstruction")
     public PositionVector7Param3D() {
-        super(3, 3, PARAMETERS);
+        this(3, 3, new GeocentricAffineBetweenGeographic[4]);
+        redimensioned[0] = new PositionVector7Param2D(      redimensioned);
+        redimensioned[1] = new PositionVector7Param3D(2, 3, redimensioned);
+        redimensioned[2] = new PositionVector7Param3D(3, 2, redimensioned);
+        redimensioned[3] = this;
+    }
+
+    /**
+     * Constructs a provider for the given dimensions.
+     *
+     * @param sourceDimensions  number of dimensions in the source CRS of this operation method.
+     * @param targetDimensions  number of dimensions in the target CRS of this operation method.
+     * @param redimensioned     providers for all combinations between 2D and 3D cases, or {@code null}.
+     */
+    private PositionVector7Param3D(int sourceDimensions, int targetDimensions, GeodeticOperation[] redimensioned) {
+        super(sourceDimensions, targetDimensions, PARAMETERS, redimensioned);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/VerticalOffset.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/VerticalOffset.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/VerticalOffset.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/VerticalOffset.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -70,7 +70,7 @@ public final class VerticalOffset extend
      * Constructs a provider with default parameters.
      */
     public VerticalOffset() {
-        super(1, PARAMETERS);
+        super(1, 1, PARAMETERS, null);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -209,8 +209,9 @@ public class DefaultParameterDescriptorG
      */
     private static void verifyNames(final Map<String,?> properties, final GeneralParameterDescriptor[] parameters) {
         for (int i=0; i<parameters.length; i++) {
-            ArgumentChecks.ensureNonNullElement("parameters", i, parameters);
-            final String name = parameters[i].getName().getCode();
+            final GeneralParameterDescriptor parameter = parameters[i];
+            ArgumentChecks.ensureNonNullElement("parameters", i, parameter);
+            final String name = parameter.getName().getCode();
             for (int j=0; j<i; j++) {
                 if (IdentifiedObjects.isHeuristicMatchForName(parameters[j], name)) {
                     throw new InvalidParameterNameException(Errors.getResources(properties).getString(

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -396,7 +396,7 @@ public class AbstractIdentifiedObject ex
             final Map<String,?> properties, final String key, final Object value)
     {
         return new IllegalArgumentException(Errors.getResources(properties)
-                .getString(Errors.Keys.IllegalPropertyClass_2, key, value.getClass()));
+                .getString(Errors.Keys.IllegalPropertyValueClass_2, key, value.getClass()));
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -89,7 +89,7 @@ final class AuthorityFactories<T extends
      * Creates a new provider for factories of the given type.
      */
     private AuthorityFactories(final Class<T> type) {
-        super(ServiceLoader.load(type));
+        super(type);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -44,6 +44,8 @@ import org.opengis.metadata.extent.Exten
 import org.opengis.metadata.extent.GeographicBoundingBox;
 import org.opengis.referencing.operation.CoordinateOperation;
 import org.apache.sis.internal.metadata.AxisDirections;
+import org.apache.sis.internal.referencing.PositionalAccuracyConstant;
+import org.apache.sis.internal.referencing.CoordinateOperations;
 import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.referencing.cs.DefaultVerticalCS;
@@ -51,6 +53,7 @@ import org.apache.sis.referencing.cs.Def
 import org.apache.sis.referencing.crs.DefaultGeographicCRS;
 import org.apache.sis.referencing.crs.DefaultVerticalCRS;
 import org.apache.sis.referencing.crs.DefaultCompoundCRS;
+import org.apache.sis.referencing.operation.AbstractCoordinateOperation;
 import org.apache.sis.referencing.operation.CoordinateOperationContext;
 import org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory;
 import org.apache.sis.referencing.factory.UnavailableFactoryException;
@@ -66,13 +69,34 @@ import static java.util.Collections.sing
 
 /**
  * Static methods working on {@linkplain CoordinateReferenceSystem Coordinate Reference Systems}.
- * The methods defined in this class can be grouped in two categories:
+ * The methods defined in this class can be grouped in three categories:
  *
  * <ul>
  *   <li>Factory methods, the most notable one being {@link #forCode(String)}.</li>
  *   <li>Methods providing information, like {@link #isHorizontalCRS(CoordinateReferenceSystem)}.</li>
+ *   <li>Finding coordinate operations between a source and a target CRS.</li>
  * </ul>
  *
+ * <div class="section">Usage example</div>
+ * The most frequently used methods in this class are {@link #forCode forCode(…)}, {@link #fromWKT fromWKT(…)}
+ * and {@link #findOperation findOperation(…)}. An usage example is like below
+ * (see the <a href="http://sis.apache.org/book/tables/CoordinateReferenceSystems.html">Apache SIS™ Coordinate
+ * Reference System (CRS) codes</a> page for the complete list of EPSG codes):
+ *
+ * {@preformat java
+ *   CoordinateReferenceSystem source = CRS.forCode("EPSG:4326");                   // WGS 84
+ *   CoordinateReferenceSystem target = CRS.forCode("EPSG:3395");                   // WGS 84 / World Mercator
+ *   CoordinateOperation operation = CRS.findOperation(source, target, null);
+ *   if (CRS.getLinearAccuracy(operation) > 100) {
+ *       // If the accuracy is coarser than 100 metres (or any other threshold at application choice)
+ *       // maybe the operation is not suitable. Decide here what to do (throw an exception, etc).
+ *   }
+ *   MathTransform mt = operation.getMathTransform();
+ *   DirectPosition position = new DirectPosition2D(20, 30);            // 20°N 30°E   (watch out axis order!)
+ *   position = mt.transform(position, position);
+ *   System.out.println(position);
+ * }
+ *
  * <div class="section">Note on kinds of CRS</div>
  * The {@link #getSingleComponents(CoordinateReferenceSystem)} method decomposes an arbitrary CRS into a flat
  * list of single components. In such flat list, vertical and temporal components can easily be identified by
@@ -101,9 +125,10 @@ public final class CRS extends Static {
     /**
      * Returns the Coordinate Reference System for the given authority code.
      * The set of available codes depends on the {@link CRSAuthorityFactory} instances available on the classpath.
-     * There is many thousands of CRS defined by EPSG authority or by other authorities.
+     * There is many thousands of <a href="http://sis.apache.org/book/tables/CoordinateReferenceSystems.html">CRS
+     * defined by EPSG authority or by other authorities</a>.
      * The following table lists a very small subset of codes which are guaranteed to be available
-     * on any installation of Apache SIS version 0.4 or above:
+     * on any installation of Apache SIS:
      *
      * <blockquote><table class="sis">
      *   <caption>Minimal set of supported authority codes</caption>
@@ -218,14 +243,141 @@ public final class CRS extends Static {
     }
 
     /**
+     * Creates a coordinate reference system object from a XML string.
+     * Note that the given argument is the XML document itself, <strong>not</strong> a URL to a XML document.
+     * For reading XML documents from readers or input streams,
+     * see static methods in the {@link org.apache.sis.xml.XML} class.
+     *
+     * @param  xml Coordinate reference system encoded in XML format.
+     * @return The unmarshalled Coordinate Reference System.
+     * @throws FactoryException if the object creation failed.
+     *
+     * @see org.apache.sis.xml.XML#unmarshal(String)
+     *
+     * @since 0.7
+     */
+    public static CoordinateReferenceSystem fromXML(final String xml) throws FactoryException {
+        ArgumentChecks.ensureNonNull("text", xml);
+        return DefaultFactories.forBuildin(CRSFactory.class).createFromXML(xml);
+    }
+
+    /**
+     * Finds a mathematical operation that transforms or converts coordinates from the given source to the
+     * given target coordinate reference system. If an estimation of the geographic area containing the points
+     * to transform is known, it can be specified for helping this method to find a better suited operation.
+     *
+     * <div class="note"><b>Note:</b>
+     * the area of interest is just one aspect that may affect the coordinate operation.
+     * Other aspects are the time of interest (because some coordinate operations take in account the
+     * plate tectonics movement) or the desired accuracy. For more control on the coordinate operation
+     * to create, see {@link CoordinateOperationContext}.</div>
+     *
+     * After the caller received a {@code CoordinateOperation} instance, the following methods can be invoked
+     * for checking if the operation suits the caller's needs:
+     *
+     * <ul>
+     *   <li>{@link #getGeographicBoundingBox(CoordinateOperation)}
+     *       for checking if the operation is valid in the caller's area of interest.</li>
+     *   <li>{@link #getLinearAccuracy(CoordinateOperation)}
+     *       for checking if the operation has sufficient accuracy for caller's purpose.</li>
+     * </ul>
+     *
+     * @param  sourceCRS      the CRS of source coordinates.
+     * @param  targetCRS      the CRS of target coordinates.
+     * @param  areaOfInterest the area of interest, or {@code null} if none.
+     * @return the mathematical operation from {@code sourceCRS} to {@code targetCRS}.
+     * @throws FactoryException if the operation can not be created.
+     *
+     * @see DefaultCoordinateOperationFactory#createOperation(CoordinateReferenceSystem, CoordinateReferenceSystem, CoordinateOperationContext)
+     *
+     * @since 0.7
+     */
+    public static CoordinateOperation findOperation(final CoordinateReferenceSystem sourceCRS,
+                                                    final CoordinateReferenceSystem targetCRS,
+                                                    final GeographicBoundingBox areaOfInterest)
+            throws FactoryException
+    {
+        ArgumentChecks.ensureNonNull("sourceCRS", sourceCRS);
+        ArgumentChecks.ensureNonNull("targetCRS", targetCRS);
+        CoordinateOperationContext context = null;
+        if (areaOfInterest != null) {
+            if (areaOfInterest instanceof DefaultGeographicBoundingBox && ((DefaultGeographicBoundingBox) areaOfInterest).isEmpty()) {
+                throw new IllegalArgumentException(Errors.format(Errors.Keys.EmptyArgument_1, "areaOfInterest"));
+            }
+            context = new CoordinateOperationContext();
+            context.setAreaOfInterest(areaOfInterest);
+        }
+        return CoordinateOperations.factory().createOperation(sourceCRS, targetCRS, context);
+    }
+
+    /**
+     * Returns a positional accuracy estimation in metres for the given operation, or {@code NaN} if unknown.
+     * This method applies the following heuristics:
+     *
+     * <ul>
+     *   <li>If the given operation is an instance of {@link AbstractCoordinateOperation}, then delegate to the
+     *       operation {@link AbstractCoordinateOperation#getLinearAccuracy() getLinearAccuracy()} method.</li>
+     *
+     *   <li>Otherwise if at least one {@linkplain org.apache.sis.metadata.iso.quality.DefaultQuantitativeResult
+     *       quantitative result} is found with a linear unit, then return the largest value converted to metres.</li>
+     *
+     *   <li>Otherwise if the operation is a {@linkplain org.apache.sis.referencing.operation.DefaultConversion
+     *       conversion}, then returns 0 since a conversion is by definition accurate up to rounding errors.</li>
+     *
+     *   <li>Otherwise if the operation is a {@linkplain org.apache.sis.referencing.operation.DefaultTransformation
+     *       transformation}, then the returned value depends on whether the datum shift were applied with the help
+     *       of Bursa-Wolf parameters of not.</li>
+     * </ul>
+     *
+     * See {@link AbstractCoordinateOperation#getLinearAccuracy()} for more details on the above heuristic rules.
+     *
+     * @param  operation The coordinate operation for which to get the accuracy estimation, or {@code null}.
+     * @return The accuracy estimation (always in meters), or NaN if unknown.
+     *
+     * @see #findOperation(CoordinateReferenceSystem, CoordinateReferenceSystem, GeographicBoundingBox)
+     *
+     * @since 0.7
+     */
+    public static double getLinearAccuracy(final CoordinateOperation operation) {
+        if (operation == null) {
+            return Double.NaN;
+        } else if (operation instanceof AbstractCoordinateOperation) {
+            return ((AbstractCoordinateOperation) operation).getLinearAccuracy();
+        } else {
+            return PositionalAccuracyConstant.getLinearAccuracy(operation);
+        }
+    }
+
+    /**
+     * Returns the valid geographic area for the given coordinate operation, or {@code null} if unknown.
+     * This method explores the {@linkplain AbstractCoordinateOperation#getDomainOfValidity() domain of validity}
+     * associated with the given operation. If more than one geographic bounding box is found, then they will be
+     * {@linkplain org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox#add(GeographicBoundingBox) added}
+     * together.
+     *
+     * @param  operation The coordinate operation for which to get the domain of validity, or {@code null}.
+     * @return The geographic area where the operation is valid, or {@code null} if unspecified.
+     *
+     * @see #findOperation(CoordinateReferenceSystem, CoordinateReferenceSystem, GeographicBoundingBox)
+     * @see Extents#getGeographicBoundingBox(Extent)
+     *
+     * @category information
+     *
+     * @since 0.7
+     */
+    public static GeographicBoundingBox getGeographicBoundingBox(final CoordinateOperation operation) {
+        return (operation != null) ? Extents.getGeographicBoundingBox(operation.getDomainOfValidity()) : null;
+    }
+
+    /**
      * Returns the valid geographic area for the given coordinate reference system, or {@code null} if unknown.
-     * This method explores the {@linkplain CoordinateReferenceSystem#getDomainOfValidity() domain of validity}
-     * associated with the given CRS. If more than one geographic bounding box is found, then they will be
-     * {@linkplain org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox#add(GeographicBoundingBox)
-     * added} together.
+     * This method explores the {@linkplain org.apache.sis.referencing.crs.AbstractCRS#getDomainOfValidity() domain of
+     * validity} associated with the given CRS. If more than one geographic bounding box is found, then they will be
+     * {@linkplain org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox#add(GeographicBoundingBox) added}
+     * together.
      *
-     * @param  crs The coordinate reference system, or {@code null}.
-     * @return The geographic area, or {@code null} if none.
+     * @param  crs The coordinate reference system for which to get the domain of validity, or {@code null}.
+     * @return The geographic area where the coordinate reference system is valid, or {@code null} if unspecified.
      *
      * @see #getEnvelope(CoordinateReferenceSystem)
      * @see Extents#getGeographicBoundingBox(Extent)
@@ -596,43 +748,4 @@ check:  while (lower != 0 || upper != di
         }
         return AuthorityFactories.ALL.getAuthorityFactory(CRSAuthorityFactory.class, authority, null);
     }
-
-    /**
-     * Finds a mathematical operation that transforms or converts coordinates from the given source to the
-     * given target coordinate reference system. If an estimation of the geographic area containing the points
-     * to transform is known, it can be specified for helping this method to find a better suited operation.
-     *
-     * <p>Note that the area of interest is just one aspect that may affect the coordinate operation.
-     * Other aspects are the time of interest (because some coordinate operations take in account the
-     * plate tectonics movement) or the desired accuracy. For more control on the coordinate operation
-     * to create, see {@link CoordinateOperationContext}.</p>
-     *
-     * @param  sourceCRS      the CRS of source coordinates.
-     * @param  targetCRS      the CRS of target coordinates.
-     * @param  areaOfInterest the area of interest, or {@code null} if none.
-     * @return the mathematical operation from {@code sourceCRS} to {@code targetCRS}.
-     * @throws FactoryException if the operation can not be created.
-     *
-     * @see DefaultCoordinateOperationFactory#createOperation(CoordinateReferenceSystem, CoordinateReferenceSystem, CoordinateOperationContext)
-     *
-     * @since 0.7
-     */
-    public static CoordinateOperation findOperation(final CoordinateReferenceSystem sourceCRS,
-                                                    final CoordinateReferenceSystem targetCRS,
-                                                    final GeographicBoundingBox areaOfInterest)
-            throws FactoryException
-    {
-        ArgumentChecks.ensureNonNull("sourceCRS", sourceCRS);
-        ArgumentChecks.ensureNonNull("targetCRS", targetCRS);
-        CoordinateOperationContext context = null;
-        if (areaOfInterest != null) {
-            final DefaultGeographicBoundingBox bbox = DefaultGeographicBoundingBox.castOrCopy(areaOfInterest);
-            if (bbox.isEmpty()) {
-                throw new IllegalArgumentException(Errors.format(Errors.Keys.EmptyArgument_1, "areaOfInterest"));
-            }
-            context = new CoordinateOperationContext();
-            context.setGeographicBoundingBox(bbox);
-        }
-        return CoordinateOperations.factory.createOperation(sourceCRS, targetCRS, context);
-    }
 }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -97,6 +97,7 @@ import org.apache.sis.internal.jdk7.Obje
     DefaultGeodeticCRS.class,
     DefaultVerticalCRS.class,
     DefaultTemporalCRS.class,
+    DefaultParametricCRS.class,
     DefaultEngineeringCRS.class,
     DefaultImageCRS.class,
     DefaultCompoundCRS.class
@@ -159,12 +160,12 @@ public class AbstractCRS extends Abstrac
      *     <td>{@link #getRemarks()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#DOMAIN_OF_VALIDITY_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
      *     <td>{@link org.opengis.metadata.extent.Extent}</td>
      *     <td>{@link #getDomainOfValidity()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#SCOPE_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
      *     <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
      *     <td>{@link #getScope()}</td>
      *   </tr>

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -170,12 +170,12 @@ public class DefaultCompoundCRS extends
      *     <td>{@link #getRemarks()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#DOMAIN_OF_VALIDITY_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
      *     <td>{@link org.opengis.metadata.extent.Extent}</td>
      *     <td>{@link #getDomainOfValidity()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#SCOPE_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
      *     <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
      *     <td>{@link #getScope()}</td>
      *   </tr>

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -60,6 +60,10 @@ import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.Classes;
 
+// Branch-dependent imports
+import org.apache.sis.referencing.cs.DefaultParametricCS;
+import org.apache.sis.referencing.datum.DefaultParametricDatum;
+
 
 /**
  * A coordinate reference system that is defined by its coordinate {@linkplain DefaultConversion conversion}
@@ -76,6 +80,7 @@ import org.apache.sis.util.Classes;
  *   <tr><td>{@link GeodeticCRS}</td>    <td>Base CRS is also a {@code GeodeticCRS} and is associated to the same type of coordinate system.</td></tr>
  *   <tr><td>{@link VerticalCRS}</td>    <td>Base CRS is also a {@code VerticalCRS} and coordinate system is a {@code VerticalCS}.</td></tr>
  *   <tr><td>{@link TemporalCRS}</td>    <td>Base CRS is also a {@code TemporalCRS} and coordinate system is a {@code TimeCS}.</td></tr>
+ *   <tr><td>{@link ParametricCRS}</td>  <td>Base CRS is also a {@code ParametricCRS} and coordinate system is a {@code ParametricCS}.</td></tr>
  *   <tr><td>{@link EngineeringCRS}</td> <td>Base CRS is a {@code GeodeticCRS}, {@code ProjectedCRS} or {@code EngineeringCRS}.</td></tr>
  * </table>
  *
@@ -90,6 +95,7 @@ import org.apache.sis.util.Classes;
  * synchronization.
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
+ * @author  Johann Sorel (Geomatys)
  * @since   0.6
  * @version 0.7
  * @module
@@ -142,12 +148,12 @@ public class DefaultDerivedCRS extends A
      *     <td>{@link #getRemarks()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#DOMAIN_OF_VALIDITY_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
      *     <td>{@link org.opengis.metadata.extent.Extent}</td>
      *     <td>{@link #getDomainOfValidity()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#SCOPE_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
      *     <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
      *     <td>{@link #getScope()}</td>
      *   </tr>
@@ -263,7 +269,8 @@ public class DefaultDerivedCRS extends A
      * This method expects the same arguments and performs the same work than the
      * {@linkplain #DefaultDerivedCRS(Map, SingleCRS, Conversion, CoordinateSystem) above constructor},
      * except that the {@code DerivedCRS} instance returned by this method may additionally implement
-     * the {@link GeodeticCRS}, {@link VerticalCRS}, {@link TemporalCRS} or {@link EngineeringCRS} interface.
+     * the {@link GeodeticCRS}, {@link VerticalCRS}, {@link TemporalCRS}, {@link ParametricCRS} or
+     * {@link EngineeringCRS} interface.
      * See the class javadoc for more information.
      *
      * @param  properties The properties to be given to the new derived CRS object.
@@ -287,9 +294,10 @@ public class DefaultDerivedCRS extends A
         if (baseCRS != null && derivedCS != null) {
             final String type = getType(baseCRS, derivedCS);
             if (type != null) {
-                if (WKTKeywords.GeodeticCRS.equals(type)) return new Geodetic(properties, (GeodeticCRS) baseCRS, conversion,              derivedCS);
-                if (WKTKeywords.VerticalCRS.equals(type)) return new Vertical(properties, (VerticalCRS) baseCRS, conversion, (VerticalCS) derivedCS);
-                if (WKTKeywords.TimeCRS    .equals(type)) return new Temporal(properties, (TemporalCRS) baseCRS, conversion,     (TimeCS) derivedCS);
+                if (WKTKeywords.GeodeticCRS   .equals(type)) return new Geodetic  (properties, (GeodeticCRS)   baseCRS, conversion,                derivedCS);
+                if (WKTKeywords.VerticalCRS   .equals(type)) return new Vertical  (properties, (VerticalCRS)   baseCRS, conversion,   (VerticalCS) derivedCS);
+                if (WKTKeywords.TimeCRS       .equals(type)) return new Temporal  (properties, (TemporalCRS)   baseCRS, conversion,       (TimeCS) derivedCS);
+                if (WKTKeywords.ParametricCRS .equals(type)) return new Parametric(properties, (ParametricCRS) baseCRS, conversion, (DefaultParametricCS) derivedCS);
                 if (WKTKeywords.EngineeringCRS.equals(type)) {
                     /*
                      * This case may happen for baseCRS of kind GeodeticCRS, ProjectedCRS or EngineeringCRS.
@@ -314,7 +322,8 @@ public class DefaultDerivedCRS extends A
      * {@linkplain #DefaultDerivedCRS(Map, SingleCRS, CoordinateReferenceSystem, OperationMethod, MathTransform,
      * CoordinateSystem) above constructor},
      * except that the {@code DerivedCRS} instance returned by this method may additionally implement
-     * the {@link GeodeticCRS}, {@link VerticalCRS}, {@link TemporalCRS} or {@link EngineeringCRS} interface.
+     * the {@link GeodeticCRS}, {@link VerticalCRS}, {@link TemporalCRS}, {@link ParametricCRS} or
+     * {@link EngineeringCRS} interface.
      * See the class javadoc for more information.
      *
      * @param  properties       The properties to be given to the {@link DefaultConversion} object
@@ -339,9 +348,10 @@ public class DefaultDerivedCRS extends A
         if (baseCRS != null && derivedCS != null) {
             final String type = getType(baseCRS, derivedCS);
             if (type != null) {
-                if (WKTKeywords.GeodeticCRS.equals(type)) return new Geodetic(properties, (GeodeticCRS) baseCRS, interpolationCRS, method, baseToDerived,              derivedCS);
-                if (WKTKeywords.VerticalCRS.equals(type)) return new Vertical(properties, (VerticalCRS) baseCRS, interpolationCRS, method, baseToDerived, (VerticalCS) derivedCS);
-                if (WKTKeywords.TimeCRS    .equals(type)) return new Temporal(properties, (TemporalCRS) baseCRS, interpolationCRS, method, baseToDerived,     (TimeCS) derivedCS);
+                if (WKTKeywords.GeodeticCRS   .equals(type)) return new Geodetic  (properties, (GeodeticCRS)   baseCRS, interpolationCRS, method, baseToDerived,                derivedCS);
+                if (WKTKeywords.VerticalCRS   .equals(type)) return new Vertical  (properties, (VerticalCRS)   baseCRS, interpolationCRS, method, baseToDerived,   (VerticalCS) derivedCS);
+                if (WKTKeywords.TimeCRS       .equals(type)) return new Temporal  (properties, (TemporalCRS)   baseCRS, interpolationCRS, method, baseToDerived,       (TimeCS) derivedCS);
+                if (WKTKeywords.ParametricCRS .equals(type)) return new Parametric(properties, (ParametricCRS) baseCRS, interpolationCRS, method, baseToDerived, (DefaultParametricCS) derivedCS);
                 if (WKTKeywords.EngineeringCRS.equals(type)) {
                     if (baseCRS instanceof EngineeringCRS) {
                         // See the comment in create(Map, SingleCRS, Conversion, CoordinateSystem)
@@ -372,6 +382,7 @@ public class DefaultDerivedCRS extends A
                 if (WKTKeywords.GeodeticCRS   .equals(type)) return new Geodetic   (object);
                 if (WKTKeywords.VerticalCRS   .equals(type)) return new Vertical   (object);
                 if (WKTKeywords.TimeCRS       .equals(type)) return new Temporal   (object);
+                if (WKTKeywords.ParametricCRS .equals(type)) return new Parametric (object);
                 if (WKTKeywords.EngineeringCRS.equals(type)) return new Engineering(object);
             }
             return new DefaultDerivedCRS(object);
@@ -619,6 +630,8 @@ public class DefaultDerivedCRS extends A
             return WKTKeywords.VerticalCRS;
         } else if (TemporalCRS.class.isAssignableFrom(type) && derivedCS instanceof TimeCS) {
             return WKTKeywords.TimeCRS;
+        } else if (ParametricCRS.class.isAssignableFrom(type) && derivedCS instanceof DefaultParametricCS) {
+            return WKTKeywords.ParametricCRS;
         } else if (ProjectedCRS.class.isAssignableFrom(type) || EngineeringCRS.class.isAssignableFrom(type)) {
             return WKTKeywords.EngineeringCRS;
         } else {
@@ -786,6 +799,59 @@ public class DefaultDerivedCRS extends A
     }
 
     /**
+     * A derived parametric CRS.
+     */
+    @XmlTransient
+    private static final class Parametric extends DefaultDerivedCRS implements ParametricCRS {
+        /** For cross-version compatibility. */
+        private static final long serialVersionUID = 2344979923957294024L;
+
+        /** Creates a copy of the given CRS. */
+        Parametric(DerivedCRS other) {
+            super(other);
+        }
+
+        /** Creates a new parametric CRS from the given properties. */
+        Parametric(Map<String,?> properties, ParametricCRS baseCRS, Conversion conversion, DefaultParametricCS derivedCS) {
+            super(properties, baseCRS, conversion, derivedCS);
+        }
+
+        /** Creates a new parametric CRS from the given properties. */
+        Parametric(Map<String,?> properties, ParametricCRS baseCRS, CoordinateReferenceSystem interpolationCRS,
+                OperationMethod method, MathTransform baseToDerived, DefaultParametricCS derivedCS)
+        {
+            super(properties, baseCRS, interpolationCRS, method, baseToDerived, derivedCS);
+        }
+
+        /** Returns the datum of the base parametric CRS. */
+        @Override public DefaultParametricDatum getDatum() {
+            return (DefaultParametricDatum) super.getDatum();
+        }
+
+        /** Returns the coordinate system given at construction time. */
+        @Override public DefaultParametricCS getCoordinateSystem() {
+            return (DefaultParametricCS) super.getCoordinateSystem();
+        }
+
+        /** Returns a coordinate reference system of the same type than this CRS but with different axes. */
+        @Override AbstractCRS createSameType(final Map<String,?> properties, final CoordinateSystem derivedCS) {
+            final Conversion conversionFromBase = getConversionFromBase();
+            return new Parametric(properties, (ParametricCRS) conversionFromBase.getSourceCRS(),
+                    conversionFromBase, (DefaultParametricCS) derivedCS);
+        }
+
+        /** Returns the WKT keyword for this derived CRS type. */
+        @Override String keyword(final Formatter formatter) {
+            return WKTKeywords.ParametricCRS;
+        }
+
+        /** Returns the GML code for this derived CRS type. */
+        @Override SC_DerivedCRSType getType() {
+            return new SC_DerivedCRSType("parametric");
+        }
+    }
+
+    /**
      * An derived engineering CRS. ISO 19162 restricts the base CRS to {@code EngineeringCRS}, {@code ProjectedCRS}
      * or {@code GeodeticCRS}. Note that in the later case, an ambiguity may exist with the
      * {@link org.apache.sis.referencing.crs.DefaultDerivedCRS.Geodetic} when deciding which {@code DerivedCRS} to
@@ -837,7 +903,6 @@ public class DefaultDerivedCRS extends A
 
 
 
-
     //////////////////////////////////////////////////////////////////////////////////////////////////
     ////////                                                                                  ////////
     ////////                               XML support with JAXB                              ////////

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -42,7 +42,9 @@ import static org.apache.sis.util.Argume
  *   <li>CRSs on moving platforms such as road vehicles, vessels, aircraft, or spacecraft.</li>
  * </ul>
  *
- * <p><b>Used with coordinate system types:</b>
+ * <p><b>Used with datum type:</b>
+ *   {@linkplain org.apache.sis.referencing.datum.DefaultEngineeringDatum Engineering}.<br>
+ * <b>Used with coordinate system types:</b>
  *   {@linkplain org.apache.sis.referencing.cs.DefaultAffineCS Affine},
  *   {@linkplain org.apache.sis.referencing.cs.DefaultCartesianCS Cartesian},
  *   {@linkplain org.apache.sis.referencing.cs.DefaultCylindricalCS Cylindrical},
@@ -120,12 +122,12 @@ public class DefaultEngineeringCRS exten
      *     <td>{@link #getRemarks()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#DOMAIN_OF_VALIDITY_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
      *     <td>{@link org.opengis.metadata.extent.Extent}</td>
      *     <td>{@link #getDomainOfValidity()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#SCOPE_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
      *     <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
      *     <td>{@link #getScope()}</td>
      *   </tr>

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -33,7 +33,9 @@ import org.apache.sis.referencing.Abstra
  * A geocentric CRS deals with the earth's curvature by taking a 3-dimensional spatial view, which obviates
  * the need to model the earth's curvature.
  *
- * <p><b>Used with coordinate system type:</b>
+ * <p><b>Used with datum type:</b>
+ *   {@linkplain org.apache.sis.referencing.datum.DefaultGeodeticDatum Geodetic}.<br>
+ * <b>Used with coordinate system types:</b>
  *   {@linkplain org.apache.sis.referencing.cs.DefaultCartesianCS Cartesian} or
  *   {@linkplain org.apache.sis.referencing.cs.DefaultSphericalCS Spherical}.
  * </p>
@@ -125,12 +127,12 @@ public class DefaultGeocentricCRS extend
      *     <td>{@link #getRemarks()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#DOMAIN_OF_VALIDITY_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
      *     <td>{@link org.opengis.metadata.extent.Extent}</td>
      *     <td>{@link #getDomainOfValidity()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#SCOPE_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
      *     <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
      *     <td>{@link #getScope()}</td>
      *   </tr>

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -51,7 +51,9 @@ import static org.apache.sis.util.Argume
  * The CRS is geographic if associated with an ellipsoidal coordinate system,
  * or geocentric if associated with a spherical or Cartesian coordinate system.
  *
- * <p><b>Used with coordinate system types:</b>
+ * <p><b>Used with datum type:</b>
+ *   {@linkplain org.apache.sis.referencing.datum.DefaultGeodeticDatum Geodetic}.<br>
+ * <b>Used with coordinate system types:</b>
  *   {@linkplain org.apache.sis.referencing.cs.DefaultCartesianCS Cartesian},
  *   {@linkplain org.apache.sis.referencing.cs.DefaultSphericalCS Spherical} or
  *   {@linkplain org.apache.sis.referencing.cs.DefaultEllipsoidalCS Ellipsoidal}.

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -47,7 +47,9 @@ import static org.apache.sis.internal.ut
  * This provides an accurate representation of the geometry of geographic features
  * for a large portion of the earth's surface.
  *
- * <p><b>Used with coordinate system type:</b>
+ * <p><b>Used with datum type:</b>
+ *   {@linkplain org.apache.sis.referencing.datum.DefaultGeodeticDatum Geodetic}.<br>
+ * <b>Used with coordinate system type:</b>
  *   {@linkplain org.apache.sis.referencing.cs.DefaultEllipsoidalCS Ellipsoidal}.
  * </p>
  *
@@ -139,12 +141,12 @@ public class DefaultGeographicCRS extend
      *     <td>{@link #getRemarks()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#DOMAIN_OF_VALIDITY_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
      *     <td>{@link org.opengis.metadata.extent.Extent}</td>
      *     <td>{@link #getDomainOfValidity()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#SCOPE_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
      *     <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
      *     <td>{@link #getScope()}</td>
      *   </tr>

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -39,7 +39,9 @@ import static org.apache.sis.util.Argume
  * Image coordinate reference systems are treated as a separate sub-type because a separate
  * user community exists for images with its own terms of reference.
  *
- * <p><b>Used with coordinate system types:</b>
+ * <p><b>Used with datum type:</b>
+ *   {@linkplain org.apache.sis.referencing.datum.DefaultImageDatum Image}.<br>
+ * <b>Used with coordinate system types:</b>
  *   {@linkplain org.apache.sis.referencing.cs.DefaultCartesianCS Cartesian} or
  *   {@linkplain org.apache.sis.referencing.cs.DefaultAffineCS Affine}.
  * </p>
@@ -113,12 +115,12 @@ public class DefaultImageCRS extends Abs
      *     <td>{@link #getRemarks()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#DOMAIN_OF_VALIDITY_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
      *     <td>{@link org.opengis.metadata.extent.Extent}</td>
      *     <td>{@link #getDomainOfValidity()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#SCOPE_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
      *     <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
      *     <td>{@link #getScope()}</td>
      *   </tr>

Copied: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultParametricCRS.java (from r1740152, sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultParametricCRS.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultParametricCRS.java?p2=sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultParametricCRS.java&p1=sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultParametricCRS.java&r1=1740152&r2=1740177&rev=1740177&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultParametricCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultParametricCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -20,10 +20,7 @@ import java.util.Map;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
-import org.opengis.referencing.crs.ParametricCRS;
 import org.opengis.referencing.cs.CoordinateSystem;
-import org.opengis.referencing.cs.ParametricCS;
-import org.opengis.referencing.datum.ParametricDatum;
 import org.apache.sis.internal.metadata.MetadataUtilities;
 import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.referencing.cs.AxesConvention;
@@ -32,6 +29,10 @@ import org.apache.sis.io.wkt.Formatter;
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 import static org.apache.sis.referencing.crs.AbstractCRS.isBaseCRS;
 
+// Branch-dependent imports
+import org.apache.sis.referencing.cs.DefaultParametricCS;
+import org.apache.sis.referencing.datum.DefaultParametricDatum;
+
 
 /**
  * A 1-dimensional coordinate reference system which uses parameter values or functions.
@@ -77,7 +78,7 @@ public class DefaultParametricCRS extend
      *
      * @see #getDatum()
      */
-    private ParametricDatum datum;
+    private DefaultParametricDatum datum;
 
     /**
      * Creates a coordinate reference system from the given properties, datum and coordinate system.
@@ -124,15 +125,17 @@ public class DefaultParametricCRS extend
      *   </tr>
      * </table>
      *
+     * <div class="warning"><b>Warning:</b> in a future SIS version, the parameter types may be changed to
+     * {@code org.opengis.referencing.datum.ParametricDatum} and {@code org.opengis.referencing.cs.ParametricCS}
+     * Those change are pending GeoAPI revision.</div>
+     *
      * @param properties The properties to be given to the coordinate reference system.
      * @param datum The datum.
      * @param cs The coordinate system.
-     *
-     * @see org.apache.sis.referencing.factory.GeodeticObjectFactory#createParametricCRS(Map, ParametricDatum, ParametricCS)
      */
     public DefaultParametricCRS(final Map<String,?> properties,
-                                final ParametricDatum datum,
-                                final ParametricCS    cs)
+                                final DefaultParametricDatum datum,
+                                final DefaultParametricCS cs)
     {
         super(properties, cs);
         ensureNonNull("datum", datum);
@@ -146,54 +149,24 @@ public class DefaultParametricCRS extend
      *
      * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
      *
-     * @param crs The coordinate reference system to copy.
+     * <div class="warning"><b>Warning:</b> in a future SIS version, the parameter type may be changed
+     * to {@code org.opengis.referencing.crs.ParametricCRS}. This change is pending GeoAPI revision.</div>
      *
-     * @see #castOrCopy(ParametricCRS)
+     * @param crs The coordinate reference system to copy.
      */
-    protected DefaultParametricCRS(final ParametricCRS crs) {
+    protected DefaultParametricCRS(final DefaultParametricCRS crs) {
         super(crs);
         datum = crs.getDatum();
     }
 
     /**
-     * Returns a SIS coordinate reference system implementation with the same values than the given
-     * arbitrary implementation. If the given object is {@code null}, then this method returns {@code null}.
-     * Otherwise if the given object is already a SIS implementation, then the given object is returned unchanged.
-     * Otherwise a new SIS implementation is created and initialized to the attribute values of the given object.
-     *
-     * @param  object The object to get as a SIS implementation, or {@code null} if none.
-     * @return A SIS implementation containing the values of the given object (may be the
-     *         given object itself), or {@code null} if the argument was null.
-     */
-    public static DefaultParametricCRS castOrCopy(final ParametricCRS object) {
-        return (object == null || object instanceof DefaultParametricCRS)
-                ? (DefaultParametricCRS) object : new DefaultParametricCRS(object);
-    }
-
-    /**
-     * Returns the GeoAPI interface implemented by this class.
-     * The SIS implementation returns {@code ParametricCRS.class}.
-     *
-     * <div class="note"><b>Note for implementors:</b>
-     * Subclasses usually do not need to override this method since GeoAPI does not define {@code ParametricCRS}
-     * sub-interface. Overriding possibility is left mostly for implementors who wish to extend GeoAPI with their
-     * own set of interfaces.</div>
-     *
-     * @return {@code ParametricCRS.class} or a user-defined sub-interface.
-     */
-    @Override
-    public Class<? extends ParametricCRS> getInterface() {
-        return ParametricCRS.class;
-    }
-
-    /**
      * Returns the datum.
      *
      * @return The datum.
      */
     @Override
     @XmlElement(name = "parametricDatum", required = true)
-    public ParametricDatum getDatum() {
+    public DefaultParametricDatum getDatum() {
         return datum;
     }
 
@@ -204,8 +177,8 @@ public class DefaultParametricCRS extend
      */
     @Override
     @XmlElement(name = "parametricCS", required = true)
-    public ParametricCS getCoordinateSystem() {
-        return (ParametricCS) super.getCoordinateSystem();
+    public DefaultParametricCS getCoordinateSystem() {
+        return (DefaultParametricCS) super.getCoordinateSystem();
     }
 
     /**
@@ -223,7 +196,7 @@ public class DefaultParametricCRS extend
      */
     @Override
     final AbstractCRS createSameType(final Map<String,?> properties, final CoordinateSystem cs) {
-        return new DefaultParametricCRS(properties, datum, (ParametricCS) cs);
+        return new DefaultParametricCRS(properties, datum, (DefaultParametricCS) cs);
     }
 
     /**
@@ -278,7 +251,7 @@ public class DefaultParametricCRS extend
      *
      * @see #getDatum()
      */
-    private void setDatum(final ParametricDatum value) {
+    private void setDatum(final DefaultParametricDatum value) {
         if (datum == null) {
             datum = value;
         } else {
@@ -291,7 +264,7 @@ public class DefaultParametricCRS extend
      *
      * @see #getCoordinateSystem()
      */
-    private void setCoordinateSystem(final ParametricCS cs) {
+    private void setCoordinateSystem(final DefaultParametricCS cs) {
         setCoordinateSystem("parametricCS", cs);
     }
 }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -59,7 +59,9 @@ import static org.apache.sis.internal.re
  * Distortion correction is commonly applied to calculated bearings and distances to produce values
  * that are a close match to actual field values.
  *
- * <p><b>Used with coordinate system type:</b>
+ * <p><b>Used with datum type:</b>
+ *   {@linkplain org.apache.sis.referencing.datum.DefaultGeodeticDatum Geodetic}.<br>
+ * <b>Used with coordinate system type:</b>
  *   {@linkplain org.apache.sis.referencing.cs.DefaultCartesianCS Cartesian}.
  * </p>
  *
@@ -120,12 +122,12 @@ public class DefaultProjectedCRS extends
      *     <td>{@link #getRemarks()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#DOMAIN_OF_VALIDITY_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
      *     <td>{@link org.opengis.metadata.extent.Extent}</td>
      *     <td>{@link #getDomainOfValidity()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#SCOPE_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
      *     <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
      *     <td>{@link #getScope()}</td>
      *   </tr>

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -46,7 +46,9 @@ import static org.apache.sis.util.Argume
  *   <li>{@link #toValue(Date)} for converting a {@link Date} to a temporal position.</li>
  * </ul>
  *
- * <p><b>Used with coordinate system type:</b>
+ * <p><b>Used with datum type:</b>
+ *   {@linkplain org.apache.sis.referencing.datum.DefaultTemporalDatum Temporal}.<br>
+ * <b>Used with coordinate system type:</b>
  *   {@linkplain org.apache.sis.referencing.cs.DefaultTimeCS Time}.
  * </p>
  *
@@ -132,12 +134,12 @@ public class DefaultTemporalCRS extends
      *     <td>{@link #getRemarks()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#DOMAIN_OF_VALIDITY_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
      *     <td>{@link org.opengis.metadata.extent.Extent}</td>
      *     <td>{@link #getDomainOfValidity()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#SCOPE_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
      *     <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
      *     <td>{@link #getScope()}</td>
      *   </tr>

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultVerticalCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultVerticalCRS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultVerticalCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultVerticalCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -38,7 +38,9 @@ import static org.apache.sis.util.Argume
  * Vertical CRSs make use of the direction of gravity to define the concept of height or depth,
  * but the relationship with gravity may not be straightforward.
  *
- * <p><b>Used with coordinate system type:</b>
+ * <p><b>Used with datum type:</b>
+ *   {@linkplain org.apache.sis.referencing.datum.DefaultVerticalDatum Vertical}.<br>
+ * <b>Used with coordinate system type:</b>
  *   {@linkplain org.apache.sis.referencing.cs.DefaultVerticalCS Vertical}.
  * </p>
  *
@@ -111,12 +113,12 @@ public class DefaultVerticalCRS extends
      *     <td>{@link #getRemarks()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#DOMAIN_OF_VALIDITY_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
      *     <td>{@link org.opengis.metadata.extent.Extent}</td>
      *     <td>{@link #getDomainOfValidity()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.datum.Datum#SCOPE_KEY}</td>
+     *     <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
      *     <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
      *     <td>{@link #getScope()}</td>
      *   </tr>

Added: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/ParametricCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/ParametricCRS.java?rev=1740177&view=auto
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/ParametricCRS.java (added)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/ParametricCRS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -0,0 +1,31 @@
+/*
+ * 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.crs;
+
+import org.opengis.referencing.crs.SingleCRS;
+
+
+/**
+ * Place-holder for an interface not yet present in GeoAPI 3.0.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.7
+ * @version 0.7
+ * @module
+ */
+interface ParametricCRS extends SingleCRS {
+}

Propchange: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/ParametricCRS.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/ParametricCRS.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/package-info.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/package-info.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -100,6 +100,7 @@
     @XmlJavaTypeAdapter(CD_GeodeticDatum.class),
     @XmlJavaTypeAdapter(CD_EngineeringDatum.class),
     @XmlJavaTypeAdapter(CD_ImageDatum.class),
+    @XmlJavaTypeAdapter(CD_ParametricDatum.class),
     @XmlJavaTypeAdapter(CD_TemporalDatum.class),
     @XmlJavaTypeAdapter(CD_VerticalDatum.class),
     @XmlJavaTypeAdapter(CS_CartesianCS.class),      // Must be before CS_AffineCS.
@@ -107,6 +108,7 @@
     @XmlJavaTypeAdapter(CS_CylindricalCS.class),
     @XmlJavaTypeAdapter(CS_EllipsoidalCS.class),
     @XmlJavaTypeAdapter(CS_LinearCS.class),
+    @XmlJavaTypeAdapter(CS_ParametricCS.class),
     @XmlJavaTypeAdapter(CS_PolarCS.class),
     @XmlJavaTypeAdapter(CS_SphericalCS.class),
     @XmlJavaTypeAdapter(CS_TimeCS.class),

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java?rev=1740177&r1=1740176&r2=1740177&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java [UTF-8] Wed Apr 20 17:40:11 2016
@@ -84,6 +84,7 @@ import static org.apache.sis.util.Utilit
     DefaultLinearCS.class,
     DefaultVerticalCS.class,
     DefaultTimeCS.class,
+    DefaultParametricCS.class,
     DefaultUserDefinedCS.class
 })
 public class AbstractCS extends AbstractIdentifiedObject implements CoordinateSystem {



Mime
View raw message