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

Reply via email to