sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1740206 - in /sis/branches/JDK7: ./ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/ core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/ core/sis-refere...
Date Wed, 20 Apr 2016 22:12:26 GMT
Author: desruisseaux
Date: Wed Apr 20 22:12:25 2016
New Revision: 1740206

URL: http://svn.apache.org/viewvc?rev=1740206&view=rev
Log:
Merge fix from the JDK8 branch.

Modified:
    sis/branches/JDK7/   (props changed)
    sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultParametricCRS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultParametricCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultParametricDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CRSPair.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/InverseOperationMethod.java
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationRegistryTest.java

Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 20 22:12:25 2016
@@ -1,4 +1,4 @@
 /sis/branches/Android:1430670-1480699
 /sis/branches/JDK6:1394913-1508480
-/sis/branches/JDK8:1584960-1740143
+/sis/branches/JDK8:1584960-1740205
 /sis/trunk:1394364-1508466,1519089-1519674

Modified: sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java?rev=1740206&r1=1740205&r2=1740206&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java
[UTF-8] Wed Apr 20 22:12:25 2016
@@ -112,7 +112,7 @@ final class NamedFeatureType implements
     }
 
     /**
-     * This feature type is considered to all other features except itself.
+     * This feature type is considered independent of all other feature types except itself.
      */
     @Override
     public boolean isAssignableFrom(final FeatureType type) {

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java?rev=1740206&r1=1740205&r2=1740206&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
[UTF-8] Wed Apr 20 22:12:25 2016
@@ -27,7 +27,6 @@ import org.opengis.referencing.datum.Dat
 import org.opengis.referencing.datum.GeodeticDatum;
 import org.opengis.referencing.datum.VerticalDatum;
 import org.opengis.referencing.datum.TemporalDatum;
-import org.opengis.referencing.datum.ParametricDatum;
 import org.opengis.referencing.datum.EngineeringDatum;
 import org.opengis.referencing.crs.SingleCRS;
 import org.opengis.referencing.crs.DerivedCRS;
@@ -35,13 +34,11 @@ import org.opengis.referencing.crs.Geode
 import org.opengis.referencing.crs.VerticalCRS;
 import org.opengis.referencing.crs.TemporalCRS;
 import org.opengis.referencing.crs.ProjectedCRS;
-import org.opengis.referencing.crs.ParametricCRS;
 import org.opengis.referencing.crs.EngineeringCRS;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.referencing.cs.CoordinateSystem;
 import org.opengis.referencing.cs.VerticalCS;
 import org.opengis.referencing.cs.TimeCS;
-import org.opengis.referencing.cs.ParametricCS;
 import org.opengis.referencing.operation.Conversion;
 import org.opengis.referencing.operation.OperationMethod;
 import org.opengis.referencing.operation.MathTransform;
@@ -63,6 +60,11 @@ import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.Classes;
 
+// Branch-dependent imports
+import org.opengis.referencing.cs.ParametricCS;
+import org.opengis.referencing.crs.ParametricCRS;
+import org.opengis.referencing.datum.ParametricDatum;
+
 
 /**
  * A coordinate reference system that is defined by its coordinate {@linkplain DefaultConversion
conversion}

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultParametricCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultParametricCRS.java?rev=1740206&r1=1740205&r2=1740206&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultParametricCRS.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultParametricCRS.java
[UTF-8] Wed Apr 20 22:12:25 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,11 @@ 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.opengis.referencing.cs.ParametricCS;
+import org.opengis.referencing.crs.ParametricCRS;
+import org.opengis.referencing.datum.ParametricDatum;
+
 
 /**
  * A 1-dimensional coordinate reference system which uses parameter values or functions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java?rev=1740206&r1=1740205&r2=1740206&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
[UTF-8] Wed Apr 20 22:12:25 2016
@@ -391,9 +391,10 @@ public class AbstractCS extends Abstract
      * @return {@code true} if both objects are equal.
      */
     @Override
+    @SuppressWarnings("fallthrough")
     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;
@@ -403,6 +404,14 @@ public class AbstractCS extends Abstract
                 // No need to check the class - this check has been done by super.equals(…).
                 return Arrays.equals(axes, ((AbstractCS) object).axes);
             }
