sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1790582 - in /sis/branches/JDK8/core/sis-referencing/src: main/java/org/apache/sis/internal/referencing/provider/ test/java/org/apache/sis/internal/referencing/provider/
Date Fri, 07 Apr 2017 16:37:35 GMT
Author: desruisseaux
Date: Fri Apr  7 16:37:34 2017
New Revision: 1790582

URL: http://svn.apache.org/viewvc?rev=1790582&view=rev
Log:
Use cases on "Geographic2D with Height Offsets" show that this operation method needs to allow
the 'redimension(…)' method.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicAndVerticalOffsets.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicAndVerticalOffsets.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicAndVerticalOffsets.java?rev=1790582&r1=1790581&r2=1790582&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicAndVerticalOffsets.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicAndVerticalOffsets.java
[UTF-8] Fri Apr  7 16:37:34 2017
@@ -30,6 +30,13 @@ import org.apache.sis.measure.Units;
  * to geoidal height, as can been seen from the difference in parameter name.
  * For a "Geographic3D offsets" with ellipsoidal heights, see the parent class.
  *
+ * <p>Examples of coordinate transformations using this method:</p>
+ * <ul>
+ *   <li>EPSG:1335  from 2D to 2D geographic CRS.</li>
+ *   <li>EPSG:1336  from 3D to 2D geographic CRS.</li>
+ *   <li>EPSG:15596 from 3D to 3D geographic CRS.</li>
+ * </ul>
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
  * @since   0.8
@@ -63,7 +70,18 @@ public final class GeographicAndVertical
      * Constructs a provider with default parameters.
      */
     public GeographicAndVerticalOffsets() {
-        super(3, 3, PARAMETERS, null);
+        this(3, 3, new GeographicAndVerticalOffsets[4]);
+        redimensioned[0] = new GeographicAndVerticalOffsets(2, 2, redimensioned);
+        redimensioned[1] = new GeographicAndVerticalOffsets(2, 3, redimensioned);
+        redimensioned[2] = new GeographicAndVerticalOffsets(3, 2, redimensioned);
+        redimensioned[3] = this;
+    }
+
+    /**
+     * For default constructor only.
+     */
+    private GeographicAndVerticalOffsets(int sourceDimensions, int targetDimensions, GeodeticOperation[]
redimensioned) {
+        super(sourceDimensions, targetDimensions, PARAMETERS, redimensioned);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets.java?rev=1790582&r1=1790581&r2=1790582&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets.java
[UTF-8] Fri Apr  7 16:37:34 2017
@@ -87,7 +87,7 @@ public class GeographicOffsets extends G
     }
 
     /**
-     * For subclasses constructor only.
+     * For default constructors in this class and subclasses.
      */
     GeographicOffsets(int sourceDimensions, int targetDimensions,
             ParameterDescriptorGroup parameters, GeodeticOperation[] redimensioned)

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java?rev=1790582&r1=1790581&r2=1790582&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
[UTF-8] Fri Apr  7 16:37:34 2017
@@ -117,6 +117,7 @@ public final strictfp class ProvidersTes
             LongitudeRotation.class,
             GeographicOffsets.class,
             GeographicOffsets2D.class,
+            GeographicAndVerticalOffsets.class,
             CoordinateFrameRotation2D.class,
             CoordinateFrameRotation3D.class,
             PositionVector7Param2D.class,



Mime
View raw message