sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1600602 - in /sis/branches/JDK8: ./ core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/
Date Thu, 05 Jun 2014 11:14:03 GMT
Author: desruisseaux
Date: Thu Jun  5 11:14:02 2014
New Revision: 1600602

URL: http://svn.apache.org/r1600602
Log:
Javadoc.

Added:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html
      - copied, changed from r1599816, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/formulas.html
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java
  (with props)
Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform2D.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/LinearTransform.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/ProjectiveTransform.java
    sis/branches/JDK8/pom.xml

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=1600602&r1=1600601&r2=1600602&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 Jun  5 11:14:02 2014
@@ -62,11 +62,6 @@ import static org.apache.sis.util.Argume
  * However more performance may be gained by overriding the other {@code transform} methods
as well.
  *
  * {@section Immutability and thread safety}
- * This base class is immutable and thus thread-safe if the property <em>values</em>
(not necessarily the map itself)
- * given to the constructor are also immutable. Most SIS subclasses and related classes are
immutable under similar
- * conditions.
- *
- * {@section Immutability and thread safety}
  * All Apache SIS implementations of {@code MathTransform} are immutable and thread-safe.
  * It is highly recommended that third-party implementations be immutable and thread-safe
too.
  * This means that unless otherwise noted in the javadoc, {@code MathTransform} instances
can
@@ -75,8 +70,8 @@ import static org.apache.sis.util.Argume
  * {@section Serialization}
  * {@code MathTransform} may or may not be serializable, at implementation choices.
  * Most Apache SIS implementations are serializable, but the serialized objects are not guaranteed
to be compatible
- * with future SIS versions. Serialization, if allowed by the subclass, should be used only
for short term storage
- * or RMI between applications running the same SIS version.
+ * with future SIS versions. Serialization should be used only for short term storage or
RMI between applications
+ * running the same SIS version.
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.5 (derived from geotk-1.2)
@@ -122,7 +117,7 @@ public abstract class AbstractMathTransf
     private transient int hashCode;
 
     /**
-     * Constructs a math transform.
+     * Constructor for subclasses.
      */
     protected AbstractMathTransform() {
     }
@@ -145,9 +140,12 @@ public abstract class AbstractMathTransf
 
     /**
      * Returns the parameter descriptors for this math transform, or {@code null} if unknown.
+     *
+     * <span class="note"><b>Relationship with ISO 19111:</b>
      * This method is similar to {@link OperationMethod#getParameters()}, except that typical
      * {@link MathTransform} implementations return parameters in standard units (usually
      * {@linkplain SI#METRE metres} or {@linkplain NonSI#DEGREE_ANGLE decimal degrees}).
+     * </span>
      *
      * @return The parameter descriptors for this math transform, or {@code null}.
      *
@@ -160,13 +158,16 @@ public abstract class AbstractMathTransf
 
     /**
      * Returns a copy of the parameter values for this math transform, or {@code null} if
unknown.
+     * Since this method returns a copy of the parameter values, any change to a value will
have no
+     * effect on this math transform.
+     *
+     * <span class="note"><b>Relationship with ISO 19111:</b>
      * This method is similar to {@link SingleOperation#getParameterValues()}, except that
typical
      * {@link MathTransform} implementations return parameters in standard units (usually
      * {@linkplain SI#METRE metres} or {@linkplain NonSI#DEGREE_ANGLE decimal degrees}).
+     * </span>
      *
      * @return A copy of the parameter values for this math transform, or {@code null}.
-     *         Since this method returns a copy of the parameter values, any change to
-     *         a value will have no effect on this math transform.
      *
      * @see SingleOperation#getParameterValues()
      */

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java?rev=1600602&r1=1600601&r2=1600602&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java
[UTF-8] Thu Jun  5 11:14:02 2014
@@ -32,6 +32,13 @@ import static org.apache.sis.util.Argume
  * One-dimensional math transforms are not required to extend this class,
  * however doing so may simplify their implementation.
  *
