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:

* - *

Relationships:

*
*
• The {@linkplain Matrix#getNumCol() number of columns} in the matrix is equal to * the number of {@linkplain #getSourceDimensions() source dimensions} plus 1
• @@ -33,26 +36,42 @@ import org.opengis.referencing.operation * the number of {@linkplain #getTargetDimensions() target dimensions} plus 1. *
* + * {@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: + * + *

+ * + *

+ * + * {@section Projective transform} + * If the last matrix row does not met the above constraints, then the transform is not affine. + * A projective transform can be used as a generalization of affine transforms. + * In such case the computation performed by SIS is similar to {@code PerspectiveTransform} + * in Java Advanced Imaging. + * + *

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:

+ * + *
{@include formulas.html#ProjectiveTransform}
+ * * @author Martin Desruisseaux (IRD, Geomatys) * @since 0.4 (derived from geotk-2.0) * @version 0.4 * @module * - * @see org.apache.sis.referencing.operation.MathTransforms + * @see Affine transformation on MathWorld */ 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: - * - *

- * - *

* * @return The coefficients of this linear transform as a matrix. + * + * @see MathTransforms#getMatrix(MathTransform) */ Matrix getMatrix(); } Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1600780&r1=1600779&r2=1600780&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Thu Jun 5 22:14:53 2014 @@ -40,6 +40,8 @@ import org.junit.BeforeClass; org.apache.sis.referencing.operation.matrix.NonSquareMatrixTest.class, // Expected to be last MatrixTestCase - see javadoc. org.apache.sis.referencing.operation.matrix.MatricesTest.class, org.apache.sis.referencing.operation.matrix.AffineTransforms2DTest.class, + org.apache.sis.referencing.operation.transform.IterationStrategyTest.class, + org.apache.sis.referencing.operation.transform.AbstractMathTransformTest.class, org.apache.sis.internal.referencing.FormulasTest.class, org.apache.sis.internal.referencing.VerticalDatumTypesTest.class, @@ -60,6 +62,7 @@ import org.junit.BeforeClass; org.apache.sis.parameter.ParameterFormatTest.class, org.apache.sis.parameter.TensorParametersTest.class, org.apache.sis.parameter.TensorValuesTest.class, + org.apache.sis.referencing.datum.BursaWolfParametersTest.class, org.apache.sis.referencing.datum.TimeDependentBWPTest.class, org.apache.sis.referencing.datum.DefaultEllipsoidTest.class, Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1600780&r1=1600779&r2=1600780&view=diff ============================================================================== --- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] (original) +++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] Thu Jun 5 22:14:53 2014 @@ -85,6 +85,11 @@ public final class Errors extends Indexe public static final short CanNotComputeDerivative = 1; /** + * Can not concatenate transforms “{0}” and “{1}”. + */ + public static final short CanNotConcatenateTransforms_2 = 160; + + /** * Can not connect to “{0}”. */ public static final short CanNotConnectTo_1 = 2; Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1600780&r1=1600779&r2=1600780&view=diff ============================================================================== --- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] (original) +++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] Thu Jun 5 22:14:53 2014 @@ -27,6 +27,7 @@ AbstractType_1 = Type \u2018{0}\u2019 is abstract. AmbiguousName_3 = Name \u201c{2}\u201d is ambiguous because it can be understood as either \u201c{0}\u201d or \u201c{1}\u201d. CanNotAddToExclusiveSet_2 = No element can be added to this set because properties \u2018{0}\u2019 and \u2018{1}\u2019 are mutually exclusive. +CanNotConcatenateTransforms_2 = Can not concatenate transforms \u201c{0}\u201d and \u201c{1}\u201d. CanNotConnectTo_1 = Can not connect to \u201c{0}\u201d. CanNotConvertFromType_2 = Can not convert from type \u2018{0}\u2019 to type \u2018{1}\u2019. CanNotConvertValue_2 = Can not convert value \u201c{0}\u201d to type \u2018{1}\u2019. Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1600780&r1=1600779&r2=1600780&view=diff ============================================================================== --- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties [ISO-8859-1] (original) +++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties [ISO-8859-1] Thu Jun 5 22:14:53 2014 @@ -17,6 +17,7 @@ AbstractType_1 = Le type \u2018{0}\u2019 est abstrait. AmbiguousName_3 = Le nom \u00ab\u202f{2}\u202f\u00bb est ambigu\u00eb car il peut \u00eatre interpr\u00e9t\u00e9 comme \u00ab\u202f{0}\u202f\u00bb ou \u00ab\u202f{1}\u202f\u00bb. CanNotAddToExclusiveSet_2 = Aucun \u00e9l\u00e9ment ne peut \u00eatre ajout\u00e9 \u00e0 cet ensemble car les propri\u00e9t\u00e9s \u2018{0}\u2019 et \u2018{1}\u2019 sont mutuellement exclusives. +CanNotConcatenateTransforms_2 = Les transformations \u00ab\u202f{0}\u202f\u00bb et \u00ab\u202f{1}\u202f\u00bb ne peuvent pas \u00eatre combin\u00e9es. CanNotConnectTo_1 = Ne peut pas se connecter \u00e0 \u00ab\u202f{0}\u202f\u00bb. CanNotConvertFromType_2 = Ne peut pas convertir du type \u2018{0}\u2019 vers le type \u2018{1}\u2019. CanNotConvertValue_2 = La valeur \u00ab\u202f{0}\u202f\u00bb ne peut pas \u00eatre convertie vers le type \u2018{1}\u2019. Modified: sis/trunk/pom.xml URL: http://svn.apache.org/viewvc/sis/trunk/pom.xml?rev=1600780&r1=1600779&r2=1600780&view=diff ============================================================================== --- sis/trunk/pom.xml (original) +++ sis/trunk/pom.xml Thu Jun 5 22:14:53 2014 @@ -435,6 +435,7 @@ Apache SIS is a free software, Java lang \${maven.compile.source}\${maven.compile.target}\${project.build.sourceEncoding} + false @@ -590,8 +591,7 @@ Apache SIS is a free software, Java lang --> - -link http://www.geoapi.org/snapshot/javadoc/ - -link http://www.geoapi.org/snapshot/pending/ + -link http://www.geoapi.org/3.0/javadoc/ @@ -631,7 +631,7 @@ Apache SIS is a free software, Java lang - org.apache.sis.internal:org.apache.sis.util.resources:com + org.apache.sis.internal:org.apache.sis.util.resources:org.apache.sis.referencing.operation.provider:com