Author: desruisseaux
Date: Thu Aug 10 23:17:52 2017
New Revision: 1804743

URL: http://svn.apache.org/viewvc?rev=1804743&view=rev
Log:
Add a special case for (inverse projection) → (affine) → (projection) 
transforms.
This allows ConcatenatedTransform to optimize such sequence.
Also provide a few optimized loops for some common cases.

Modified:
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
    
sis/branches/JDK8/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Proj4.java

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java?rev=1804743&r1=1804742&r2=1804743&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
 [UTF-8] Thu Aug 10 23:17:52 2017
@@ -242,12 +242,12 @@ public class CylindricalEqualArea extend
                           final double[] dstPts, int dstOff, int numPts)
             throws TransformException
     {
-        if (srcPts != dstPts || srcOff != dstOff) {
+        if (srcPts != dstPts || srcOff != dstOff || getClass() != 
CylindricalEqualArea.class) {
             super.transform(srcPts, srcOff, dstPts, dstOff, numPts);
         } else {
             dstOff--;
             while (--numPts >= 0) {
-                final double φ = dstPts[dstOff += 2];                   // 
Same as srcPts[srcOff + 1].
+                final double φ = dstPts[dstOff += DIMENSION];           // 
Same as srcPts[srcOff + 1].
                 dstPts[dstOff] = qm_ellipsoid(sin(φ));                  // 
Part of Synder equation (10-15)
             }
         }
@@ -299,7 +299,7 @@ public class CylindricalEqualArea extend
          */
         Spherical(final CylindricalEqualArea other) {
             super(other);
-            
context.getMatrix(ContextualParameters.MatrixRole.DENORMALIZATION).convertAfter(1,
 2, null);
+            
context.getMatrix(ContextualParameters.MatrixRole.DENORMALIZATION).convertAfter(1,
 DIMENSION, null);
         }
 
         /**
@@ -335,7 +335,7 @@ public class CylindricalEqualArea extend
             } else {
                 dstOff--;
                 while (--numPts >= 0) {
-                    final double φ = dstPts[dstOff += 2];           // Same as 
srcPts[srcOff + 1].
+                    final double φ = dstPts[dstOff += DIMENSION];       // 
Same as srcPts[srcOff + 1].
                     dstPts[dstOff] = sin(φ);
                 }
             }

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java?rev=1804743&r1=1804742&r2=1804743&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java
 [UTF-8] Thu Aug 10 23:17:52 2017
@@ -21,6 +21,7 @@ import org.opengis.util.FactoryException
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.MathTransformFactory;
+import org.opengis.referencing.operation.TransformException;
 import org.opengis.referencing.operation.OperationMethod;
 import org.opengis.referencing.operation.Matrix;
 import org.apache.sis.measure.Latitude;
@@ -58,7 +59,7 @@ import static org.apache.sis.internal.ut
  * @author  André Gosselin (MPO)
  * @author  Rueben Schulz (UBC)
  * @author  Rémi Maréchal (Geomatys)
- * @version 0.6
+ * @version 0.8
  * @since   0.6
  * @module
  */
@@ -445,6 +446,36 @@ public class LambertConicConformal exten
     }
 
     /**
+     * Converts a list of coordinate point ordinal values. This method is 
overridden as an optimization only.
+     * It performs the exact same calculation than {@link #transform(double[], 
int, double[], int, boolean)}.
+     *
+     * @throws TransformException if a point can not be converted.
+     */
+    @Override
+    public void transform(final double[] srcPts, int srcOff,
+                          final double[] dstPts, int dstOff, int numPts)
+            throws TransformException
+    {
+        if (srcPts == dstPts && srcOff < dstOff || getClass() != 
LambertConicConformal.class) {
+            super.transform(srcPts, srcOff, dstPts, dstOff, numPts);
+        } else while (--numPts >= 0) {
+            final double θ    = srcPts[srcOff++];
+            final double φ    = srcPts[srcOff++];
+            final double absφ = abs(φ);
+            final double ρ;
+            if (absφ < PI/2) {
+                ρ = pow(expOfNorthing(φ, eccentricity*sin(φ)), n);
+            } else if (absφ < PI/2 + ANGULAR_TOLERANCE) {
+                ρ = (φ*n >= 0) ? POSITIVE_INFINITY : 0;
+            } else {
+                ρ = NaN;
+            }
+            dstPts[dstOff++] = ρ * sin(θ);
+            dstPts[dstOff++] = ρ * cos(θ);
+        }
+    }
+
+    /**
      * Converts the specified (<var>x</var>,<var>y</var>) coordinates and 
stores the (θ,φ) result in {@code dstPts}.
      *
      * @throws ProjectionException if the point can not be converted.
@@ -465,6 +496,24 @@ public class LambertConicConformal exten
         dstPts[dstOff+1] = -φ(pow(hypot(x, y), 1/n));   // Equivalent to 
φ(pow(hypot(x,y), -1/n)) but more accurate for n>0.
     }
 
+    /**
+     * Inverse converts an arbitrary amount of coordinates. This method is 
provided as an optimization only.
+     * Formula shall be a copy of the formula used in {@link 
#inverseTransform(double[], int, double[], int)}.
+     */
+    @Override
+    final void inverseTransform(final double[] srcPts, int srcOff,
+                                final double[] dstPts, int dstOff, int numPts) 
throws ProjectionException
+    {
+        if (getClass() != LambertConicConformal.class) {
+            super.inverseTransform(srcPts, srcOff, dstPts, dstOff, numPts);
+        } else while (--numPts >= 0) {
+            final double x = srcPts[srcOff++];
+            final double y = srcPts[srcOff++];
+            dstPts[dstOff++] = atan2(x, y);
+            dstPts[dstOff++] = -φ(pow(hypot(x, y), 1/n));
+        }
+    }
+
 
     /**
      * Provides the transform equations for the spherical case of the Lambert 
Conformal projection.

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java?rev=1804743&r1=1804742&r2=1804743&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java
 [UTF-8] Thu Aug 10 23:17:52 2017
@@ -32,6 +32,7 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.util.DoubleDouble;
 import org.apache.sis.referencing.operation.matrix.Matrix2;
 import org.apache.sis.referencing.operation.matrix.MatrixSIS;
+import org.apache.sis.referencing.operation.transform.MathTransforms;
 import org.apache.sis.referencing.operation.transform.ContextualParameters;
 import org.apache.sis.parameter.Parameters;
 import org.apache.sis.util.Workaround;
@@ -69,7 +70,7 @@ import static org.apache.sis.internal.ut
  * @author  Rueben Schulz (UBC)
  * @author  Simon Reynard (Geomatys)
  * @author  Rémi Maréchal (Geomatys)
- * @version 0.6
+ * @version 0.8
  *
  * @see TransverseMercator
  *
@@ -386,12 +387,12 @@ public class Mercator extends ConformalP
                           final double[] dstPts, int dstOff, int numPts)
             throws TransformException
     {
-        if (srcPts != dstPts || srcOff != dstOff) {
+        if (srcPts != dstPts || srcOff != dstOff || getClass() != 
Mercator.class) {
             super.transform(srcPts, srcOff, dstPts, dstOff, numPts);
         } else {
             dstOff--;
             while (--numPts >= 0) {
-                final double φ = dstPts[dstOff += 2];                          
 // Same as srcPts[srcOff + 1].
+                final double φ = dstPts[dstOff += DIMENSION];                  
 // Same as srcPts[srcOff + 1].
                 if (φ != 0) {
                     /*
                      * See the javadoc of the Spherical inner class for a note
@@ -428,6 +429,26 @@ public class Mercator extends ConformalP
         dstPts[dstOff+1] = φ(exp(-y));
     }
 
+    /**
+     * Inverse converts an arbitrary amount of coordinates. This method is 
provided as an optimization only.
+     * Formula shall be a copy of the formula used in {@link 
#inverseTransform(double[], int, double[], int)},
+     * except for the copy of {@code x} which can be skipped if the target 
array overwrites the source array.
+     */
+    @Override
+    final void inverseTransform(final double[] srcPts, int srcOff,
+                                final double[] dstPts, int dstOff, int numPts) 
throws ProjectionException
+    {
+        if (srcPts != dstPts || srcOff != dstOff || getClass() != 
Mercator.class) {
+            super.inverseTransform(srcPts, srcOff, dstPts, dstOff, numPts);
+        } else {
+            dstOff--;
+            while (--numPts >= 0) {
+                dstOff += DIMENSION;
+                dstPts[dstOff] = φ(exp(-dstPts[dstOff]));
+            }
+        }
+    }
+
 
     /**
      * Provides the transform equations for the spherical case of the Mercator 
projection.
@@ -521,7 +542,7 @@ public class Mercator extends ConformalP
             } else {
                 dstOff--;
                 while (--numPts >= 0) {
-                    final double φ = dstPts[dstOff += 2];                      
 // Same as srcPts[srcOff + 1].
+                    final double φ = dstPts[dstOff += DIMENSION];              
 // Same as srcPts[srcOff + 1].
                     if (φ != 0) {
                         // See class javadoc for a note about explicit check 
for poles.
                         final double a = abs(φ);
@@ -552,4 +573,27 @@ public class Mercator extends ConformalP
             dstPts[dstOff+1] = PI/2 - 2*atan(exp(-y));              // Part of 
Snyder (7-4);
         }
     }
+
+    /**
+     * Invoked when {@link #tryConcatenate(boolean, MathTransform, 
MathTransformFactory)} detected a
+     * (inverse) → (affine) → (this) transforms sequence.
+     */
+    @Override
+    final MathTransform tryConcatenate(boolean projectedSpace, Matrix affine, 
MathTransformFactory factory)
+            throws FactoryException
+    {
+        /*
+         * Verify that the latitude row is an identity conversion except for 
the sign which is allowed to change
+         * (but no scale and no translation are allowed).  Ignore the 
longitude row because it just pass through
+         * this Mercator projection with no impact on any calculation.
+         */
+        if (affine.getElement(1,0) == 0 && affine.getElement(1, DIMENSION) == 
0 && Math.abs(affine.getElement(1,1)) == 1) {
+            if (factory != null) {
+                return factory.createAffineTransform(affine);
+            } else {
+                return MathTransforms.linear(affine);
+            }
+        }
+        return super.tryConcatenate(projectedSpace, affine, factory);
+    }
 }

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java?rev=1804743&r1=1804742&r2=1804743&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
 [UTF-8] Thu Aug 10 23:17:52 2017
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.referencing.operation.projection;
 
