You're right, this isn't in JTS 1.8, but has been added to JTS 1.9 (at least for rotation).

The best way to do this is to simply apply a sequence of base transformation operations to the same AffineTransformation. E.g.

AffineTransformation t = new AffineTransformation();
...
t.compose(AffineTransformation.translationInstance(-x, -y);
t.compose(AffineTransformation.rotationInstance(alpha);
t.compose(AffineTransformation.translationInstance(x, y);

(I think I have this right....   Good reason to provide this in the API!)

Sunburned Surveyor wrote:
Is it possible to rotate and scale from designated coordinate, instead
of <0,0> using the AffineTransform class?

If this can't be done with the AffineTransform class, can it be done
with another class in JTS?

Thanks,

The Sunburned Surveyor

P.S. - The rotate and scale methods of the AffineTransform class did
not appear to have parameters that would allow me to designate a
coordinate to serve as the basis for the rotation and scaling. The
javadoc comments describing the class also make me suspect this is not
possible.
_______________________________________________
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

Reply via email to