Hi, I have a simple point obtained from Google Earth and I want to
calculate a buffer around this in units of miles. So, I think the
general pattern is like this:
Geometry source= new WKTReader().read("POINT(-82.90755596903085
42.40409951227155)");
CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:4326");
// what should I project it to?
CoordinateReferenceSystem targetCRS = CRS.decode("???????");
MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS, true);
Geometry target = JTS.transform(source, transform);
// buffer by 1 mile (meters)
Geometry buffer = target.buffer(1609.344);
// re-project
transform = CRS.findMathTransform(targetCRS, sourceCRS, true);
Geometry geometry = JTS.transform(buffer, transform);
I'm not exactly sure what CRS I should project it to. If I know
exactly in the world where this is I could use that, but is there a
general EPSG that I can use where the units of distance are in meters,
so I can use the JTS buffer method correctly?
Also, I read on the Wiki that Google is not really WGS84 -- will this
cause issues or should I try to use the CRS posted on the Wiki to get
more accurate results:
http://docs.codehaus.org/display/GEOTDOC/08+Google+Maps+Projection
Thanks in advance,
Davis
------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users