+import java.util.List;
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Objects;
@@ -32,6 +33,7 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.OperationMethod;
 import org.opengis.referencing.operation.TransformException;
 import org.opengis.referencing.operation.MathTransformFactory;
+import org.opengis.referencing.operation.NoninvertibleTransformException;
 import org.opengis.util.FactoryException;
 import org.apache.sis.util.Debug;
 import org.apache.sis.util.CharSequences;
@@ -41,6 +43,8 @@ import org.apache.sis.parameter.Paramete
 import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.referencing.operation.matrix.Matrices;
 import org.apache.sis.referencing.operation.matrix.MatrixSIS;
+import org.apache.sis.referencing.operation.transform.MathTransforms;
+import org.apache.sis.referencing.operation.transform.AbstractMathTransform;
 import org.apache.sis.referencing.operation.transform.AbstractMathTransform2D;
 import org.apache.sis.referencing.operation.transform.ContextualParameters;
 import 
org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory;
@@ -49,9 +53,11 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.metadata.ReferencingServices;
 import org.apache.sis.internal.referencing.Formulas;
 import org.apache.sis.internal.system.Modules;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.util.resources.Errors;
+import org.apache.sis.util.logging.Logging;
 
 import static java.lang.Math.*;
 
@@ -117,7 +123,7 @@ import static java.lang.Math.*;
  * @author  André Gosselin (MPO)
  * @author  Rueben Schulz (UBC)
  * @author  Rémi Maréchal (Geomatys)