+ * <p>The simplest way to implement this abstract class is to provide an implementation
for the following methods
+ * only:</p>
+ * <ul>
+ *   <li>{@link #transform(double)}</li>
+ *   <li>{@link #derivative(double)}</li>
+ * </ul>
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.5 (derived from geotk-3.17)
  * @version 0.5
@@ -39,7 +46,7 @@ import static org.apache.sis.util.Argume
  */
 public abstract class AbstractMathTransform1D extends AbstractMathTransform implements MathTransform1D
{
     /**
-     * Constructs a default math transform.
+     * Constructor for subclasses.
      */
     protected AbstractMathTransform1D() {
     }
@@ -61,6 +68,16 @@ public abstract class AbstractMathTransf
     }
 
     /**
+     * Transforms the specified value.
+     *
+     * @param  value The value to transform.
+     * @return the transformed value.
+     * @throws TransformException if the value can not be transformed.
+     */
+    @Override
+    public abstract double transform(double value) throws TransformException;
+
+    /**
      * Transforms a single point in the given array and opportunistically computes its derivative
if requested.
      * The default implementation delegates to {@link #transform(double)} and potentially
to {@link #derivative(double)}.
      * Subclasses may override this method for performance reason.
@@ -81,6 +98,17 @@ public abstract class AbstractMathTransf
     }
 
     /**
+     * Gets the derivative of this function at a value. The derivative is the 1×1 matrix
+     * of the non-translating portion of the approximate affine map at the value.
+     *
+     * @param  value The value where to evaluate the derivative.
+     * @return The derivative at the specified point.
+     * @throws TransformException if the derivative can not be evaluated at the specified
point.
+     */
+    @Override
+    public abstract double derivative(double value) throws TransformException;
+
+    /**
      * Gets the derivative of this transform at a point. The default implementation ensures
that
      * {@code point} is one-dimensional, then delegates to {@link #derivative(double)}.
      *

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform2D.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform2D.java?rev=1600602&r1=1600601&r2=1600602&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform2D.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform2D.java
[UTF-8] Thu Jun  5 11:14:02 2014
@@ -39,6 +39,14 @@ import org.apache.sis.util.resources.Err
  * Two-dimensional math transforms are not required to extend this class,
  * however doing so may simplify their implementation.
  *
+ * <p>The simplest way to implement this abstract class is to provide an implementation
for the following methods
+ * only:</p>
+ * <ul>
+ *   <li>{@link #transform(double[], int, double[], int, boolean)}</li>
+ * </ul>
+ *
+ * However more performance may be gained by overriding the other {@code transform} methods
as well.
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.5 (derived from geotk-2.0)
  * @version 0.5
@@ -46,7 +54,7 @@ import org.apache.sis.util.resources.Err
  */
 public abstract class AbstractMathTransform2D extends AbstractMathTransform implements MathTransform2D
{
     /**
-     * Constructs a default math transform.
+     * Constructor for subclasses.
      */
     protected AbstractMathTransform2D() {
     }

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=1600602&r1=1600601&r2=1600602&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] Thu Jun  5 11:14:02 2014
@@ -394,6 +394,8 @@ class ConcatenatedTransform extends Abst
      * transforms, i.e. all nested concatenated transforms (if any) have been expanded.
      *
      * @return All single math transforms performed by this concatenated transform.
+     *
+     * @see MathTransforms#getSteps(MathTransform)
      */
     public final List<MathTransform> getSteps() {
         final List<MathTransform> transforms = new ArrayList<>(5);

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java?rev=1600602&r1=1600601&r2=1600602&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java
[UTF-8] Thu Jun  5 11:14:02 2014
@@ -21,11 +21,14 @@ import org.opengis.referencing.operation
 
 
 /**
- * A {@link MathTransform} which convert coordinates using only linear equations.
- * Such transform can be represented by a {@linkplain #getMatrix() matrix}.
- * Those transforms are often affine, but not necessarily.
+ * A usually affine, or otherwise a projective transform, which convert coordinates using
only linear equations.
+ * A projective transform is capable of mapping an arbitrary quadrilateral into another arbitrary
quadrilateral,
+ * while preserving the straightness of lines. In the special case where the transform is
affine, the parallelism
+ * of lines in the source is preserved in the output.
+ *
+ * <p>Such a coordinate transformation can be represented by a matrix of arbitrary
size, which is given by the
+ * {@link #getMatrix()} method. The relationship between matrix size and transform dimensions
is as below:</p>
  *
- * <p>Relationships:</p>
  * <ul>
  *   <li>The {@linkplain Matrix#getNumCol() number of columns} in the matrix is equal
to
  *       the number of {@linkplain #getSourceDimensions() source dimensions} plus 1</li>
@@ -33,26 +36,42 @@ import org.opengis.referencing.operation
  *       the number of {@linkplain #getTargetDimensions() target dimensions} plus 1.</li>
  * </ul>
  *
+ * {@section Affine transform}
+ * In most cases the transform in affine. For such transforms, the last matrix row contains
only zero values
+ * except in the last column, which contains 1. For example a conversion from projected coordinates
(metres)
+ * to display coordinates (pixel) can be done as below:
+ *
+ * <center><p>
+ * <img src="../matrix/doc-files/AffineTransform.png" alt="Matrix representation of an
affine transform">
+ * </p></center>
+ *
+ * {@section Projective transform}
+ * If the last matrix row does not met the above constraints, then the transform is not affine.
+ * A <cite>projective</cite> transform can be used as a generalization of affine
transforms.
+ * In such case the computation performed by SIS is similar to {@code PerspectiveTransform}
+ * in <cite>Java Advanced Imaging</cite>.
+ *
+ * <p>For example a square matrix of size 4×4 is used for transforming three-dimensional
coordinates.
+ * The transformed points {@code (x',y',z')} are computed as below:</p>
+ *
+ * <blockquote>{@include formulas.html#ProjectiveTransform}</blockquote>
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  *
- * @see MathTransforms#getMatrix(MathTransform)
+ * @see <a href="http://mathworld.wolfram.com/AffineTransformation.html">Affine transformation
on MathWorld</a>
  */
 public interface LinearTransform extends MathTransform {
     /**
      * Returns the coefficients of this linear transform as a matrix.
      * Converting a coordinate with this {@code MathTransform} is equivalent to multiplying
the
      * returned matrix by a vector containing the ordinate values with an additional 1 in
the last row.
-     * For example if this transform converts projected coordinates (metres) to display coordinates
(pixel),
-     * then the same conversions can be done by the returned matrix as below:
-     *
-     * <center><p>
-     * <img src="../matrix/doc-files/AffineTransform.png" alt="Matrix representation of
an affine transform">
-     * </p></center>
      *
      * @return The coefficients of this linear transform as a matrix.
+     *
+     * @see MathTransforms#getMatrix(MathTransform)
      */
     Matrix getMatrix();
 }

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=1600602&r1=1600601&r2=1600602&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] Thu Jun  5 11:14:02 2014
@@ -16,6 +16,8 @@
  */
 package org.apache.sis.referencing.operation.transform;
 
+import java.util.List;
+import java.util.Collections;
 import java.awt.geom.AffineTransform;
 import org.opengis.geometry.MismatchedDimensionException;
 import org.opengis.referencing.operation.Matrix;
@@ -33,9 +35,8 @@ import static org.apache.sis.util.Argume
 
 
 /**
- * Utility methods related to {@link MathTransform}s. This class centralizes in one place
some of the
- * most commonly used functions from the {@link org.apache.sis.referencing.operation.transform}
package,
- * thus reducing the need to explore that low-level package.
+ * Utility methods creating or working on {@link MathTransform} instances.
+ * This class centralizes in one place some of the most commonly used functions this package.
  * The {@code MathTransforms} class provides the following services:
  *
  * <ul>
@@ -66,8 +67,8 @@ public final class MathTransforms extend
      *
      * <p>Special cases:</p>
      * <ul>
-     *   <li>If {@code dimension} == 1, then the returned transform implements {@link
MathTransform1D}.</li>
-     *   <li>If {@code dimension} == 2, then the returned transform implements {@link
MathTransform2D}.</li>
+     *   <li>If {@code dimension == 1}, then the returned transform implements {@link
MathTransform1D}.</li>
+     *   <li>If {@code dimension == 2}, then the returned transform implements {@link
MathTransform2D}.</li>
      * </ul>
      *
      * @param dimension The dimension of the transform to be returned.
@@ -82,7 +83,7 @@ public final class MathTransforms extend
      * Creates a one-dimensional affine transform for the given coefficients.
      * Input values <var>x</var> will be converted into output values <var>y</var>
using the following equation:
      *
-     * <blockquote><var>y</var>  =  <var>x</var> × {@code
scale} + {@code offset}</blockquote>
+     * <blockquote><var>y</var>  =  <var>x</var> ⋅ {@code
scale} + {@code offset}</blockquote>
      *
      * @param  scale  The {@code scale}  term in the linear equation.
      * @param  offset The {@code offset} term in the linear equation.
@@ -93,14 +94,14 @@ public final class MathTransforms extend
     }
 
     /**
-     * Creates an arbitrary linear transform from the specified matrix.
-     * If the transform input dimension is {@code M}, and output dimension is {@code N},
then the
-     * given matrix shall 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 {@code [M][j]} element of the matrix
will
-     * be the <var>j</var>'th ordinate of the moved origin.
-     *
-     * <p>The matrix is usually square and affine, but this is not mandatory.
-     * Non-affine transforms are allowed.</p>
+     * Creates an arbitrary linear transform from the specified matrix. Usually the matrix
+     * {@linkplain org.apache.sis.referencing.operation.matrix.MatrixSIS#isAffine() is affine},
+     * but this is not mandatory. Non-affine matrix will define a projective transform.
+     *
+     * <p>If the transform input dimension is {@code M}, and output dimension is {@code
N},
+     * then the given matrix shall 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 {@code [M][j]} element of the matrix will be the <var>j</var>'th ordinate
of the moved origin.</p>
      *
      * @param  matrix The matrix used to define the linear transform.
      * @return The linear (usually affine) transform.
@@ -243,18 +244,44 @@ public final class MathTransforms extend
     }
 
     /**
+     * Returns all single components of the given (potentially concatenated) transform.
+     * This method makes the following choice:
+     *
+     * <ul>
+     *   <li>If {@code transform} is {@code null}, returns an empty list.</li>
+     *   <li>Otherwise if {@code transform} is the result of a call to a {@code concatenate(…)}
method,
+     *       returns all components. All nested concatenated transforms (if any) will be
expanded.</li>
+     *   <li>Otherwise returns the given transform in a list of size 1.</li>
+     * </ul>
+     *
+     * @param  transform The transform for which to get the components, or {@code null}.
+     * @return All single math transforms performed by this concatenated transform.
+     */
+    public static List<MathTransform> getSteps(final MathTransform transform) {
+        if (transform != null) {
+            if (transform instanceof ConcatenatedTransform) {
+                return ((ConcatenatedTransform) transform).getSteps();
+            } else {
+                return Collections.singletonList(transform);
+            }
+        } else {
+            return Collections.emptyList();
+        }
+    }
+
+    /**
      * If the given transform is linear, returns its coefficients as a matrix.
      * More specifically:
      *
      * <ul>
-     *   <li>If the given transform is an instance of {@link LinearTransform}, returns
-     *       {@link LinearTransform#getMatrix()}.</li>
+     *   <li>If the given transform is an instance of {@link LinearTransform},
+     *       returns {@link LinearTransform#getMatrix()}.</li>
      *   <li>Otherwise if the given transform is an instance of {@link AffineTransform},
-     *       returns its coefficients in a {@link Matrix3} instance.</li>
+     *       returns its coefficients in a {@link org.apache.sis.referencing.operation.matrix.Matrix3}
instance.</li>
      *   <li>Otherwise returns {@code null}.</li>
      * </ul>
      *
-     * @param  transform The transform, or {@code null}.
+     * @param  transform The transform for which to get the matrix, or {@code null}.
      * @return The matrix of the given transform, or {@code null} if none.
      */
     public static Matrix getMatrix(final MathTransform transform) {

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform.java?rev=1600602&r1=1600601&r2=1600602&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform.java
[UTF-8] Thu Jun  5 11:14:02 2014
@@ -24,7 +24,6 @@ import org.opengis.parameter.ParameterDe
 import org.opengis.referencing.operation.Matrix;
 import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.NoninvertibleTransformException;
-
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.parameter.TensorParameters;
 import org.apache.sis.referencing.operation.provider.Affine;
@@ -33,37 +32,12 @@ import org.apache.sis.referencing.operat
 
 
 /**
- * A usually affine, or otherwise a projective transform. A projective transform is capable
of
- * mapping an arbitrary quadrilateral into another arbitrary quadrilateral, while preserving
the
- * straightness of lines. In the special case where the transform is affine, the parallelism
of
- * lines in the source is preserved in the output.
- *
- * <p>Such a coordinate transformation can be represented by a square {@linkplain MatrixSIS
matrix}
- * of arbitrary size. Point coordinates must have a dimension equal to the matrix size minus
one.
- * For example a square matrix of size 4×4 is used for transforming three-dimensional coordinates.
- * The transformed points {@code (x',y',z')} are computed as below (note that this computation
is
- * similar to {@code PerspectiveTransform} in <cite>Java Advanced Imaging</cite>):
- *
- * <table class="compact" summary="Projective transform matrix">
- * <tr><td nowrap>
- * {@preformat text
- *     x' = u/t
- *     y' = v/t
- *     y' = w/t
- * }
- * </td><td><blockquote>where {@code (u,v,w)} are obtained by:</blockquote></td><td
nowrap>
- * {@preformat text
- *     ┌   ┐     ┌                    ┐ ┌   ┐
- *     │ u │     │ m00  m01  m02  m03 │ │ x │
- *     │ v │  =  │ m10  m11  m12  m13 │ │ y │
- *     │ w │     │ m20  m21  m22  m23 │ │ z │
- *     │ t │     │ m30  m31  m32  m33 │ │ 1 │
- *     └   ┘     └                    ┘ └   ┘
- * }
- * </td></tr></table>
+ * A usually affine, or otherwise a projective transform for the generic cases.
+ * This implementation is used for cases other than identity, 1D, 2D or axis swapping.
  *
- * In the special case of an affine transform, the last row contains only zero values except
in the last column,
- * which contains 1.
+ * <p>A projective transform is capable of mapping an arbitrary quadrilateral into
another arbitrary quadrilateral,
+ * while preserving the straightness of lines. In the special case where the transform is
affine, the parallelism of
+ * lines in the source is preserved in the output.</p>
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.5 (derived from geotk-1.2)
@@ -71,9 +45,8 @@ import org.apache.sis.referencing.operat
  * @module
  *
  * @see java.awt.geom.AffineTransform
- * @see <a href="http://mathworld.wolfram.com/AffineTransformation.html">Affine transformation
on MathWorld</a>
  */
-public class ProjectiveTransform extends AbstractMathTransform implements LinearTransform,
Serializable {
+class ProjectiveTransform extends AbstractMathTransform implements LinearTransform, Serializable
{
     /**
      * Serial number for inter-operability with different versions.
      */
@@ -123,7 +96,7 @@ public class ProjectiveTransform extends
      * Gets the dimension of input points.
      */
     @Override
-    public int getSourceDimensions() {
+    public final int getSourceDimensions() {
         return numCol - 1;
     }
 
@@ -131,7 +104,7 @@ public class ProjectiveTransform extends
      * Gets the dimension of output points.
      */
     @Override
-    public int getTargetDimensions() {
+    public final int getTargetDimensions() {
         return numRow - 1;
     }
 

Copied: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html
(from r1599816, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/formulas.html)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html?p2=sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html&p1=sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/formulas.html&r1=1599816&r2=1600602&rev=1600602&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/formulas.html
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html
[UTF-8] Thu Jun  5 11:14:02 2014
@@ -21,13 +21,13 @@
 
 <html>
   <head>
-    <title>Datum formulas</title>
+    <title>MathTransform formulas</title>
     <meta charset="UTF-8">
   </head>
   <body>
-    <h1>Datum formulas</h1>
+    <h1>MathTransform formulas</h1>
     <div>This file contains formulas written in MathML for inclusion in the Javadoc
of some classes in the
-    <code>org.apache.sis.referencing.datum</code> package.
+    <code>org.apache.sis.referencing.operation.transform</code> package.
     Those formulas are provided in separated files for easier edition and for avoiding <code>javac</code>
or
     <code>javadoc</code> “<cite>unknown HTML tag</cite>” errors
with JDK 8.
     Fragment of this files are inserted in the Javadoc by the following tag:
@@ -38,53 +38,80 @@
     the parts to copy in the javadoc.
     The <code>{@include}</code> taglet is defined in the <code>sis-build-helper</code>
module.</div>
 
-    <h2>Bursa-Wolf</h2>
-    <math display="block" alttext="MathML capable browser required">
-      <mfenced open="[" close="]">
-        <mtable>
-          <mtr><mtd><msub><mi>X</mi><mi>t</mi></msub></mtd></mtr>
-          <mtr><mtd><msub><mi>Y</mi><mi>t</mi></msub></mtd></mtr>
-          <mtr><mtd><msub><mi>Z</mi><mi>t</mi></msub></mtd></mtr>
-        </mtable>
-      </mfenced>
-      <mo>=</mo>
-      <mo>(</mo><mn>1</mn><mo>+</mo><mi>dS</mi><mo>)</mo>
-      <mo>⋅</mo>
-      <mfenced open="[" close="]">
-        <mtable>
-          <mtr>
-            <mtd><mn>1</mn></mtd>
-            <mtd><mo>-</mo><msub><mi>r</mi><mi>z</mi></msub></mtd>
-            <mtd><mo>+</mo><msub><mi>r</mi><mi>y</mi></msub></mtd>
-          </mtr>
-          <mtr>
-            <mtd><mo>+</mo><msub><mi>r</mi><mi>z</mi></msub></mtd>
-            <mtd><mn>1</mn></mtd>
-            <mtd><mo>-</mo><msub><mi>r</mi><mi>x</mi></msub></mtd>
-          </mtr>
-          <mtr>
-            <mtd><mo>-</mo><msub><mi>r</mi><mi>y</mi></msub></mtd>
-            <mtd><mo>+</mo><msub><mi>r</mi><mi>x</mi></msub></mtd>
-            <mtd><mn>1</mn></mtd>
-          </mtr>
-        </mtable>
-      </mfenced>
-      <mo>×</mo>
-      <mfenced open="[" close="]">
-        <mtable>
-          <mtr><mtd><msub><mi>X</mi><mi>s</mi></msub></mtd></mtr>
-          <mtr><mtd><msub><mi>Y</mi><mi>s</mi></msub></mtd></mtr>
-          <mtr><mtd><msub><mi>Z</mi><mi>s</mi></msub></mtd></mtr>
-        </mtable>
-      </mfenced>
-      <mo>+</mo>
-      <mfenced open="[" close="]">
-        <mtable>
-          <mtr><mtd><msub><mi>t</mi><mi>x</mi></msub></mtd></mtr>
-          <mtr><mtd><msub><mi>t</mi><mi>y</mi></msub></mtd></mtr>
-          <mtr><mtd><msub><mi>t</mi><mi>z</mi></msub></mtd></mtr>
-        </mtable>
-      </mfenced>
-    </math>
+    <h2>ProjectiveTransform</h2>
+    <table class="compact" summary="Projective transform matrix">
+      <tr><td nowrap>
+        <math display="block" alttext="MathML capable browser required">
+          <mfenced open="[" close="]">
+            <mtable>
+              <mtr><mtd><mi>x</mi><mo>'</mo></mtd></mtr>
+              <mtr><mtd><mi>y</mi><mo>'</mo></mtd></mtr>
+              <mtr><mtd><mi>z</mi><mo>'</mo></mtd></mtr>
+            </mtable>
+          </mfenced>
+          <mo>=</mo>
+          <mfenced open="[" close="]">
+            <mtable>
+              <mtr><mtd><mi>u</mi><mo>/</mo><mi>t</mi></mtd></mtr>
+              <mtr><mtd><mi>v</mi><mo>/</mo><mi>t</mi></mtd></mtr>
+              <mtr><mtd><mi>w</mi><mo>/</mo><mi>t</mi></mtd></mtr>
+            </mtable>
+          </mfenced>
+        </math>
+
+        </td><td style="vertical-align: middle" >
+          <blockquote>where <var>u</var>, <var>v</var>, <var>w</var>
and <var>t</var> are obtained by</blockquote>
+        </td><td nowrap>
+
+        <math display="block" alttext="MathML capable browser required">
+          <mfenced open="[" close="]">
+            <mtable>
+              <mtr><mtd><mi>u</mi></mtd></mtr>
+              <mtr><mtd><mi>v</mi></mtd></mtr>
+              <mtr><mtd><mi>w</mi></mtd></mtr>
+              <mtr><mtd><mi>t</mi></mtd></mtr>
+            </mtable>
+          </mfenced>
+          <mo>=</mo>
+          <mfenced open="[" close="]">
+            <mtable>
+              <mtr>
+                <mtd><msub><mi>m</mi><mn>00</mn></msub></mtd>
+                <mtd><msub><mi>m</mi><mn>01</mn></msub></mtd>
+                <mtd><msub><mi>m</mi><mn>02</mn></msub></mtd>
+                <mtd><msub><mi>m</mi><mn>03</mn></msub></mtd>
+              </mtr>
+              <mtr>
+                <mtd><msub><mi>m</mi><mn>10</mn></msub></mtd>
+                <mtd><msub><mi>m</mi><mn>11</mn></msub></mtd>
+                <mtd><msub><mi>m</mi><mn>12</mn></msub></mtd>
+                <mtd><msub><mi>m</mi><mn>13</mn></msub></mtd>
+              </mtr>
+              <mtr>
+                <mtd><msub><mi>m</mi><mn>20</mn></msub></mtd>
+                <mtd><msub><mi>m</mi><mn>21</mn></msub></mtd>
+                <mtd><msub><mi>m</mi><mn>22</mn></msub></mtd>
+                <mtd><msub><mi>m</mi><mn>23</mn></msub></mtd>
+              </mtr>
+              <mtr>
+                <mtd><msub><mi>m</mi><mn>30</mn></msub></mtd>
+                <mtd><msub><mi>m</mi><mn>31</mn></msub></mtd>
+                <mtd><msub><mi>m</mi><mn>32</mn></msub></mtd>
+                <mtd><msub><mi>m</mi><mn>33</mn></msub></mtd>
+              </mtr>
+            </mtable>
+          </mfenced>
+          <mo>×</mo>
+          <mfenced open="[" close="]">
+            <mtable>
+              <mtr><mtd><mi>x</mi></mtd></mtr>
+              <mtr><mtd><mi>y</mi></mtd></mtr>
+              <mtr><mtd><mi>z</mi></mtd></mtr>
+              <mtr><mtd><mn>1</mn></mtd></mtr>
+            </mtable>
+          </mfenced>
+        </math>
+      </td></tr>
+    </table>
   </body>
 </html>

Added: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java?rev=1600602&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java
(added)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java
[UTF-8] Thu Jun  5 11:14:02 2014
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+/**
+ * {@code MathTransform} implementations for conversions or transformations of multi-dimensional
coordinate points.
+ * A {@code MathTransform} usually performs conversions or transformations from points given
in a
+ * {@linkplain org.apache.sis.referencing.operation.DefaultCoordinateOperation#getSourceCRS()
+ * source coordinate reference system} to coordinate values for the same points in the
+ * {@linkplain org.apache.sis.referencing.operation.DefaultCoordinateOperation#getTargetCRS()
+ * target coordinate reference system}. However the conversions are not necessarily between
CRS;
+ * a {@code MathTransform} can also be used for converting the sample values in a raster
for example.
+ *
+ * <p>This package does not include map projections, which are a special kind of transforms
defined
+ * in their own {@linkplain org.apache.sis.referencing.operation.projection projection} package.</p>
+ *
+ * @author  Martin Desruisseaux (IRD, Geomatys)
+ * @since   0.5 (derived from geotk-1.2)
+ * @version 0.5
+ * @module
+ */
+package org.apache.sis.referencing.operation.transform;

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

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

Modified: sis/branches/JDK8/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/pom.xml?rev=1600602&r1=1600601&r2=1600602&view=diff
==============================================================================
--- sis/branches/JDK8/pom.xml (original)
+++ sis/branches/JDK8/pom.xml Thu Jun  5 11:14:02 2014
@@ -567,6 +567,7 @@ Apache SIS is a free software, Java lang
           <locale>${website.locale}</locale>                    <!-- Locale
for navigation bar, help file contents, etc. -->
           <author>false</author>                                <!-- Excludes
the authors text in the generated docs. -->
           <version>false</version>                              <!-- Excludes
the version text in the generated docs. -->
+          <nosince>true</nosince>                               <!-- Omits
the "Since" sections associated with the since tags. -->
           <noqualifier>all</noqualifier>                        <!-- Omit
qualifying package name before class names in output. -->
           <quiet>true</quiet>                                   <!-- Shuts
off non-error and non-warning messages. -->
           <keywords>true</keywords>                             <!-- Adds
HTML meta keyword tags to the generated files. -->
@@ -594,7 +595,6 @@ Apache SIS is a free software, Java lang
           -->
 
           <additionalparam>
-              -link http://www.geoapi.org/snapshot/javadoc/
               -link http://www.geoapi.org/snapshot/pending/
               -Xdoclint:syntax -Xdoclint:html -Xdoclint:missing -Xdoclint:accessibility
           </additionalparam>



Mime
View raw message