public class AffineTransform extends CoordinateTransform
From http://graphics.lcs.mit.edu/classes/6.837/F01/Lecture07/lecture07.pdf:
[ x1_ ] = [ x1 y1 1 0 0 0 ] [ a11 ] [ y1_ ] = [ 0 0 0 x1 y1 1 ] [ a12 ] [ x2_ ] = [ x2 y2 1 0 0 0 ] [ a13 ] [ y2_ ] = [ 0 0 0 x2 y2 1 ] [ a21 ] [ x3_ ] = [ x3 y3 1 0 0 0 ] [ a22 ] [ y3_ ] = [ 0 0 0 x3 y3 1 ] [ a23 ] x_ = X a Solution: a = Xinv x_
Constructor and Description |
---|
AffineTransform(com.vividsolutions.jts.geom.Coordinate p1,
com.vividsolutions.jts.geom.Coordinate p1_)
A transformation that maps p1 to p1_ via a translation (no rotation or shear).
|
AffineTransform(com.vividsolutions.jts.geom.Coordinate p1,
com.vividsolutions.jts.geom.Coordinate p1_,
com.vividsolutions.jts.geom.Coordinate p2,
com.vividsolutions.jts.geom.Coordinate p2_)
A transformation that maps p1 to p1_ and p2 to p2_ via a translation,
rotation, and scaling (no "relative" shear).
|
AffineTransform(com.vividsolutions.jts.geom.Coordinate p1,
com.vividsolutions.jts.geom.Coordinate p1_,
com.vividsolutions.jts.geom.Coordinate p2,
com.vividsolutions.jts.geom.Coordinate p2_,
com.vividsolutions.jts.geom.Coordinate p3,
com.vividsolutions.jts.geom.Coordinate p3_)
A transformation that maps p1 to p1_, p2 to p2_ and p3 to p3_.
|
Modifier and Type | Method and Description |
---|---|
static com.vividsolutions.jts.geom.Coordinate |
rotate90(com.vividsolutions.jts.geom.Coordinate a,
com.vividsolutions.jts.geom.Coordinate b)
Determines where a point would end up if it were rotated 90 degrees about
another point.
|
com.vividsolutions.jts.geom.Coordinate |
transform(com.vividsolutions.jts.geom.Coordinate c)
Applies the affine transform to a point.
|
transform, transform
public AffineTransform(com.vividsolutions.jts.geom.Coordinate p1, com.vividsolutions.jts.geom.Coordinate p1_)
p1
- a pointp1_
- the point it maps topublic AffineTransform(com.vividsolutions.jts.geom.Coordinate p1, com.vividsolutions.jts.geom.Coordinate p1_, com.vividsolutions.jts.geom.Coordinate p2, com.vividsolutions.jts.geom.Coordinate p2_)
p1
- a pointp1_
- the point p1 maps top2
- another pointp2_
- the point p2 maps topublic AffineTransform(com.vividsolutions.jts.geom.Coordinate p1, com.vividsolutions.jts.geom.Coordinate p1_, com.vividsolutions.jts.geom.Coordinate p2, com.vividsolutions.jts.geom.Coordinate p2_, com.vividsolutions.jts.geom.Coordinate p3, com.vividsolutions.jts.geom.Coordinate p3_)
p1
- a pointp1_
- the point p1 maps top2
- another pointp2_
- the point p2 maps top3
- another pointp3_
- the point p3 maps topublic static com.vividsolutions.jts.geom.Coordinate rotate90(com.vividsolutions.jts.geom.Coordinate a, com.vividsolutions.jts.geom.Coordinate b)
a
- the fixed pointb
- the point to rotate (b itself will not be changed)public com.vividsolutions.jts.geom.Coordinate transform(com.vividsolutions.jts.geom.Coordinate c)
[ x_ ] = [ a11 a12 a13 ] [ x ] [ y_ ] = [ a21 a22 a23 ] [ y ] [ 1 ] = [ 0 0 1 ] [ 1 ]
transform
in class CoordinateTransform
c
- the input to the affine transform