- * @version 0.7
+ * @version 0.8
  *
  * @see ContextualParameters
  * @see <a href="http://mathworld.wolfram.com/MapProjection.html";>Map 
projections on MathWorld</a>
@@ -132,6 +138,15 @@ public abstract class NormalizedProjecti
     private static final long serialVersionUID = -4010883312927645853L;
 
     /**
+     * Number of input and output dimensions of all {@code 
NormalizedProjection}.
+     * We define this constant for clarity only; its value shall not be 
modified.
+     *
+     * @see #getSourceDimensions()
+     * @see #getTargetDimensions()
+     */
+    static final int DIMENSION = 2;
+
+    /**
      * Maximum difference allowed when comparing longitudes or latitudes in 
radians.
      * The current value takes the system-wide angular tolerance value 
(equivalent to
      * about 1 cm on Earth) converted to radians.
@@ -695,6 +710,22 @@ public abstract class NormalizedProjecti
             throws ProjectionException;
 
     /**
+     * Inverse converts an arbitrary amount of coordinates. This method is 
invoked only if the conversions can be
+     * applied by a loop with indices in increasing order, without the need to 
copy an array in a temporary buffer.
+     * The default implementation delegates to {@link 
#inverseTransform(double[], int, double[], int)} in a loop,
+     * but subclasses can override.
+     */
+    void inverseTransform(final double[] srcPts, int srcOff,
+                          final double[] dstPts, int dstOff, int numPts) 
throws ProjectionException
+    {
+        while (--numPts >= 0) {
+            inverseTransform(srcPts, srcOff, dstPts, dstOff);
+            srcOff += DIMENSION;
+            dstOff += DIMENSION;
+        }
+    }
+
+    /**
      * Returns the inverse of this map projection.
      * Subclasses do not need to override this method, as they should override
      * {@link #inverseTransform(double[], int, double[], int) 
inverseTransform(…)} instead.
@@ -710,7 +741,7 @@ public abstract class NormalizedProjecti
      * Inverse of a normalized map projection.
      *
      * @author  Martin Desruisseaux (Geomatys)
-     * @version 0.6
+     * @version 0.8
      * @since   0.6
      * @module
      */
