sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1714051 - in /sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis: internal/referencing/provider/ referencing/operation/transform/
Date Thu, 12 Nov 2015 14:19:28 GMT
Author: desruisseaux
Date: Thu Nov 12 14:19:28 2015
New Revision: 1714051

URL: http://svn.apache.org/viewvc?rev=1714051&view=rev
Log:
Provide link to SIS tasks and remove a method not needed anymore.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffineBetweenGeographic.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.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/ScaleTransform.java

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffineBetweenGeographic.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffineBetweenGeographic.java?rev=1714051&r1=1714050&r2=1714051&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffineBetweenGeographic.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffineBetweenGeographic.java
[UTF-8] Thu Nov 12 14:19:28 2015
@@ -22,7 +22,6 @@ import org.opengis.util.FactoryException
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
-import org.opengis.parameter.InvalidParameterValueException;
 import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.MathTransformFactory;
 import org.opengis.referencing.operation.NoninvertibleTransformException;
@@ -31,7 +30,6 @@ import org.apache.sis.metadata.iso.citat
 import org.apache.sis.parameter.ParameterBuilder;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.parameter.Parameters;
-import org.apache.sis.util.resources.Errors;
 
 
 /**
@@ -111,27 +109,6 @@ public abstract class GeocentricAffineBe
     }
 
     /**
-     * Returns the number of dimensions declared in the given parameter group, or 0 if none.
-     * If this method returns a non-zero value, then it is guaranteed to be either 2 or 3.
-     *
-     * @param  values The values from which to get the dimension.
-     * @return The dimension, or 0 if none.
-     * @throws InvalidParameterValueException if the dimension parameter has an invalid value.
-     */
-    static int getDimension(final Parameters values) throws InvalidParameterValueException
{
-        final Integer value = values.getValue(DIMENSION);
-        if (value == null) {
-            return 0;
-        }
-        final int dimension = value;  // Unboxing.
-        if (dimension != 2 && dimension != 3) {
-            throw new InvalidParameterValueException(Errors.format(
-                    Errors.Keys.IllegalArgumentValue_2, "dim", value), "dim", value);
-        }
-        return dimension;
-    }
-
-    /**
      * Creates a math transform from the specified group of parameter values.
      * This method wraps the affine operation into Geographic/Geocentric conversions.
      *

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java?rev=1714051&r1=1714050&r2=1714051&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java
[UTF-8] Thu Nov 12 14:19:28 2015
@@ -26,6 +26,7 @@ import org.opengis.parameter.ParameterVa
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.opengis.parameter.ParameterNotFoundException;
+import org.opengis.parameter.InvalidParameterValueException;
 import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.MathTransformFactory;
 import org.opengis.referencing.operation.OperationMethod;
@@ -37,6 +38,7 @@ import org.apache.sis.referencing.operat
 import org.apache.sis.internal.referencing.NilReferencingObject;
 import org.apache.sis.internal.referencing.Formulas;
 import org.apache.sis.internal.util.Constants;
+import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.Debug;
 
@@ -222,9 +224,14 @@ public final class Molodensky extends Ge
     static MathTransform createMathTransform(final MathTransformFactory factory, final Parameters
values,
             int sourceDimensions, int targetDimensions, final boolean isAbridged) throws
FactoryException
     {
-        int dimension = getDimension(values);
-        if (dimension != 0) {
-            sourceDimensions = targetDimensions = dimension;
+        final Integer dim = values.getValue(DIMENSION);
+        if (dim != null) {
+            final int n = dim;  // Unboxing.
+            if (n != 2 && n != 3) {
+                throw new InvalidParameterValueException(Errors.format(
+                        Errors.Keys.IllegalArgumentValue_2, "dim", dim), "dim", dim);
+            }
+            sourceDimensions = targetDimensions = n;
         }
         /*
          * Following method calls implicitly convert parameter values to metres.

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=1714051&r1=1714050&r2=1714051&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] Thu Nov 12 14:19:28 2015
@@ -109,7 +109,8 @@ public class EllipsoidToCentricTransform
      * Whether the output coordinate system is Cartesian or Spherical.
      *
      * <p><b>TODO:</b> The spherical case is not yet implemented.
-     * We could also consider supporting the cylindrical case, but its usefulness is not
obvious.</p>
+     * We could also consider supporting the cylindrical case, but its usefulness is not
obvious.
+     * See <a href="http://issues.apache.org/jira/browse/SIS-302">SIS-302</a>.</p>
      *
      * @author  Martin Desruisseaux (Geomatys)
      * @since   0.7

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ScaleTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ScaleTransform.java?rev=1714051&r1=1714050&r2=1714051&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ScaleTransform.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ScaleTransform.java
[UTF-8] Thu Nov 12 14:19:28 2015
@@ -37,6 +37,8 @@ import org.apache.sis.util.ArraysExt;
  * @since   0.7
  * @version 0.7
  * @module
+ *
+ * @see <a href="http://issues.apache.org/jira/browse/SIS-176">SIS-176</a>
  */
 final class ScaleTransform extends AbstractLinearTransform implements ExtendedPrecisionMatrix
{
     /**



Mime
View raw message