+            case DEBUG: {
+                final int d1 = axes.length;
+                final int d2 = ((CoordinateSystem) object).getDimension();
+                if (d1 != d2) {
+                    throw new AssertionError(Errors.format(Errors.Keys.MismatchedDimension_2,
d1, d2));
+                }
+                // Fall through
+            }
             default: {
                 final CoordinateSystem that = (CoordinateSystem) object;
                 final int dimension = getDimension();

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultParametricCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultParametricCS.java?rev=1740206&r1=1740205&r2=1740206&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultParametricCS.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultParametricCS.java
[UTF-8] Wed Apr 20 22:12:25 2016
@@ -20,6 +20,8 @@ import java.util.Map;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
+
+// Branch-dependent imports
 import org.opengis.referencing.cs.ParametricCS;
 
 

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultParametricDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultParametricDatum.java?rev=1740206&r1=1740205&r2=1740206&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultParametricDatum.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultParametricDatum.java
[UTF-8] Wed Apr 20 22:12:25 2016
@@ -20,10 +20,12 @@ import java.util.Date;
 import java.util.Map;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
-import org.opengis.referencing.datum.ParametricDatum;
 import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.io.wkt.Formatter;
 
+// Branch-dependent imports
+import org.opengis.referencing.datum.ParametricDatum;
+
 
 /**
  * Defines the origin of a parametric coordinate reference system.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CRSPair.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CRSPair.java?rev=1740206&r1=1740205&r2=1740206&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CRSPair.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CRSPair.java
[UTF-8] Wed Apr 20 22:12:25 2016
@@ -16,6 +16,8 @@
  */
 package org.apache.sis.referencing.operation;
 
+import org.opengis.referencing.cs.EllipsoidalCS;
+import org.opengis.referencing.cs.CoordinateSystem;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.referencing.IdentifiedObject;
 import org.apache.sis.referencing.AbstractIdentifiedObject;
@@ -79,8 +81,9 @@ final class CRSPair {
     }
 
     /**
-     * Returns the name of the GeoAPI interface implemented by the specified object,
-     * followed by the name between brackets.
+     * Returns the name of the GeoAPI interface implemented by the specified object. In the
GeographicCRS
+     * or EllipsoidalCS cases, the trailing CRS or CS suffix is replaced by the number of
dimensions
+     * (e.g. "Geographic3D").
      */
     static String label(final IdentifiedObject object) {
         if (object == null) {
@@ -92,7 +95,18 @@ final class CRSPair {
         } else {
             type = Classes.getLeafInterfaces(object.getClass(), IdentifiedObject.class)[0];
         }
-        String label = Classes.getShortName(type);
+        String suffix, label = Classes.getShortName(type);
+        if (label.endsWith((suffix = "CRS")) || label.endsWith(suffix = "CS")) {
+            Object cs = object;
+            if (object instanceof CoordinateReferenceSystem) {
+                cs = ((CoordinateReferenceSystem) object).getCoordinateSystem();
+            }
+            if (cs instanceof EllipsoidalCS) {
+                final StringBuilder sb = new StringBuilder(label);
+                sb.setLength(label.length() - suffix.length());
+                label = sb.append(((CoordinateSystem) cs).getDimension()).append('D').toString();
+            }
+        }
         String name = IdentifiedObjects.getName(object, null);
         if (name != null) {
             int i = 30;                                         // Arbitrary length threshold.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java?rev=1740206&r1=1740205&r2=1740206&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
[UTF-8] Wed Apr 20 22:12:25 2016
@@ -38,6 +38,7 @@ import org.opengis.referencing.Identifie
 import org.opengis.referencing.NoSuchAuthorityCodeException;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.referencing.crs.GeodeticCRS;
+import org.opengis.referencing.crs.SingleCRS;
 import org.opengis.referencing.cs.EllipsoidalCS;
 import org.opengis.referencing.operation.*;
 
@@ -295,7 +296,8 @@ class CoordinateOperationRegistry {
                      * need to modify the coordinate operation in order to match the new
number of dimensions.
                      */
                     if (combine != 0) {
-                        operation = propagateVertical(operation, source != sourceCRS, target
!= targetCRS);
+                        operation = propagateVertical(sourceCRS, source != sourceCRS,
+                                                      targetCRS, target != targetCRS, operation);
                         if (operation == null) {
                             continue;
                         }
@@ -304,8 +306,12 @@ class CoordinateOperationRegistry {
                     return operation;
                 }
             } catch (IllegalArgumentException | ConversionException e) {
-                throw new FactoryException(Errors.format(
-                        Errors.Keys.CanNotInstantiate_1, new CRSPair(sourceCRS, targetCRS)),
e);
+                String message = Errors.format(Errors.Keys.CanNotInstantiate_1, new CRSPair(sourceCRS,
targetCRS));
+                String details = e.getLocalizedMessage();
+                if (details != null) {
+                    message = message + ' ' + details;
+                }
+                throw new FactoryException(message, e);
             }
         }
     }
@@ -539,7 +545,8 @@ class CoordinateOperationRegistry {
                                                   final MathTransformFactory      mtFactory)
             throws IllegalArgumentException, ConversionException, FactoryException
     {
-        assert Utilities.deepEquals(sourceCRS, targetCRS, ComparisonMode.ALLOW_VARIANT);
+        assert ReferencingUtilities.getDimension(sourceCRS) != ReferencingUtilities.getDimension(targetCRS)
+                || Utilities.deepEquals(sourceCRS, targetCRS, ComparisonMode.ALLOW_VARIANT);
         final Matrix m = CoordinateSystems.swapAndScaleAxes(sourceCRS.getCoordinateSystem(),
targetCRS.getCoordinateSystem());
         return (m.isIdentity()) ? null : mtFactory.createAffineTransform(m);
     }
@@ -693,16 +700,20 @@ class CoordinateOperationRegistry {
      * <cite>best effort</cite> basis. In any cases, the {@link #complete} method
should be invoked
      * after this one in order to ensure that the source and target CRS are the expected
ones.</p>
      *
-     * @param  operation the original (typically two-dimensional) coordinate operation.
+     * @param  sourceCRS the potentially three-dimensional source CRS
      * @param  source3D  {@code true} for adding ellipsoidal height in source coordinates.
+     * @param  targetCRS the potentially three-dimensional target CRS
      * @param  target3D  {@code true} for adding ellipsoidal height in target coordinates.
+     * @param  operation the original (typically two-dimensional) coordinate operation.
      * @return a coordinate operation with the source and/or target coordinates made 3D,
      *         or {@code null} if this method does not know how to create the operation.
      * @throws IllegalArgumentException if the operation method can not have the desired
number of dimensions.
      * @throws FactoryException if an error occurred while creating the coordinate operation.
      */
-    private CoordinateOperation propagateVertical(final CoordinateOperation operation,
-            final boolean source3D, final boolean target3D) throws IllegalArgumentException,
FactoryException
+    private CoordinateOperation propagateVertical(final CoordinateReferenceSystem sourceCRS,
final boolean source3D,
+                                                  final CoordinateReferenceSystem targetCRS,
final boolean target3D,
+                                                  final CoordinateOperation operation)
+            throws IllegalArgumentException, FactoryException
     {
         final List<CoordinateOperation> operations = new ArrayList<>();
         if (operation instanceof ConcatenatedOperation) {
@@ -710,8 +721,8 @@ class CoordinateOperationRegistry {
         } else {
             operations.add(operation);
         }
-        if ((source3D && !propagateVertical(operations.listIterator(), true)) ||
-            (target3D && !propagateVertical(operations.listIterator(operations.size()),
false)))
+        if ((source3D && !propagateVertical(sourceCRS, targetCRS, operations.listIterator(),
true)) ||
+            (target3D && !propagateVertical(sourceCRS, targetCRS, operations.listIterator(operations.size()),
false)))
         {
             return null;
         }
@@ -728,13 +739,18 @@ class CoordinateOperationRegistry {
      * Appends a vertical axis in the source CRS of the first step {@code forward = true}
or in
      * the target CRS of the last step {@code forward = false} of the given operations chain.
      *
+     * @param  source3D    the potentially three-dimensional source CRS
+     * @param  target3D    the potentially three-dimensional target CRS
      * @param  operations  the chain of operations in which to add a vertical axis.
      * @param  forward     {@code true} for adding the vertical axis at the beginning, or
      *                     {@code false} for adding the vertical axis at the end.
      * @return {@code true} on success.
      * @throws IllegalArgumentException if the operation method can not have the desired
number of dimensions.
      */
-    private boolean propagateVertical(final ListIterator<CoordinateOperation> operations,
final boolean forward)
+    private boolean propagateVertical(final CoordinateReferenceSystem source3D,
+                                      final CoordinateReferenceSystem target3D,
+                                      final ListIterator<CoordinateOperation> operations,
+                                      final boolean forward)
             throws IllegalArgumentException, FactoryException
     {
         while (forward ? operations.hasNext() : operations.hasPrevious()) {
@@ -772,18 +788,18 @@ class CoordinateOperationRegistry {
                 if (op instanceof SingleOperation) {
                     final MathTransformFactory mtFactory = factorySIS.getMathTransformFactory();
                     if (mtFactory instanceof DefaultMathTransformFactory) {
-                        final CoordinateReferenceSystem source3D = toGeodetic3D(sourceCRS);
-                        final CoordinateReferenceSystem target3D = toGeodetic3D(targetCRS);
+                        if (forward) sourceCRS = toGeodetic3D(sourceCRS, source3D);
+                        else         targetCRS = toGeodetic3D(targetCRS, target3D);
                         final MathTransform mt;
                         try {
                             mt = ((DefaultMathTransformFactory) mtFactory).createParameterizedTransform(
                                     ((SingleOperation) op).getParameterValues(),
-                                    ReferencingUtilities.createTransformContext(source3D,
target3D, null));
+                                    ReferencingUtilities.createTransformContext(sourceCRS,
targetCRS, null));
                         } catch (InvalidGeodeticParameterException e) {
                             log(e);
                             break;
                         }
-                        operations.set(recreate(op, source3D, target3D, mt, mtFactory.getLastMethodUsed()));
+                        operations.set(recreate(op, sourceCRS, targetCRS, mt, mtFactory.getLastMethodUsed()));
                         return true;
                     }
                 }
@@ -814,7 +830,7 @@ class CoordinateOperationRegistry {
                  * conform to the definition provided by the authority.
                  */
                 final MathTransform mt = factorySIS.getMathTransformFactory().createAffineTransform(matrix);
-                operations.set(recreate(op, toGeodetic3D(sourceCRS), toGeodetic3D(targetCRS),
mt, null));
+                operations.set(recreate(op, toGeodetic3D(sourceCRS, source3D), toGeodetic3D(targetCRS,
target3D), mt, null));
             }
             /*
              * If we processed the operation that change the number of dimensions, we are
done.
@@ -830,13 +846,27 @@ class CoordinateOperationRegistry {
      * If the given CRS is two-dimensional, append an ellipsoidal height to it.
      * It is caller's responsibility to ensure that the given CRS is geographic.
      */
-    private CoordinateReferenceSystem toGeodetic3D(CoordinateReferenceSystem crs) throws
FactoryException {
+    private CoordinateReferenceSystem toGeodetic3D(CoordinateReferenceSystem crs,
+            final CoordinateReferenceSystem candidate) throws FactoryException
+    {
         assert (crs instanceof GeodeticCRS) && (crs.getCoordinateSystem() instanceof
EllipsoidalCS) : crs;
-        if (crs.getCoordinateSystem().getDimension() == 2) {
-            crs = ReferencingServices.getInstance().createCompoundCRS(factorySIS.getCRSFactory(),
factorySIS.getCSFactory(),
-                    derivedFrom(crs), crs, CommonCRS.Vertical.ELLIPSOIDAL.crs());
+        if (crs.getCoordinateSystem().getDimension() != 2) {
+            return crs;
+        }
+        /*
+         * The check for same class is a cheap way to ensure that the two CRS implement the
same GeoAPI interface.
+         * This test is stricter than necessary, but the result should still not wrong if
we miss an opportunity
+         * to return the existing instance.
+         */
+        if (crs.getClass() == candidate.getClass() && candidate.getCoordinateSystem().getDimension()
== 3) {
+            if (Utilities.equalsIgnoreMetadata(((SingleCRS) crs).getDatum(), ((SingleCRS)
candidate).getDatum())) {
+                return candidate;               // Keep the existing instance since it may
contain useful metadata.
+            }
         }
-        return crs;
+        return ReferencingServices.getInstance().createCompoundCRS(
+                factorySIS.getCRSFactory(),
+                factorySIS.getCSFactory(),
+                derivedFrom(crs), crs, CommonCRS.Vertical.ELLIPSOIDAL.crs());
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/InverseOperationMethod.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/InverseOperationMethod.java?rev=1740206&r1=1740205&r2=1740206&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/InverseOperationMethod.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/InverseOperationMethod.java
[UTF-8] Wed Apr 20 22:12:25 2016
@@ -20,6 +20,7 @@ import java.util.Map;
 import java.util.HashMap;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.measure.unit.Unit;
+import org.opengis.metadata.Identifier;
 import org.opengis.util.InternationalString;
 import org.opengis.parameter.ParameterValue;
 import org.opengis.parameter.ParameterValueGroup;
@@ -34,9 +35,6 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.metadata.iso.ImmutableIdentifier;
 import org.apache.sis.util.Deprecable;
 
-// Branch-dependent imports
-import org.opengis.metadata.Identifier;
-
 
 /**
  * Description of the inverse of another method. This class should be used only when no operation
is defined

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationRegistryTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationRegistryTest.java?rev=1740206&r1=1740205&r2=1740206&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationRegistryTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationRegistryTest.java
[UTF-8] Wed Apr 20 22:12:25 2016
@@ -328,7 +328,7 @@ public final strictfp class CoordinateOp
         } else {
             assertEpsgNameWithoutIdentifierEqual("NTF (Paris) to WGS 84 (1)", operation);
             assertEpsgNameWithoutIdentifierEqual("NTF (Paris)",               operation.getSourceCRS());
-            assertEpsgNameWithoutIdentifierEqual("WGS 84",                    operation.getTargetCRS());
+            assertEquals("name",                 "WGS 84",                    operation.getTargetCRS().getName().getCode());
             assertEpsgNameWithoutIdentifierEqual("NTF (Paris) to NTF (1)",    step1);
             assertEpsgNameWithoutIdentifierEqual("NTF to WGS 84 (1)",         step2);
         }



Mime
View raw message