Greetings,

I'm using v10.6 of GeoTools.  I am trying to do something that I think
should be relatively simple -- but perhaps I dont understand matrices well
enough.  I am trying to translate, scale,  and rotate a point.  Translation
seems easy enough -- like I should be able to add the x and y offsets, then
scale and rotate around that same offset.

So Ive tried a number of things similar to this:

final AffineTransform translateTransform =

                    AffineTransform.getTranslateInstance(geoX, geoY);

            final AffineTransform rotateTransform =


AffineTransform.getRotateInstance(Math.toRadians(geoRotate), 0.0, 0.0);

            final AffineTransform scaleTransform =

                    AffineTransform.getScaleInstance(geoScale, geoScale);

Then something like this:

                    final Point2D sourcePoint = outerRing.get(j);



                    // translate, rotate, scale

                    final AffineTransform transform = new
AffineTransform(translateTransform);

                    transform.concatenate(rotateTransform);

                    transform.concatenate(scaleTransform);



                    final Point2D targetPoint = new Point2D();

                    transform.transform(sourcePoint, targetPoint);

For a source point of [ -95.75, 224.45 ]


The correct transformation should result in  [ 716731.24, 3016405.92 ]

Im getting [ 716942.89, 3016333.19 ]  which is in the neighborhood, but not
really close enough.

Where am I going wrong here?

Thanks in advance!

Greg
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to