Java Doc for ProjectiveTransform.java in  » GIS » GeoTools-2.4.1 » org » geotools » referencing » operation » transform » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.referencing.operation.transform 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.referencing.operation.transform.AbstractMathTransform
   org.geotools.referencing.operation.transform.ProjectiveTransform

All known Subclasses:   org.geotools.referencing.operation.transform.GeocentricTranslation,
ProjectiveTransform
public class ProjectiveTransform extends AbstractMathTransform implements LinearTransform,Serializable(Code)
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.

Such a coordinate transformation can be represented by a square of an arbitrary size. Point coordinates must have a dimension equals to -1. For example, for square matrix of size 4×4, coordinate points are three-dimensional. The transformed points (x',y',z') are computed as below (note that this computation is similar to javax.media.jai.PerspectiveTransform in Java Advanced Imaging):

 [ u ]     [ m00  m01  m02  m03 ] [ x ]
 [ v ]  =  [ m10  m11  m12  m13 ] [ y ]
 [ w ]     [ m20  m21  m22  m23 ] [ z ]
 [ t ]     [ m30  m31  m32  m33 ] [ 1 ]
 x' = u/t
 y' = v/t
 y' = w/t
 
In the special case of an affine transform, the last row contains only zero values except in the last column, which contains 1.
since:
   2.0
version:
   $Id: ProjectiveTransform.java 24925 2007-03-27 20:12:08Z jgarnett $
author:
   Martin Desruisseaux
See Also:   javax.media.jai.PerspectiveTransform
See Also:   java.awt.geom.AffineTransform
See Also:    Affine transformation on MathWorld

Inner Class :final public static class ProviderAffine extends MathTransformProvider
Inner Class :final public static class ProviderLongitudeRotation extends MathTransformProvider


Constructor Summary
protected  ProjectiveTransform(Matrix matrix)
     Constructs a transform from the specified matrix.

Method Summary
public static  LinearTransformcreate(Matrix matrix)
     Creates a transform for the specified matrix.
public static  LinearTransformcreate(AffineTransform matrix)
     Creates a transform for the specified matrix as a Java2D object.
 MathTransformcreateInverse(Matrix matrix)
     Creates an inverse transform using the specified matrix.
public static  LinearTransformcreateScale(int dimension, double scale)
     Creates a transform that apply a uniform scale along all axis.
public static  MatrixcreateSelectMatrix(int sourceDim, int[] toKeep)
     Creates a matrix that keep only a subset of the ordinate values. The dimension of source coordinates is sourceDim and the dimension of target coordinates is toKeep.length .
Parameters:
  sourceDim - the dimension of source coordinates.
Parameters:
  toKeep - the indices of ordinate values to keep.
public static  LinearTransformcreateTranslation(int dimension, double offset)
     Creates a transform that apply the same translation along all axis.
public  Matrixderivative(Point2D point)
     Gets the derivative of this transform at a point.
public  Matrixderivative(DirectPosition point)
     Gets the derivative of this transform at a point.
public  booleanequals(Object object)
     Compares the specified object with this math transform for equality.
public  MatrixgetMatrix()
     Returns a copy of the matrix.
public  ParameterDescriptorGroupgetParameterDescriptors()
     Returns the parameter descriptors for this math transform.
static  ParameterValueGroupgetParameterValues(Matrix matrix)
     Returns the matrix elements as a group of parameters values.
public  ParameterValueGroupgetParameterValues()
     Returns the matrix elements as a group of parameters values.
public  intgetSourceDimensions()
     Gets the dimension of input points.
public  intgetTargetDimensions()
     Gets the dimension of output points.
public  inthashCode()
     Returns a hash value for this transform.
public  MathTransforminverse()
     Creates the inverse transform of this object.
public  booleanisIdentity()
     Tests whether this transform does not move any points.
public  booleanisIdentity(double tolerance)
     Tests whether this transform does not move any points by using the provided tolerance.
public  voidtransform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
     Transforms an array of floating point coordinates by this matrix.
public  voidtransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
     Transforms an array of floating point coordinates by this matrix.


Constructor Detail
ProjectiveTransform
protected ProjectiveTransform(Matrix matrix)(Code)
Constructs a transform from the specified matrix. The matrix should be affine, but it will not be verified.
Parameters:
  matrix - The matrix.




Method Detail
create
public static LinearTransform create(Matrix matrix)(Code)
Creates a transform for the specified matrix. The matrix should be affine, but it is not be verified.



create
public static LinearTransform create(AffineTransform matrix)(Code)
Creates a transform for the specified matrix as a Java2D object. This method is provided for interoperability with Java2D.



createInverse
MathTransform createInverse(Matrix matrix)(Code)
Creates an inverse transform using the specified matrix. To be overridden by GeocentricAffineTransform .



createScale
public static LinearTransform createScale(int dimension, double scale)(Code)
Creates a transform that apply a uniform scale along all axis.
Parameters:
  dimension - The input and output dimensions.
Parameters:
  scale - The scale factor.
since:
   2.3



createSelectMatrix
public static Matrix createSelectMatrix(int sourceDim, int[] toKeep) throws IndexOutOfBoundsException(Code)
Creates a matrix that keep only a subset of the ordinate values. The dimension of source coordinates is sourceDim and the dimension of target coordinates is toKeep.length .
Parameters:
  sourceDim - the dimension of source coordinates.
Parameters:
  toKeep - the indices of ordinate values to keep. The matrix to give to the ProjectiveTransform.create(Matrix)method in order to create the transform.
throws:
  IndexOutOfBoundsException - if a value of toKeep is lower than 0 or not smaller than sourceDim .



createTranslation
public static LinearTransform createTranslation(int dimension, double offset)(Code)
Creates a transform that apply the same translation along all axis.
Parameters:
  dimension - The input and output dimensions.
Parameters:
  offset - The translation.
since:
   2.3



derivative
public Matrix derivative(Point2D point)(Code)
Gets the derivative of this transform at a point. For a matrix transform, the derivative is the same everywhere.



derivative
public Matrix derivative(DirectPosition point)(Code)
Gets the derivative of this transform at a point. For a matrix transform, the derivative is the same everywhere.



equals
public boolean equals(Object object)(Code)
Compares the specified object with this math transform for equality.



getMatrix
public Matrix getMatrix()(Code)
Returns a copy of the matrix.



getParameterDescriptors
public ParameterDescriptorGroup getParameterDescriptors()(Code)
Returns the parameter descriptors for this math transform.



getParameterValues
static ParameterValueGroup getParameterValues(Matrix matrix)(Code)
Returns the matrix elements as a group of parameters values. The number of parameters depends on the matrix size. Only matrix elements different from their default value will be included in this group.
Parameters:
  matrix - The matrix to returns as a group of parameters. A copy of the parameter values for this math transform.



getParameterValues
public ParameterValueGroup getParameterValues()(Code)
Returns the matrix elements as a group of parameters values. The number of parameters depends on the matrix size. Only matrix elements different from their default value will be included in this group. A copy of the parameter values for this math transform.



getSourceDimensions
public int getSourceDimensions()(Code)
Gets the dimension of input points.



getTargetDimensions
public int getTargetDimensions()(Code)
Gets the dimension of output points.



hashCode
public int hashCode()(Code)
Returns a hash value for this transform. This value need not remain consistent between different implementations of the same class.



inverse
public MathTransform inverse() throws NoninvertibleTransformException(Code)
Creates the inverse transform of this object.



isIdentity
public boolean isIdentity()(Code)
Tests whether this transform does not move any points.



isIdentity
public boolean isIdentity(double tolerance)(Code)
Tests whether this transform does not move any points by using the provided tolerance. This method work in the same way than org.geotools.referencing.operation.matrix.XMatrix.isIdentity(double) .
since:
   2.4



transform
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)(Code)
Transforms an array of floating point coordinates by this matrix. Point coordinates must have a dimension equals to Matrix.getNumCol -1. For example, for square matrix of size 4×4, coordinate points are three-dimensional and stored in the arrays starting at the specified offset ( srcOff ) in the order [x0, y0, z0, x1, y1, z1..., xn, yn, zn].
Parameters:
  srcPts - The array containing the source point coordinates.
