Hallo List,
I would like to perform some geometry transformations on polygons, i.e
rotate about a point, scale and translate.
So I create the polygon:
import com.vividsolutions.jts.geom.Coordinate
import org.geotools.geometry.jts.JTSFactoryFinder
import com.vividsolutions.jts.geom.GeometryFactory
import com.vividsolutions.jts.geom.LinearRing
import com.vividsolutions.jts.geom.Polygon
GeometryFactory geometryFactory =
JTSFactoryFinder.getGeometryFactory( null );
Coordinate[] coords = [new Coordinate(0, 0), new Coordinate(2,
0), new Coordinate(2, 2), new Coordinate(0, 2), new Coordinate(0, 0)]
LinearRing ring = new LinearRing(coords, geometryFactory)
Polygon polygon = geometryFactory.createPolygon(ring)
I guess I have to use AffineTransform
(com.vividsolutions.jts.geom.util.AffineTransformation ?) but I don't
know exactly how.
A code example or a link to a tutorial were very appreciated.
Cheers,
Tom
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users