From: Michael Bedward <michael.bedward@gm...> - 2008-11-25 03:25:05
A JTS Polygon doesn't know anything about CRS - it just assumes you
are working in a Cartesian coordinate system.
1. Construct your polygon with decimal degrees, as in your example.
2. Use a class implementing the JTS CoordinateFilter interface to
transform polygon coords to UTM
3. Get area, perimeter etc.
I think I already sent you some example code to do this (?)
Slightly different approach...
1. Load your polygon vertex coords in decimal degrees into a Coordinate array
2. Transform coords to UTM
3. Construct new Polygon from the transform coords
4. Get area, perimeter etc.
If you want to store a CRS with a polygon you should look at
SimpleFeatureType and SimpleFeature
Hope this helps
2008/11/25 Paulo Santos <prsantosbr@...>:
> As to get the CRS of a Polygon.