Parameters:
  srcOff - The offset to the first point to be transformed in the source array.
Parameters:
  dstPts - The array into which the transformed point coordinates are returned.
Parameters:
  dstOff - The offset to the location of the first transformed point that is storedin the destination array. The source and destination array sections canbe overlaps.
Parameters:
  numPts - The number of points to be transformed



transform
public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)(Code)
Transforms an array of floating point coordinates by this matrix. Point coordinates must have a dimension equals to Matrix.getNumCol -1. For example, for square matrix of size 4×4, coordinate points are three-dimensional and stored in the arrays starting at the specified offset ( srcOff ) in the order [x0, y0, z0, x1, y1, z1..., xn, yn, zn].
Parameters:
  srcPts - The array containing the source point coordinates.
Parameters:
  srcOff - The offset to the first point to be transformed in the source array.
Parameters:
  dstPts - The array into which the transformed point coordinates are returned.
Parameters:
  dstOff - The offset to the location of the first transformed point that is storedin the destination array. The source and destination array sections canbe overlaps.
Parameters:
  numPts - The number of points to be transformed



Methods inherited from org.geotools.referencing.operation.transform.AbstractMathTransform
MathTransform concatenate(MathTransform other, boolean applyOtherFirst)(Code)(Java Doc)
public Shape createTransformedShape(Shape shape) throws TransformException(Code)(Java Doc)
final Shape createTransformedShape(Shape shape, AffineTransform preTransform, AffineTransform postTransform, int orientation) throws TransformException(Code)(Java Doc)
public Matrix derivative(Point2D point) throws TransformException(Code)(Java Doc)
public Matrix derivative(DirectPosition point) throws TransformException(Code)(Java Doc)
protected static void ensureNonNull(String name, Object object) throws IllegalArgumentException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected String formatWKT(Formatter formatter)(Code)(Java Doc)
public ParameterDescriptorGroup getParameterDescriptors()(Code)(Java Doc)
public ParameterValueGroup getParameterValues()(Code)(Java Doc)
abstract public int getSourceDimensions()(Code)(Java Doc)
abstract public int getTargetDimensions()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public MathTransform inverse() throws NoninvertibleTransformException(Code)(Java Doc)
static Matrix invert(Matrix matrix) throws NoninvertibleTransformException(Code)(Java Doc)
public boolean isIdentity()(Code)(Java Doc)
protected static boolean needCopy(int srcOff, int dimSource, int dstOff, int dimTarget, int numPts)(Code)(Java Doc)
protected static double rollLongitude(double x)(Code)(Java Doc)
static GeneralMatrix toGMatrix(Matrix matrix)(Code)(Java Doc)
static XMatrix toXMatrix(Matrix matrix)(Code)(Java Doc)
public Point2D transform(Point2D ptSrc, Point2D ptDst) throws TransformException(Code)(Java Doc)
public DirectPosition transform(DirectPosition ptSrc, DirectPosition ptDst) throws TransformException(Code)(Java Doc)
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) throws TransformException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.