Yep, that looks right.
Is this not clear from the Javadoc? Does it need more explanation?
There is an example class showing this too, I seem to remember.
Sunburned Surveyor wrote:
I've got a quick question about the AffineTransformation class. I was
just wondering if I am using it in the correct way to rotate and scale
the coordinates of a JTS Geometry object.
Here is a quick snippet that demonstrates how I think the class should
be used for this task:
double rotation = -30.0;
double scaleFactor = 1 / 500;
AffineTransformation rotateAndScaleForSVG = new AffineTransformation();
rotateAndScaleForSVG.rotate(rotation);
rotateAndScaleForSVG.scale(scaleFactor, scaleFactor);
someLineString.apply(rotateAndScaleForSVG);
Is this correct?
Thanks,
The Sunburned Surveyor
_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel
--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022
_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel