sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1735003 - in /sis/branches/JDK8/core/sis-referencing/src: main/java/org/apache/sis/referencing/ main/java/org/apache/sis/referencing/datum/ main/java/org/apache/sis/referencing/operation/ main/java/org/apache/sis/referencing/operation/matr...
Date Mon, 14 Mar 2016 23:35:16 GMT
Author: desruisseaux
Date: Mon Mar 14 23:35:16 2016
New Revision: 1735003

URL: http://svn.apache.org/viewvc?rev=1735003&view=rev
Log:
Add support for conversion between three-dimensional Cartesian and spherical coordinate system.
The design is similar to EllipsoidToCentricTransform regarding the way to concatenate affine transforms.
We need those conversions for completing CoordinateOperationInference.createOperationStep between GeocentricCRS.

Added:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NonStandardCRS.java   (with props)
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToSpherical.java   (with props)
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java   (with props)
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SphericalToCartesian.java   (with props)
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToSphericalTest.java   (with props)
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/SphericalToCartesianTest.java   (with props)
Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationInference.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransform.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedTransform.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MolodenskyTransform.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -149,6 +149,10 @@ public final class CRS extends Static {
             throws NoSuchAuthorityCodeException, FactoryException
     {
         ArgumentChecks.ensureNonNull("code", code);
+        if (code.startsWith(NonStandardCRS.PREFIX)) {       // Internal to SIS.
+            final CoordinateReferenceSystem crs = NonStandardCRS.forCode(code);
+            if (crs != null) return crs;
+        }
         try {
             return AuthorityFactories.ALL.createCoordinateReferenceSystem(code);
         } catch (UnavailableFactoryException e) {

Added: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NonStandardCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NonStandardCRS.java?rev=1735003&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NonStandardCRS.java (added)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NonStandardCRS.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -0,0 +1,103 @@
+/*
+ * 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;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
+import org.opengis.referencing.crs.CRSAuthorityFactory;
+import org.opengis.referencing.crs.CRSFactory;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.referencing.cs.CSAuthorityFactory;
+import org.opengis.referencing.cs.CoordinateSystem;
+import org.opengis.referencing.cs.SphericalCS;
+import org.opengis.util.FactoryException;
+import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.internal.util.Constants;
+
+
+/**
+ * Provides non-standard coordinate reference systems for the needs of SIS.
+ * Those CRS are defined in the "SIS" namespace. Those CRS may be removed in any future version
+ * if the EPSG database provides an equivalent CRS.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.7
+ * @version 0.7
+ * @module
+ */
+final class NonStandardCRS {
+    /**
+     * The prefix for non-standard codes.
+     */
+    static final String PREFIX = Constants.SIS + ':';
+
+    /**
+     * The CRS created so far.
+     */
+    private static final Map<Integer,CoordinateReferenceSystem> CACHE = new HashMap<>();
+
+    /**
+     * Do not allow instantiation of this class.
+     */
+    private NonStandardCRS() {
+    }
+
+    /**
+     * Returns a coordinate system for the given code, or {@code null} if none.
+     * Codes recognized here are:
+     *
+     * <ul>
+     *   <li>{@code "SIS:6404"} — a geocentric CRS using the EPSG:6404 spherical coordinate system.</li>
+     * </ul>
+     */
+    static synchronized CoordinateReferenceSystem forCode(final String code) throws FactoryException {
+        final Integer key;
+        try {
+            key = Integer.valueOf(code.substring(PREFIX.length()));
+        } catch (NumberFormatException e) {
+            return null;
+        }
+        CoordinateReferenceSystem crs = CACHE.get(key);
+        if (crs == null) {
+            switch (key) {
+                case 6404: {
+                    crs = DefaultFactories.forBuildin(CRSFactory.class).createGeocentricCRS(
+                            Collections.singletonMap(CoordinateReferenceSystem.NAME_KEY, "Spherical"),
+                            CommonCRS.SPHERE.datum(), (SphericalCS) getCoordinateSystem((short) 6404));
+                    break;
+                }
+                default: return null;
+                // More may be added in the future.
+            }
+            CACHE.put(key, crs);
+        }
+        return crs;
+    }
+
+    /**
+     * Returns the coordinate system for the given EPSG code.
+     */
+    private static CoordinateSystem getCoordinateSystem(final short code) throws FactoryException {
+        final CRSAuthorityFactory factory = CRS.getAuthorityFactory(Constants.EPSG);
+        if (factory instanceof CSAuthorityFactory) {
+            return ((CSAuthorityFactory) factory).createCoordinateSystem(String.valueOf(code));
+        } else {
+            return StandardDefinitions.createCoordinateSystem(code);
+        }
+    }
+}

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

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

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -51,6 +51,7 @@ import org.apache.sis.referencing.datum.
 import org.apache.sis.referencing.datum.DefaultVerticalDatum;
 import org.apache.sis.referencing.cs.DefaultVerticalCS;
 import org.apache.sis.referencing.cs.DefaultCartesianCS;
+import org.apache.sis.referencing.cs.DefaultSphericalCS;
 import org.apache.sis.referencing.cs.DefaultEllipsoidalCS;
 import org.apache.sis.referencing.cs.DefaultCoordinateSystemAxis;
 import org.apache.sis.referencing.crs.DefaultGeographicCRS;
@@ -311,12 +312,14 @@ final class StandardDefinitions {
     @SuppressWarnings("fallthrough")
     static CoordinateSystem createCoordinateSystem(final short code) {
         final String name;
-        final int dim;  // Number of dimension.
-        short axisCode; // Code of first axis + dim (or code after the last axis).
+        final int dim;                  // Number of dimension.
+        short axisCode;                 // Code of first axis + dim (or code after the last axis).
         boolean isCartesian = false;
+        boolean isSpherical = false;
         switch (code) {
             case 6422: name = "Ellipsoidal 2D"; dim = 2; axisCode = 108; break;
             case 6423: name = "Ellipsoidal 3D"; dim = 3; axisCode = 111; break;
+            case 6404: name = "Spherical 3D";   dim = 3; axisCode =  63; isSpherical = true; break;
             case 6500: name = "Earth centred";  dim = 3; axisCode = 118; isCartesian = true; break;
             case 4400: name = "Cartesian 2D";   dim = 2; axisCode =   3; isCartesian = true; break;
             default:   throw new AssertionError(code);
@@ -336,6 +339,8 @@ final class StandardDefinitions {
             } else {
                 return new DefaultCartesianCS(properties, xAxis, yAxis);
             }
+        } else if (isSpherical) {
+            return new DefaultSphericalCS(properties, xAxis, yAxis, zAxis);
         } else {
             if (zAxis != null) {
                 return new DefaultEllipsoidalCS(properties, xAxis, yAxis, zAxis);
@@ -369,6 +374,28 @@ final class StandardDefinitions {
                        unit = SI.METRE;
                        dir  = AxisDirection.NORTH;
                        break;
+            case 60:   name = "Spherical latitude";
+                       abrv = "φ′";
+                       unit = NonSI.DEGREE_ANGLE;
+                       dir  = AxisDirection.NORTH;
+                       min  = Latitude.MIN_VALUE;
+                       max  = Latitude.MAX_VALUE;
+                       rm   = RangeMeaning.EXACT;
+                       break;
+            case 61:   name = "Spherical longitude";
+                       abrv = "θ";
+                       unit = NonSI.DEGREE_ANGLE;
+                       dir  = AxisDirection.EAST;
+                       min  = Longitude.MIN_VALUE;
+                       max  = Longitude.MAX_VALUE;
+                       rm   = RangeMeaning.WRAPAROUND;
+                       break;
+            case 62:   name = "Geocentric radius";
+                       abrv = "r";
+                       unit = SI.METRE;
+                       dir  = AxisDirection.UP;
+                       min  = 0;
+                       break;
             case 108:  // Used in Ellipsoidal 3D.
             case 106:  name = AxisNames.GEODETIC_LATITUDE;
                        abrv = "φ";

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -530,7 +530,7 @@ public class DefaultGeodeticDatum extend
     @Override
     public boolean equals(final Object object, final ComparisonMode mode) {
         if (object == this) {
-            return true; // Slight optimization.
+            return true;                                // Slight optimization.
         }
         if (!super.equals(object, mode)) {
             return false;
@@ -547,14 +547,10 @@ public class DefaultGeodeticDatum extend
                 return deepEquals(getEllipsoid(),     that.getEllipsoid(),     mode) &&
                        deepEquals(getPrimeMeridian(), that.getPrimeMeridian(), mode);
                 /*
-                 * HACK: We do not consider Bursa-Wolf parameters as a non-metadata field.
-                 *       This is needed in order to get equalsIgnoreMetadata(...) to returns
-                 *       'true' when comparing the WGS84 constant in this class with a WKT
-                 *       DATUM element with a TOWGS84[0,0,0,0,0,0,0] element. Furthermore,
-                 *       the Bursa-Wolf parameters are not part of ISO 19111 specification.
-                 *       We don't want two CRS to be considered as different because one has
-                 *       more of those transformation informations (which is nice, but doesn't
-                 *       change the CRS itself).
+                 * Bursa-Wolf parameters are considered ignorable metadata. This is needed in order to get
+                 * equalsIgnoreMetadata(…) to return true when comparing WGS84 datums with and without the
+                 * WKT 1 "TOWGS84[0,0,0,0,0,0,0]" element. Furthermore those Bursa-Wolf parameters are not
+                 * part of ISO 19111 specification.
                  */
             }
         }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationInference.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationInference.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationInference.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationInference.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -43,12 +43,15 @@ import org.apache.sis.measure.Units;
 import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.metadata.iso.extent.Extents;
 import org.apache.sis.parameter.Parameterized;
+import org.apache.sis.referencing.CommonCRS;
 import org.apache.sis.referencing.CRS;
 import org.apache.sis.referencing.IdentifiedObjects;
 import org.apache.sis.referencing.NamedIdentifier;
 import org.apache.sis.referencing.cs.CoordinateSystems;
 import org.apache.sis.referencing.datum.BursaWolfParameters;
+import org.apache.sis.referencing.datum.DefaultGeodeticDatum;
 import org.apache.sis.referencing.operation.matrix.Matrices;
+import org.apache.sis.referencing.operation.matrix.MatrixSIS;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Classes;
@@ -269,7 +272,7 @@ public class CoordinateOperationInferenc
         if (sourceCRS instanceof GeocentricCRS) {
             final GeocentricCRS source = (GeocentricCRS) sourceCRS;
             if (targetCRS instanceof GeocentricCRS) {
-//              return createOperationStep(source, (GeocentricCRS) targetCRS);
+                return createOperationStep(source, (GeocentricCRS) targetCRS);
             }
             if (targetCRS instanceof GeographicCRS) {
 //              return createOperationStep(source, (GeographicCRS) targetCRS);
@@ -301,6 +304,70 @@ public class CoordinateOperationInferenc
     }
 
     /**
+     * Creates an operation between two geocentric coordinate reference systems.
+     * The default implementation can adjust for axis order, orientation and units of measurement.
+     * If the datums are not the equal but {@linkplain DefaultGeodeticDatum#getBursaWolfParameters()
+     * Bursa-Wolf parameters exists} between the two datum in the area of interest, then this method
+     * will also perform a datum shift.
+     *
+     * @param  sourceCRS  input coordinate reference system.
+     * @param  targetCRS  output coordinate reference system.
+     * @return a coordinate operation from {@code sourceCRS} to {@code targetCRS}.
+     * @throws FactoryException if the operation can not be constructed.
+     *
+     * @todo Rotation of prime meridian not yet implemented.
+     * @todo Conversion between Cartesian and spherical CS not yet implemented.
+     */
+    protected CoordinateOperation createOperationStep(final GeocentricCRS sourceCRS,
+                                                      final GeocentricCRS targetCRS)
+            throws FactoryException
+    {
+        final GeodeticDatum sourceDatum = sourceCRS.getDatum();
+        final GeodeticDatum targetDatum = targetCRS.getDatum();
+        final CoordinateSystem sourceCS = sourceCRS.getCoordinateSystem();
+        final CoordinateSystem targetCS = targetCRS.getCoordinateSystem();
+        if (Utilities.equalsIgnoreMetadata(sourceDatum, targetDatum)) {
+            /*
+             * If both CRS use the same datum and the same prime meridian, then the coordinate operation is just
+             * an axis swapping and unit conversion except if the coordinate systems are not of the same kind.
+             */
+            final Matrix matrix = swapAndScaleAxes(sourceCS, targetCS);
+            return createFromAffineTransform(AXIS_CHANGES, sourceCRS, targetCRS, matrix);
+        }
+        if (!isGreenwichLongitudeEquals(sourceDatum.getPrimeMeridian(), targetDatum.getPrimeMeridian())) {
+            throw new OperationNotFoundException("Rotation of prime meridian not yet implemented");
+        }
+        /*
+         * Transform between differents ellipsoids using Bursa Wolf parameters.
+         * The Bursa Wolf parameters are used with "standard" geocentric CS, i.e.
+         * with x axis towards the prime meridian, y axis towards East and z axis
+         * toward North. The following steps are applied:
+         *
+         *     source CRS                      →
+         *     standard CRS with source datum  →
+         *     standard CRS with target datum  →
+         *     target CRS
+         */
+        Matrix datumShift = null;
+        Identifier identifier = DATUM_SHIFT;
+        MatrixSIS matrix;
+        final CartesianCS standard = (CartesianCS) CommonCRS.WGS84.geocentric().getCoordinateSystem();
+        final Matrix normalizeSource = swapAndScaleAxes(sourceCS, standard);
+        final Matrix normalizeTarget = swapAndScaleAxes(standard, targetCS);
+        /*
+         * Since all steps are matrices, we can multiply them and get a single matrix.
+         * MatrixSIS.multiply(Matrix) is equivalent to AffineTransform.concatenate(…):
+         * First transform by the supplied transform and then transform the result by
+         * the original transform. So we compute;
+         *
+         *     matrix = normalizeTarget × datumShift × normalizeSource
+         */
+        matrix = Matrices.multiply(normalizeTarget, datumShift);
+        matrix = matrix.multiply(normalizeSource);
+        return createFromAffineTransform(identifier, sourceCRS, targetCRS, matrix);
+    }
+
+    /**
      * Creates an operation between two vertical coordinate reference systems.
      * The default implementation checks if both CRS use the same datum, then
      * adjusts for axis direction and units.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -735,7 +735,7 @@ public final class Matrices extends Stat
      */
     public static MatrixSIS multiply(final Matrix m1, final Matrix m2) throws MismatchedMatrixSizeException {
         if (m1 instanceof MatrixSIS) {
-            return ((MatrixSIS) m1).multiply(m2);  // Maybe the subclass override that method.
+            return ((MatrixSIS) m1).multiply(m2);           // Maybe the subclass overrides that method.
         }
         final int nc = m2.getNumCol();
         MatrixSIS.ensureNumRowMatch(m1.getNumCol(), m2.getNumRow(), nc);

Added: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToSpherical.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToSpherical.java?rev=1735003&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToSpherical.java (added)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CartesianToSpherical.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -0,0 +1,173 @@
+/*
+ * 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.operation.transform;
+
+import java.util.Arrays;
+import java.io.Serializable;
+import org.opengis.referencing.cs.CoordinateSystem;
+import org.opengis.referencing.operation.Matrix;
+import org.opengis.referencing.operation.MathTransform;
+import org.opengis.util.FactoryException;
+import org.apache.sis.referencing.operation.matrix.Matrix3;
+import org.apache.sis.referencing.CommonCRS;
+import org.apache.sis.referencing.CRS;
+
+import static java.lang.Math.*;
+
+
+/**
+ * Conversions from three-dimensional Cartesian coordinates to spherical coordinates.
+ * This conversion assumes that there is no datum change.
+ *
+ * <p>See {@link SphericalToCartesian} for explanation on axes convention.</p>
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.7
+ * @version 0.7
+ * @module
+ */
+final class CartesianToSpherical extends CoordinateSystemTransform implements Serializable {
+    /**
+     * For cross-version compatibility.
+     */
+    private static final long serialVersionUID = 7174557821232512348L;
+
+    /**
+     * The singleton instance computing output coordinates are in radians.
+     * For the instance computing output coordinates in degrees, use {@link #completeTransform()} instead.
+     */
+    static final CartesianToSpherical INSTANCE = new CartesianToSpherical();
+
+    /**
+     * Returns the singleton instance on deserialization.
+     */
+    private Object readResolve() {
+        return INSTANCE;
+    }
+
+    /**
+     * Creates the singleton instance.
+     * Output coordinates are in radians.
+     */
+    private CartesianToSpherical() {
+        super("Cartesian to Spherical", 3);
+        context.denormalizeGeographicOutputs(0);                // Convert (θ,Ω) from radians to degrees.
+    }
+
+    /**
+     * Returns the inverse of this transform.
+     */
+    @Override
+    public MathTransform inverse() {
+        return SphericalToCartesian.INSTANCE;
+    }
+
+    /**
+     * Returns the source coordinate system of the complete math transform.
+     * Angular units shall be degrees.
+     */
+    @Override
+    final CoordinateSystem getSourceCS() {
+        return CommonCRS.WGS84.geocentric().getCoordinateSystem();
+    }
+
+    /**
+     * Returns the target coordinate system of the complete math transform.
+     * Angular units shall be degrees.
+     */
+    @Override
+    final CoordinateSystem getTargetCS() throws FactoryException {
+        return CRS.forCode("SIS:6404").getCoordinateSystem();
+    }
+
+    /**
+     * Converts a single coordinate and optionally computes the derivative.
+     */
+    @Override
+    public Matrix transform(final double[] srcPts, final int srcOff,
+                            final double[] dstPts, final int dstOff,
+                            final boolean derivate)
+    {
+        final double X  = srcPts[srcOff  ];
+        final double Y  = srcPts[srcOff+1];
+        final double Z  = srcPts[srcOff+2];
+        final double ρ2 = X*X + Y*Y;
+        final double r2 = Z*Z + ρ2;
+        final double r  = sqrt(r2);
+        if (dstPts != null) {
+            dstPts[dstOff  ] = atan2(Y, X);                     // Spherical longitude (θ)
+            dstPts[dstOff+1] = (r == 0) ? Z : asin(Z / r);      // Spherical latitude  (Ω). If (X,Y,Z) is (0,0,0) take the sign of Z.
+            dstPts[dstOff+2] = r;
+        }
+        if (!derivate) {
+            return null;
+        }
+        final double d  = r2 * sqrt(r2 - Z*Z);
+        return new Matrix3(-Y/ρ2,   X/ρ2,     0,        // ∂θ/∂X, ∂θ/∂Y, ∂θ/∂Z
+                           -X*Z/d, -Y*Z/d, ρ2/d,        // ∂Ω/∂X, ∂Ω/∂Y, ∂Ω/∂Z
+                            X/r,    Y/r,   Z/r);        // ∂r/∂X, ∂r/∂Y, ∂r/∂Z
+    }
+
+    /**
+     * Converts an array of coordinates.
+     * This method performs the same conversion than {@link #transform(double[], int, double[], int, boolean)},
+     * but the formulas are repeated here for performance reasons.
+     */
+    @Override
+    public void transform(double[] srcPts, int srcOff, final double[] dstPts, int dstOff, int numPts) {
+        int srcInc = 0;
+        int dstInc = 0;
+        if (srcPts == dstPts) {
+            switch (IterationStrategy.suggest(srcOff, 3, dstOff, 3, numPts)) {
+                case ASCENDING: {
+                    break;
+                }
+                case DESCENDING: {
+                    srcOff += 3 * (numPts - 1);
+                    dstOff += 3 * (numPts - 1);
+                    srcInc = -6;
+                    dstInc = -6;
+                    break;
+                }
+                default: {
+                    srcPts = Arrays.copyOfRange(srcPts, srcOff, srcOff + numPts*3);
+                    srcOff = 0;
+                    break;
+                }
+            }
+        }
+        while (--numPts >= 0) {
+            final double X  = srcPts[srcOff++];
+            final double Y  = srcPts[srcOff++];
+            final double Z  = srcPts[srcOff++];
+            final double r  = sqrt(X*X + Y*Y + Z*Z);
+            dstPts[dstOff++] = atan2(Y, X);                     // Spherical longitude (θ)
+            dstPts[dstOff++] = (r == 0) ? Z : asin(Z / r);      // Spherical latitude  (Ω). If (X,Y,Z) is (0,0,0) take the sign of Z.
+            dstPts[dstOff++] = r;
+            srcOff += srcInc;
+            dstOff += dstInc;
+        }
+    }
+
+    /*
+     * NOTE: we do not bother to override the methods expecting a 'float' array because those methods should
+     *       be rarely invoked. Since there is usually LinearTransforms before and after this transform, the
+     *       conversion between float and double will be handled by those LinearTransforms.  If nevertheless
+     *       this EllipsoidToCentricTransform is at the beginning or the end of a transformation chain,
+     *       the methods inherited from the subclass will work (but may be slightly slower).
+     */
+}

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

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

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -316,8 +316,7 @@ class ConcatenatedTransform extends Abst
             }
         }
         /*
-         * If one transform is the inverse of the
-         * other, returns the identity transform.
+         * If one transform is the inverse of the other, return the identity transform.
          */
         if (areInverse(tr1, tr2) || areInverse(tr2, tr1)) {
             assert tr1.getSourceDimensions() == tr2.getTargetDimensions();
@@ -325,7 +324,7 @@ class ConcatenatedTransform extends Abst
             return MathTransforms.identity(tr1.getSourceDimensions());          // Returns a cached instance.
         }
         /*
-         * Gives a chance to AbstractMathTransform to returns an optimized object.
+         * Give a chance to AbstractMathTransform to returns an optimized object.
          * The main use case is Logarithmic vs Exponential transforms.
          */
         if (tr1 instanceof AbstractMathTransform) {
@@ -348,17 +347,17 @@ class ConcatenatedTransform extends Abst
      * Returns a name for the specified math transform.
      */
     private static String getName(final MathTransform transform) {
+        ParameterValueGroup params = null;
         if (transform instanceof AbstractMathTransform) {
-            ParameterValueGroup params;
             params = ((AbstractMathTransform) transform).getContextualParameters();
-            if (params == null) {
-                params = ((AbstractMathTransform) transform).getParameterValues();
-                if (params != null) {
-                    String name = params.getDescriptor().getName().getCode();
-                    if (name != null && !(name = name.trim()).isEmpty()) {
-                        return name;
-                    }
-                }
+        }
+        if (params == null && (transform instanceof Parameterized)) {
+            params = ((Parameterized) transform).getParameterValues();
+        }
+        if (params != null) {
+            String name = params.getDescriptor().getName().getCode();
+            if (name != null && !(name = name.trim()).isEmpty()) {
+                return name;
             }
         }
         return Classes.getShortClassName(transform);

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -460,7 +460,7 @@ public class ContextualParameters extend
             offset = new DoubleDouble(-λ0);
             offset.multiply(toRadians);
         }
-        final MatrixSIS normalize = (MatrixSIS) this.normalize;  // Must be the same instance, not a copy.
+        final MatrixSIS normalize = (MatrixSIS) this.normalize;         // Must be the same instance, not a copy.
         normalize.convertBefore(0, toRadians, offset);
         normalize.convertBefore(1, toRadians, null);
         return normalize;
@@ -485,7 +485,7 @@ public class ContextualParameters extend
     public synchronized MatrixSIS denormalizeGeographicOutputs(final double λ0) {
         ensureModifiable();
         final DoubleDouble toDegrees = DoubleDouble.createRadiansToDegrees();
-        final MatrixSIS denormalize = (MatrixSIS) this.denormalize;  // Must be the same instance, not a copy.
+        final MatrixSIS denormalize = (MatrixSIS) this.denormalize;         // Must be the same instance, not a copy.
         denormalize.convertAfter(0, toDegrees, (λ0 != 0) ? λ0 : null);
         denormalize.convertAfter(1, toDegrees, null);
         return denormalize;
@@ -549,7 +549,7 @@ public class ContextualParameters extend
         final Map<ParameterDescriptor<?>, ParameterValue<?>> parameters = new IdentityHashMap<>(values.length);
         for (ParameterValue<?> p : values) {
             if (p == null) {
-                break;  // The first null value in the array indicates the end of sequence.
+                break;                      // The first null value in the array indicates the end of sequence.
             }
             p = DefaultParameterValue.unmodifiable(p);
             final ParameterDescriptor<?> desc = p.getDescriptor();

Added: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java?rev=1735003&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java (added)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -0,0 +1,175 @@
+/*
+ * 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.operation.transform;
+
+import java.util.Map;
+import java.util.Collections;
+import javax.measure.converter.ConversionException;
+import org.opengis.util.FactoryException;
+import org.opengis.parameter.ParameterValueGroup;
+import org.opengis.referencing.cs.CartesianCS;
+import org.opengis.referencing.cs.CoordinateSystem;
+import org.opengis.referencing.cs.SphericalCS;
+import org.opengis.referencing.operation.MathTransform;
+import org.opengis.referencing.operation.MathTransformFactory;
+import org.opengis.referencing.operation.Matrix;
+import org.opengis.referencing.operation.OperationNotFoundException;
+import org.apache.sis.internal.referencing.WKTUtilities;
+import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.internal.util.Constants;
+import org.apache.sis.metadata.iso.ImmutableIdentifier;
+import org.apache.sis.metadata.iso.citation.Citations;
+import org.apache.sis.parameter.DefaultParameterDescriptorGroup;
+import org.apache.sis.referencing.cs.CoordinateSystems;
+import org.apache.sis.referencing.operation.DefaultOperationMethod;
+import org.apache.sis.util.resources.Errors;
+
+
+/**
+ * Base class of conversions between coordinate systems.
+ * Each subclasses should have a singleton instance.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.7
+ * @version 0.7
+ * @module
+ */
+abstract class CoordinateSystemTransform extends AbstractMathTransform {
+    /**
+     * Number of input and output dimensions.
+     */
+    private final int dimension;
+
+    /**
+     * An empty contextual parameter, used only for representing conversion from degrees to radians.
+     */
+    final transient ContextualParameters context;
+
+    /**
+     * The complete transform, including conversion between degrees and radians.
+     */
+    private volatile MathTransform complete;
+
+    /**
+     * Creates a new conversion between two types of coordinate system.
+     * Subclasses may need to invoke {@link ContextualParameters#normalizeGeographicInputs(double)}
+     * or {@link ContextualParameters#denormalizeGeographicOutputs(double)} after this constructor.
+     */
+    CoordinateSystemTransform(final String method, final int dimension) {
+        this.dimension = dimension;
+        final Map<String,?> properties = Collections.singletonMap(DefaultOperationMethod.NAME_KEY,
+                new ImmutableIdentifier(Citations.SIS, Constants.SIS, method));
+        context = new ContextualParameters(new DefaultOperationMethod(properties, dimension, dimension,
+                new DefaultParameterDescriptorGroup(properties, 1, 1)));
+    }
+
+    /**
+     * Returns the complete transform, including conversion between degrees and radians units.
+     */
+    final MathTransform completeTransform() throws FactoryException {
+        MathTransform tr = complete;
+        if (tr == null) {
+            // No need to synchronize since DefaultMathTransformFactory returns unique instances.
+            complete = tr = context.completeTransform(DefaultFactories.forBuildin(MathTransformFactory.class), this);
+        }
+        return tr;
+    }
+
+    /**
+     * Returns the source coordinate system of the complete math transform.
+     * Angular units shall be degrees.
+     */
+    abstract CoordinateSystem getSourceCS() throws FactoryException;
+
+    /**
+     * Returns the target coordinate system of the complete math transform.
+     * Angular units shall be degrees.
+     */
+    abstract CoordinateSystem getTargetCS() throws FactoryException;
+
+    /**
+     * Returns the number of dimensions in the source coordinate points.
+     * Shall be equals to {@code getSourceCS().getDimension()}.
+     */
+    @Override
+    public final int getSourceDimensions() {
+        return dimension;
+    }
+
+    /**
+     * Returns the number of dimensions in the target coordinate points.
+     * Shall be equals to {@code getTargetCS().getDimension()}.
+     */
+    @Override
+    public final int getTargetDimensions() {
+        return dimension;
+    }
+
+    /**
+     * Returns the empty set of parameter values.
+     */
+    @Override
+    public final ParameterValueGroup getParameterValues() {
+        return context;
+    }
+
+    /**
+     * Returns the contextual parameters. This is used for telling to the Well Known Text (WKT) formatter that this
+     * {@code CoordinateSystemTransform} transform is usually preceeded or followed by a conversion between degree
+     * and radian units of measurement.
+     */
+    @Override
+    protected final ContextualParameters getContextualParameters() {
+        return context;
+    }
+
+    /**
+     * Implementation of {@link DefaultMathTransformFactory#createCoordinateSystemChange(CoordinateSystem, CoordinateSystem)},
+     * defined here for reducing the {@code DefaultMathTransformFactory} weight in the common case where the conversions
+     * handled by this class are not needed.
+     */
+    static MathTransform create(final MathTransformFactory factory, final CoordinateSystem source,
+            final CoordinateSystem target) throws FactoryException
+    {
+        CoordinateSystemTransform tr = null;
+        if (source instanceof CartesianCS) {
+            if (target instanceof SphericalCS) {
+                tr = CartesianToSpherical.INSTANCE;
+            }
+        } else if (source instanceof SphericalCS) {
+            if (target instanceof CartesianCS) {
+                tr = SphericalToCartesian.INSTANCE;
+            }
+        }
+        Exception cause = null;
+        if (tr != null && tr.getSourceDimensions() == source.getDimension()
+                       && tr.getTargetDimensions() == target.getDimension())
+        {
+            try {
+                final Matrix before = CoordinateSystems.swapAndScaleAxes(source, tr.getSourceCS());
+                final Matrix after = CoordinateSystems.swapAndScaleAxes(tr.getTargetCS(), target);
+                return MathTransforms.concatenate(
+                        MathTransforms.linear(before), tr.completeTransform(), MathTransforms.linear(after));
+            } catch (IllegalArgumentException | ConversionException e) {
+                cause = e;
+            }
+        }
+        throw new OperationNotFoundException(Errors.format(Errors.Keys.CoordinateOperationNotFound_2,
+                WKTUtilities.toType(CoordinateSystem.class, source.getClass()),
+                WKTUtilities.toType(CoordinateSystem.class, target.getClass())), cause);
+    }
+}

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

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

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -1122,6 +1122,25 @@ public class DefaultMathTransformFactory
     }
 
     /**
+     * Creates a math transform that represent a change of coordinate system.
+     *
+     * @param source the source coordinate system.
+     * @param target the target coordinate system.
+     * @return a conversion from the given source to the given target coordinate system.
+     * @throws FactoryException if the conversion can not be created.
+     *
+     * @since 0.7
+     */
+    public MathTransform createCoordinateSystemChange(final CoordinateSystem source, final CoordinateSystem target)
+            throws FactoryException
+    {
+        ArgumentChecks.ensureNonNull("source", source);
+        ArgumentChecks.ensureNonNull("target", target);
+        return CoordinateSystemTransform.create(this, source, target);
+        // No need to use unique(…) here.
+    }
+
+    /**
      * Creates an affine transform from a matrix. If the transform input dimension is {@code M},
      * and output dimension is {@code N}, then the matrix will have size {@code [N+1][M+1]}. The
      * +1 in the matrix dimensions allows the matrix to do a shift, as well as a rotation. The

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -615,7 +615,7 @@ public class EllipsoidToCentricTransform
     /*
      * NOTE: we do not bother to override the methods expecting a 'float' array because those methods should
      *       be rarely invoked. Since there is usually LinearTransforms before and after this transform, the
-     *       conversion between float and double will be handle by those LinearTransforms.   If nevertheless
+     *       conversion between float and double will be handled by those LinearTransforms.  If nevertheless
      *       this EllipsoidToCentricTransform is at the beginning or the end of a transformation chain,
      *       the methods inherited from the subclass will work (but may be slightly slower).
      */

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransform.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransform.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransform.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -305,7 +305,7 @@ public class InterpolatedMolodenskyTrans
     /*
      * NOTE: we do not bother to override the methods expecting a 'float' array because those methods should
      *       be rarely invoked. Since there is usually LinearTransforms before and after this transform, the
-     *       conversion between float and double will be handle by those LinearTransforms.   If nevertheless
+     *       conversion between float and double will be handled by those LinearTransforms.  If nevertheless
      *       this MolodenskyTransform is at the beginning or the end of a transformation chain,  the methods
      *       inherited from the subclass will work (but may be slightly slower).
      */

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedTransform.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedTransform.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedTransform.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -347,7 +347,7 @@ public class InterpolatedTransform exten
     /*
      * NOTE: we do not bother to override the methods expecting a 'float' array because those methods should
      *       be rarely invoked. Since there is usually LinearTransforms before and after this transform, the
-     *       conversion between float and double will be handle by those LinearTransforms.   If nevertheless
+     *       conversion between float and double will be handled by those LinearTransforms.  If nevertheless
      *       this MolodenskyTransform is at the beginning or the end of a transformation chain,  the methods
      *       inherited from the subclass will work (but may be slightly slower).
      */

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -32,10 +32,9 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.referencing.j2d.AffineTransform2D;
 import org.apache.sis.referencing.operation.matrix.AffineTransforms2D;
 import org.apache.sis.referencing.operation.matrix.Matrices;
+import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.Static;
 
-import static org.apache.sis.util.ArgumentChecks.*;
-
 
 /**
  * Utility methods creating or working on {@link MathTransform} instances.
@@ -78,7 +77,7 @@ public final class MathTransforms extend
      * @return An identity transform of the specified dimension.
      */
     public static LinearTransform identity(final int dimension) {
-        ensureStrictlyPositive("dimension", dimension);
+        ArgumentChecks.ensureStrictlyPositive("dimension", dimension);
         return IdentityTransform.create(dimension);
     }
 
@@ -113,7 +112,7 @@ public final class MathTransforms extend
      * @see DefaultMathTransformFactory#createAffineTransform(Matrix)
      */
     public static LinearTransform linear(final Matrix matrix) {
-        ensureNonNull("matrix", matrix);
+        ArgumentChecks.ensureNonNull("matrix", matrix);
         final int sourceDimension = matrix.getNumCol() - 1;
         final int targetDimension = matrix.getNumRow() - 1;
         if (sourceDimension == targetDimension) {
@@ -170,12 +169,12 @@ public final class MathTransforms extend
      * @since 0.6
      */
     public static MathTransform compound(final MathTransform... transforms) {
-        ensureNonNull("transforms", transforms);
+        ArgumentChecks.ensureNonNull("transforms", transforms);
         int sum = 0;
         final int[] dimensions = new int[transforms.length];
         for (int i=0; i<transforms.length; i++) {
             final MathTransform tr = transforms[i];
-            ensureNonNullElement("transforms", i, tr);
+            ArgumentChecks.ensureNonNullElement("transforms", i, tr);
             sum += (dimensions[i] = tr.getSourceDimensions());
         }
         MathTransform compound = null;
@@ -209,8 +208,8 @@ public final class MathTransforms extend
     public static MathTransform concatenate(final MathTransform tr1, final MathTransform tr2)
             throws MismatchedDimensionException
     {
-        ensureNonNull("tr1", tr1);
-        ensureNonNull("tr2", tr2);
+        ArgumentChecks.ensureNonNull("tr1", tr1);
+        ArgumentChecks.ensureNonNull("tr2", tr2);
         final MathTransform tr;
         try {
             tr = ConcatenatedTransform.create(tr1, tr2, null);
@@ -269,9 +268,9 @@ public final class MathTransforms extend
     public static MathTransform concatenate(MathTransform tr1, MathTransform tr2, MathTransform tr3)
             throws MismatchedDimensionException
     {
-        ensureNonNull("tr1", tr1);
-        ensureNonNull("tr2", tr2);
-        ensureNonNull("tr3", tr3);
+        ArgumentChecks.ensureNonNull("tr1", tr1);
+        ArgumentChecks.ensureNonNull("tr2", tr2);
+        ArgumentChecks.ensureNonNull("tr3", tr3);
         return concatenate(concatenate(tr1, tr2), tr3);
     }
 

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MolodenskyTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MolodenskyTransform.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MolodenskyTransform.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MolodenskyTransform.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -362,7 +362,7 @@ public class MolodenskyTransform extends
     /*
      * NOTE: we do not bother to override the methods expecting a 'float' array because those methods should
      *       be rarely invoked. Since there is usually LinearTransforms before and after this transform, the
-     *       conversion between float and double will be handle by those LinearTransforms.   If nevertheless
+     *       conversion between float and double will be handled by those LinearTransforms.  If nevertheless
      *       this MolodenskyTransform is at the beginning or the end of a transformation chain,  the methods
      *       inherited from the subclass will work (but may be slightly slower).
      */

Added: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SphericalToCartesian.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SphericalToCartesian.java?rev=1735003&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SphericalToCartesian.java (added)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SphericalToCartesian.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -0,0 +1,195 @@
+/*
+ * 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.operation.transform;
+
+import java.util.Arrays;
+import java.io.Serializable;
+import org.opengis.referencing.cs.CoordinateSystem;
+import org.opengis.referencing.operation.Matrix;
+import org.opengis.referencing.operation.MathTransform;
+import org.opengis.util.FactoryException;
+import org.apache.sis.referencing.operation.matrix.Matrix3;
+import org.apache.sis.referencing.CommonCRS;
+import org.apache.sis.referencing.CRS;
+
+import static java.lang.Math.*;
+
+
+/**
+ * Conversions from spherical coordinates to three-dimensional Cartesian coordinates.
+ * This conversion assumes that there is no datum change. Axis order is:
+ *
+ * <ul>
+ *   <li>Spherical longitude (θ), also noted Ω or λ.</li>
+ *   <li>Spherical latitude (Ω), also noted θ or φ′ (confusing).</li>
+ *   <li>Spherical radius (r), also noted <var>r</var> in ISO 19111.</li>
+ * </ul>
+ * <div class="note"><b>Note:</b>
+ * the spherical latitude is related to geodetic latitude φ by {@literal Ω(φ) = atan((1-ℯ²)⋅tan(φ))}.</div>
+ *
+ * This order matches the {@link EllipsoidToCentricTransform} axis order.
+ * Note that this is <strong>not</strong> the convention used neither in physics (ISO 80000-2:2009) or in mathematics.
+ *
+ * <div class="note"><b>Relationship with the convention used in physics</b>
+ * The ISO 80000-2 convention is (r,Ω,φ) where φ is like the spherical longitude, and Ω is measured from
+ * the Z axis (North pole) instead than from the equator plane. The consequence in the formulas is that
+ * {@code sin(Ω)} needs to be replaced by {@code cos(Ω)} and conversely.</div>
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.7
+ * @version 0.7
+ * @module
+ *
+ * @see CartesianToSpherical
+ * @see EllipsoidToCentricTransform
+ * @see <a href="https://en.wikipedia.org/wiki/Spherical_coordinate_system">Spherical coordinate system on Wikipedia</a>
+ */
+final class SphericalToCartesian extends CoordinateSystemTransform implements Serializable {
+    /**
+     * For cross-version compatibility.
+     */
+    private static final long serialVersionUID = 8001536207920751506L;
+
+    /**
+     * The singleton instance expecting input coordinates in radians.
+     * For the instance expecting input coordinates in degrees, use {@link #completeTransform()} instead.
+     */
+    static final SphericalToCartesian INSTANCE = new SphericalToCartesian();
+
+    /**
+     * Returns the singleton instance on deserialization.
+     */
+    private Object readResolve() {
+        return INSTANCE;
+    }
+
+    /**
+     * Creates the singleton instance.
+     * Input coordinates are in radians.
+     */
+    private SphericalToCartesian() {
+        super("Spherical to Cartesian", 3);
+        context.normalizeGeographicInputs(0);                   // Convert (θ,Ω) from degrees to radians.
+    }
+
+    /**
+     * Returns the inverse of this transform.
+     */
+    @Override
+    public MathTransform inverse() {
+        return CartesianToSpherical.INSTANCE;
+    }
+
+    /**
+     * Returns the source coordinate system of the complete math transform.
+     * Angular units shall be degrees.
+     */
+    @Override
+    final CoordinateSystem getSourceCS() throws FactoryException {
+        return CRS.forCode("SIS:6404").getCoordinateSystem();
+    }
+
+    /**
+     * Returns the target coordinate system of the complete math transform.
+     * Angular units shall be degrees.
+     */
+    @Override
+    final CoordinateSystem getTargetCS() {
+        return CommonCRS.WGS84.geocentric().getCoordinateSystem();
+    }
+
+    /**
+     * Converts a single coordinate and optionally computes the derivative.
+     */
+    @Override
+    public Matrix transform(final double[] srcPts, final int srcOff,
+                            final double[] dstPts, final int dstOff,
+                            final boolean derivate)
+    {
+        final double θ = srcPts[srcOff  ];          // Spherical longitude
+        final double Ω = srcPts[srcOff+1];          // Spherical latitude
+        final double r = srcPts[srcOff+2];          // Spherical radius
+        final double cosθ = cos(θ);
+        final double sinθ = sin(θ);
+        final double cosΩ = cos(Ω);
+        final double sinΩ = sin(Ω);
+        final double rsinΩ = r * sinΩ;
+        final double rcosΩ = r * cosΩ;
+        if (dstPts != null) {
+            dstPts[dstOff  ] = rcosΩ * cosθ;        // X: Toward prime meridian
+            dstPts[dstOff+1] = rcosΩ * sinθ;        // Y: Toward 90° east
+            dstPts[dstOff+2] = rsinΩ;               // Z: Toward north pole
+        }
+        if (!derivate) {
+            return null;
+        }
+        final double dX_dr = cosΩ * cosθ;
+        final double dY_dr = cosΩ * sinθ;
+        return new Matrix3(-r*dY_dr, -rsinΩ*cosθ, dX_dr,       // ∂X/∂θ, ∂X/∂Ω, ∂X/∂r
+                            r*dX_dr, -rsinΩ*sinθ, dY_dr,       // ∂Y/∂θ, ∂Y/∂Ω, ∂Y/∂r
+                                  0,  rcosΩ,      sinΩ);       // ∂Z/∂θ, ∂Z/∂Ω, ∂Z/∂r
+    }
+
+    /**
+     * Converts an array of coordinates.
+     * This method performs the same conversion than {@link #transform(double[], int, double[], int, boolean)},
+     * but the formulas are repeated here for performance reasons.
+     */
+    @Override
+    public void transform(double[] srcPts, int srcOff, final double[] dstPts, int dstOff, int numPts) {
+        int srcInc = 0;
+        int dstInc = 0;
+        if (srcPts == dstPts) {
+            switch (IterationStrategy.suggest(srcOff, 3, dstOff, 3, numPts)) {
+                case ASCENDING: {
+                    break;
+                }
+                case DESCENDING: {
+                    srcOff += 3 * (numPts - 1);
+                    dstOff += 3 * (numPts - 1);
+                    srcInc = -6;
+                    dstInc = -6;
+                    break;
+                }
+                default: {
+                    srcPts = Arrays.copyOfRange(srcPts, srcOff, srcOff + numPts*3);
+                    srcOff = 0;
+                    break;
+                }
+            }
+        }
+        while (--numPts >= 0) {
+            final double θ = srcPts[srcOff++];          // Spherical longitude
+            final double Ω = srcPts[srcOff++];          // Spherical latitude
+            final double r = srcPts[srcOff++];          // Spherical radius
+            final double rcosΩ = r * cos(Ω);
+            dstPts[dstOff++] = rcosΩ * cos(θ);          // X: Toward prime meridian
+            dstPts[dstOff++] = rcosΩ * sin(θ);          // Y: Toward 90° east
+            dstPts[dstOff++] = r * sin(Ω);              // Z: Toward north pole
+            srcOff += srcInc;
+            dstOff += dstInc;
+        }
+    }
+
+    /*
+     * NOTE: we do not bother to override the methods expecting a 'float' array because those methods should
+     *       be rarely invoked. Since there is usually LinearTransforms before and after this transform, the
+     *       conversion between float and double will be handled by those LinearTransforms.  If nevertheless
+     *       this EllipsoidToCentricTransform is at the beginning or the end of a transformation chain,
+     *       the methods inherited from the subclass will work (but may be slightly slower).
+     */
+}

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

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

Added: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToSphericalTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToSphericalTest.java?rev=1735003&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToSphericalTest.java (added)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToSphericalTest.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -0,0 +1,83 @@
+/*
+ * 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.operation.transform;
+
+import org.opengis.util.FactoryException;
+import org.opengis.referencing.operation.TransformException;
+import org.opengis.test.referencing.TransformTestCase;
+import org.apache.sis.test.DependsOn;
+import org.apache.sis.test.DependsOnMethod;
+import org.apache.sis.test.TestUtilities;
+import org.junit.Test;
+
+
+/**
+ * Tests {@link CartesianToSpherical}.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.7
+ * @version 0.7
+ * @module
+ */
+@DependsOn(SphericalToCartesianTest.class)
+public final strictfp class CartesianToSphericalTest extends TransformTestCase {
+    /**
+     * Tests coordinate conversions.
+     *
+     * @throws FactoryException if the transform can not be created.
+     * @throws TransformException if a coordinate can not be transformed.
+     */
+    @Test
+    public void testConversion() throws FactoryException, TransformException {
+        transform = CartesianToSpherical.INSTANCE.completeTransform();
+        tolerance = 1E-12;
+        final double[][] data = SphericalToCartesianTest.testData();
+        verifyTransform(data[1], data[0]);
+    }
+
+    /**
+     * Tests calculation of a transform derivative.
+     *
+     * @throws FactoryException if the transform can not be created.
+     * @throws TransformException if a coordinate can not be transformed.
+     */
+    @Test
+    public void testDerivative() throws FactoryException, TransformException {
+        transform = CartesianToSpherical.INSTANCE.completeTransform();
+        derivativeDeltas = new double[] {1E-6, 1E-6, 1E-6};
+        tolerance = 1E-7;
+        verifyDerivative(30, 60, 100);
+    }
+
+    /**
+     * Tests calculation of a transform derivative.
+     *
+     * @throws FactoryException if the transform can not be created.
+     * @throws TransformException if a coordinate can not be transformed.
+     */
+    @Test
+    @DependsOnMethod({"testConversion", "testDerivative"})
+    public void testConsistency() throws FactoryException, TransformException {
+        transform = CartesianToSpherical.INSTANCE.completeTransform();
+        derivativeDeltas = new double[] {1E-6, 1E-6, 1E-6};
+        tolerance = 1E-7;
+        verifyInDomain(new double[] {-100, -100, -100},      // Minimal coordinates
+                       new double[] {+100, +100, +100},      // Maximal coordinates
+                       new int[]    {  10,   10,   10},
+                       TestUtilities.createRandomNumberGenerator());
+    }
+}

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

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

Added: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/SphericalToCartesianTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/SphericalToCartesianTest.java?rev=1735003&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/SphericalToCartesianTest.java (added)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/SphericalToCartesianTest.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -0,0 +1,119 @@
+/*
+ * 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.operation.transform;
+
+import org.opengis.util.FactoryException;
+import org.opengis.referencing.operation.TransformException;
+import org.opengis.test.referencing.TransformTestCase;
+import org.apache.sis.test.DependsOnMethod;
+import org.apache.sis.test.TestUtilities;
+import org.junit.Test;
+
+import static java.lang.StrictMath.*;
+
+
+/**
+ * Tests {@link SphericalToCartesian}.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.7
+ * @version 0.7
+ * @module
+ */
+public final strictfp class SphericalToCartesianTest extends TransformTestCase {
+    /**
+     * Returns coordinate points in spherical coordinates and their equivalent in Cartesian coordinates.
+     */
+    static double[][] testData() {
+        final double r     = 1000;
+        final double cos30 = r*sqrt(0.75);      // cos(30°) = √¾
+        final double cos60 = r/2;               // cos(60°) =  ½
+        final double sin60 = cos30;
+        final double sin30 = cos60;
+        return new double[][] {
+            new double[] {                      // (θ,Ω,r) coordinates
+                 0,       0,       0,
+                 0,       0,       r,
+                90,       0,       r,
+               -90,       0,       r,
+                 0,      90,       r,
+                 0,     -90,       r,
+                 0,      60,       r,
+                60,       0,       r,
+                30,       0,       r,
+                30,      60,       r
+            }, new double[] {                   // (X,Y,Z) coordinates
+                 0,       0,       0,
+                 r,       0,       0,
+                 0,       r,       0,
+                 0,      -r,       0,
+                 0,       0,       r,
+                 0,       0,      -r,
+                 cos60,   0,       sin60,
+                 cos60,   sin60,   0,
+                 cos30,   sin30,   0,
+                 cos30/2, sin30/2, sin60
+            }
+        };
+    }
+
+    /**
+     * Tests coordinate conversions.
+     *
+     * @throws FactoryException if the transform can not be created.
+     * @throws TransformException if a coordinate can not be transformed.
+     */
+    @Test
+    public void testConversion() throws FactoryException, TransformException {
+        transform = SphericalToCartesian.INSTANCE.completeTransform();
+        tolerance = 1E-12;
+        final double[][] data = testData();
+        verifyTransform(data[0], data[1]);
+    }
+
+    /**
+     * Tests calculation of a transform derivative.
+     *
+     * @throws FactoryException if the transform can not be created.
+     * @throws TransformException if a coordinate can not be transformed.
+     */
+    @Test
+    public void testDerivative() throws FactoryException, TransformException {
+        transform = SphericalToCartesian.INSTANCE.completeTransform();
+        derivativeDeltas = new double[] {1E-6, 1E-6, 1E-6};
+        tolerance = 1E-7;
+        verifyDerivative(30, 60, 100);
+    }
+
+    /**
+     * Tests calculation of a transform derivative.
+     *
+     * @throws FactoryException if the transform can not be created.
+     * @throws TransformException if a coordinate can not be transformed.
+     */
+    @Test
+    @DependsOnMethod({"testConversion", "testDerivative"})
+    public void testConsistency() throws FactoryException, TransformException {
+        transform = SphericalToCartesian.INSTANCE.completeTransform();
+        derivativeDeltas = new double[] {1E-6, 1E-6, 1E-6};
+        tolerance = 1E-7;
+        verifyInDomain(new double[] {-180, -90,   0},       // Minimal coordinates
+                       new double[] {+180, +90, 100},       // Maximal coordinates
+                       new int[]    {  10,  10,  10},
+                       TestUtilities.createRandomNumberGenerator());
+    }
+}

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

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

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1735003&r1=1735002&r2=1735003&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Mon Mar 14 23:35:16 2016
@@ -121,6 +121,8 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.operation.transform.ContextualParametersTest.class,
     org.apache.sis.referencing.operation.transform.EllipsoidToCentricTransformTest.class,
     org.apache.sis.referencing.operation.transform.MolodenskyTransformTest.class,
+    org.apache.sis.referencing.operation.transform.SphericalToCartesianTest.class,
+    org.apache.sis.referencing.operation.transform.CartesianToSphericalTest.class,
     org.apache.sis.referencing.operation.DefaultFormulaTest.class,
     org.apache.sis.referencing.operation.DefaultOperationMethodTest.class,
     org.apache.sis.referencing.operation.AbstractSingleOperationTest.class,



Mime
View raw message