Hello,
I am trying to make some coordinates converstion from mercator to utm, and
it seens
that I make something wrong.
To make sure the convertion is correct, I tryed to convert back to mercator.
Here is the code that I used:
...
*
//tryed using coordinates lat,lon as x,y; and lat,lon as y,x
Coordinate[] coordinates = new Coordinate[] {
new Coordinate(-49.00, -16.683),
new Coordinate(-49.300, -16.675)};
Geometry g3 = new GeometryFactory().createLineString(coordinates);
*
*sourceCRS = CRS.decode("EPSG:**3785**"); // Mercator/google maps code*
*targetCRS = CRS.decode("EPSG:31982"); // UTM 22s code from *
http://www.epsg-registry.org/
*MathTransform tx = CRS.findMathTransform(CRSFrom, CRSTo, true);
Geometry transformed = JTS.transform(geom, transform) *
*
*
*The result is this:*
*first convertion to utm coodinates:*
[(6120584.969417981, 1.0000023079023875E7, NaN),
(6120584.546247176, 1.0000023090352934E7, NaN)]
*convertion back to Mercator:*
[(-8997.836054457479, -17.077226626756676, NaN),
(-8998.130646014215, -17.069201880507137, NaN)]
Am I doing something wrong?
Thanks,
--
Danilo Marques
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users