@@ -741,13 +772,130 @@ public abstract class NormalizedProjecti
                 return null;
             } else {
                 if (dstPts == null) {
-                    dstPts = new double[2];
+                    dstPts = new double[DIMENSION];
                     dstOff = 0;
                 }
                 inverseTransform(srcPts, srcOff, dstPts, dstOff);
                 return 
Matrices.inverse(NormalizedProjection.this.transform(dstPts, dstOff, null, 0, 
true));
             }
         }
+
+        /**
+         * Inverse transforms an arbitrary amount of coordinates. This method 
delegates to the optimized
+         * {@link NormalizedProjection#inverseTransform(double[], int, 
double[], int, int)} method if possible,
+         * or to the default implementation otherwise.
+         */
+        @Override
+        public void transform(final double[] srcPts, int srcOff,
+                              final double[] dstPts, int dstOff, int numPts) 
throws TransformException
+        {
+            if (srcPts != dstPts || srcOff >= dstOff) {
+                inverseTransform(srcPts, srcOff, dstPts, dstOff, numPts);
+            } else {
+                super.transform(srcPts, srcOff, dstPts, dstOff, numPts);
+            }
+        }
+
+        /**
+         * Concatenates or pre-concatenates in an optimized way this 
projection with the given transform, if possible.
+         * If no optimization is available, returns {@code null}.
+         */
+        @Override
+        protected MathTransform tryConcatenate(final boolean applyOtherFirst, 
final MathTransform other,
+                final MathTransformFactory factory) throws FactoryException
+        {
+            final Matrix m = getMiddleMatrix(this, other, applyOtherFirst);
+            if (m != null) {
+                /*
+                 * 'projectedSpace' values:
+                 *   - false if applyOtherFirst == false since we have 
(inverse projection) → (affine) → (projection).
+                 *   - true  if applyOtherFirst == true  since we have 
(projection) → (affine) → (inverse projection).
+                 */
+                return 
NormalizedProjection.this.tryConcatenate(applyOtherFirst, m, factory);
+            }
+            return super.tryConcatenate(applyOtherFirst, other, factory);
+        }
+    }
+
+    /**
+     * Concatenates or pre-concatenates in an optimized way this projection 
with the given transform, if possible.
+     * If transforms are concatenated in an (inverse projection) → (affine) → 
(projection) sequence where the
+     * (projection) and (inverse projection) steps are the {@linkplain 
#inverse() inverse} of each other,
+     * then in some particular case the sequence can be replaced by a single 
affine transform.
+     * If no such simplification is possible, this method returns {@code null}.
+     *
+     * @return the simplified (usually affine) transform, or {@code null} if 
no such optimization is available.
+     * @throws FactoryException if an error occurred while combining the 
transforms.
+     *
+     * @since 0.8
+     */
+    @Override
+    protected MathTransform tryConcatenate(final boolean applyOtherFirst, 
final MathTransform other,
+            final MathTransformFactory factory) throws FactoryException
+    {
+        final Matrix m = getMiddleMatrix(this, other, applyOtherFirst);
+        if (m != null) {
+            /*
+             * 'projectedSpace' values:
+             *   - false if applyOtherFirst == true  since we have (inverse 
projection) → (affine) → (projection).
+             *   - true  if applyOtherFirst == false since we have 
(projection) → (affine) → (inverse projection).
+             */
+            return tryConcatenate(!applyOtherFirst, m, factory);
+        }
+        return super.tryConcatenate(applyOtherFirst, other, factory);
+    }
+
+    /**
+     * Returns the concatenation of (inverse) → (affine) → (this) transforms, 
or {@code null} if none.
+     * The affine transform is applied in the geographic space with angular 
values in radians.
+     *
+     * <p>Above description is for the usual case where {@code projectedSpace} 
is {@code false}.
+     * If {@code true} (should be unusual), then the affine transform is 
rather applied in the
+     * projected space and the sequence to concatenate is (this) → (affine) → 
(inverse).</p>
+     *
+     * <p>Default implementation returns {@code null}. Subclasses should 
override if applicable.</p>
+     *
+     * @param  projectedSpace  {@code true} if affine transform is applied in 
projected instead than geographic space.
+     * @param  affine          the affine transform in the middle of (inverse) 
→ (affine) → (this) transform sequence.
+     * @param  factory         the factory to use for creating new transform, 
or {@code null}.
+     * @return the optimized concatenation, or {@code null} if none.
+     */
+    MathTransform tryConcatenate(boolean projectedSpace, Matrix affine, 
MathTransformFactory factory)
+            throws FactoryException
+    {
+        return null;
+    }
+
+    /**
+     * If a sequence of 3 transforms are (inverse projection) → (affine) → 
(projection) where
+     * the (projection) and (inverse projection) steps are the inverse of each 
other, returns
+     * the matrix of the affine transform step. Otherwise returns {@code 
null}. This method
+     * accepts also (projection) → (affine) → (inverse projection) sequence, 
but such sequences
+     * should be much more unusual.
+     *
+     * @param  projection       either {@link NormalizedProjection} or {@link 
Inverse}.
+     * @param  other            the arbitrary transforms to be concatenated 
with the given projection.
+     * @param  applyOtherFirst  whether {@code other} is concatenated before 
{@code projection} or the converse.
+     * @return the 3×3 matrix of the affine transform step, or {@code null} if 
none.
+     */
+    static Matrix getMiddleMatrix(final AbstractMathTransform projection, 
final MathTransform other,
+            final boolean applyOtherFirst)
+    {
+        final List<MathTransform> steps = MathTransforms.getSteps(other);
+        if (steps.size() == 2) try {
+            final int oi = applyOtherFirst ? 0 : 1;
+            if (projection.equals(steps.get(oi).inverse(), 
ComparisonMode.IGNORE_METADATA)) {
+                final Matrix m = MathTransforms.getMatrix(steps.get(oi ^ 1));
+                if (Matrices.isAffine(m) && m.getNumRow() == DIMENSION+1 && 
m.getNumCol() == DIMENSION+1) {
+                    return m;
+                }
+            }
+        } catch (NoninvertibleTransformException e) {
+            
Logging.recoverableException(Logging.getLogger(Loggers.COORDINATE_OPERATION),
+                    (projection instanceof NormalizedProjection) ? 
NormalizedProjection.class : projection.getClass(),
+                    "tryConcatenate", e);
+        }
+        return null;
     }
 
     /**

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java?rev=1804743&r1=1804742&r2=1804743&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
 [UTF-8] Thu Aug 10 23:17:52 2017
@@ -792,7 +792,7 @@ public abstract class AbstractMathTransf
     }
 
     /**
-     * Concatenates or pre-concatenates in an optimized way this math 
transform with the given one.
+     * Concatenates or pre-concatenates in an optimized way this math 
transform with the given one, if possible.
      * A new math transform is created to perform the combined transformation.
      * The {@code applyOtherFirst} value determines the transformation order 
as bellow:
      *
@@ -807,7 +807,7 @@ public abstract class AbstractMathTransf
      *
      * If no special optimization is available for the combined transform, 
then this method returns {@code null}.
      * In the later case, the concatenation will be prepared by {@link 
DefaultMathTransformFactory} using a generic
-     * {@link ConcatenatedTransform}.
+     * implementation.
      *
      * <p>The default implementation always returns {@code null}. This method 
is ought to be overridden
      * by subclasses capable of concatenating some combination of transforms 
in a special way.</p>
@@ -816,7 +816,7 @@ public abstract class AbstractMathTransf
      *                          {@code false} if the transformation order is 
{@code this} followed by {@code other}.
      * @param  other            the other math transform to (pre-)concatenate 
with this transform.
      * @param  factory          the factory which is (indirectly) invoking 
this method, or {@code null} if none.
-     * @return the combined math transform, or {@code null} if no optimized 
combined transform is available.
+     * @return the math transforms combined in an optimized way, or {@code 
null} if no such optimization is available.
      * @throws FactoryException if an error occurred while combining the 
transforms.
      *
      * @see 
DefaultMathTransformFactory#createConcatenatedTransform(MathTransform, 
MathTransform)

Modified: 
sis/branches/JDK8/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Proj4.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Proj4.java?rev=1804743&r1=1804742&r2=1804743&view=diff
==============================================================================
--- 
sis/branches/JDK8/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Proj4.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Proj4.java
 [UTF-8] Thu Aug 10 23:17:52 2017
@@ -308,7 +308,7 @@ public final class Proj4 extends Static
      * Creates a new CRS from the given {@literal Proj.4} definition string.
      * Some examples of definition strings are:
      * <ul>
-     *   <li>{@code "+init=epsg:3395"} (see warning below)</li>
+     *   <li>{@code "+init=epsg:3395 +over"} (see warning below)</li>
      *   <li>{@code "+proj=latlong +datum=WGS84 +ellps=WGS84 
+towgs84=0,0,0"}</li>
      *   <li>{@code "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 
+units=m +ellps=WGS84 +towgs84=0,0,0"}</li>
      * </ul>


Reply via email to