I am going to try and quickly answer; but you will need others to fill
in the details:
- I often know a good equal area projection for the area I will be
working in (EPSG:3005 bc albers is a good CRS for working in western
canada for example).
- you could study how bc albers is defined and make yourself a
CoordinateReferenceSystem on the fly for the specific point you are
interested in
Once you have the point in an equal area projection you can use buffer
to get a polygon; and then transform this polygon back to the google
projection if you like (it will show up as an ellipse).
Jody
Davis Ford wrote:
> 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
>
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users