Author: desruisseaux
Date: Thu Jun 5 17:20:05 2014
New Revision: 1600706
URL: http://svn.apache.org/r1600706
Log:
Completed implementation.
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
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=1600706&r1=1600705&r2=1600706&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 17:20:05 2014
@@ -27,6 +27,7 @@ import org.opengis.referencing.operation
import org.opengis.referencing.operation.TransformException;
import org.opengis.referencing.operation.MathTransformFactory;
import org.apache.sis.internal.referencing.DirectPositionView;
+import org.apache.sis.internal.referencing.j2d.AffineTransform2D;
import org.apache.sis.referencing.operation.matrix.AffineTransforms2D;
import org.apache.sis.referencing.operation.matrix.Matrices;
import org.apache.sis.util.Static;
@@ -119,7 +120,10 @@ public final class MathTransforms extend
if (Matrices.isAffine(matrix)) {
switch (sourceDimension) {
case 1: return linear(matrix.getElement(0,0),
matrix.getElement(0,1));
-//TODO case 2: return linear(Matrices.toAffineTransform(matrix));
+ case 2: return new AffineTransform2D(
+ matrix.getElement(0,0), matrix.getElement(1,0),
+ matrix.getElement(0,1), matrix.getElement(1,1),
+ matrix.getElement(0,2), matrix.getElement(1,2));
}
} else if (sourceDimension == 2) {
return new ProjectiveTransform2D(matrix);