I have many geographical objects described as polylines, polygons, multipolygons. All objects are in WGS84. Object could be: a building, stadium, park, street, highway, city, state, even country and continent
I need:
- calculate accurate area/length for each object.
- calculate intersection are for objects.
I've read some topics here: How to select projection
and there was a comment from @AndreJ:
You are right for the points, but the whole continent is just too large for UTM. For the intersection, try EPSG:3857 or 4326. – AndreJ Jan 29 '14 at 11:35
I don't understand it. 4326 is in degrees, I can't use it to measure area of smth, I need meter unit. 3857 is for "web", 3857 should give significant errors and distortions if used for computation...
I want to automate the process of course. I have billions of objects. Is there any java library for that? I used Geotool/JTS but it's only for planar geometry. I need to correctly project before using it :)
I see several approaches:
- Dirty: Get object bounding box and select proper UTM zone for projection and use geo-tools java lib to do it.
- If object is big enough (I have category for each object, I know if it's state/country/small lake in the forest)
2.1. Use some special projection for huge objects
2.2. Or split it (continent for example) by UTM zones, correctly project parts of object and them do calculation on top of these pieces.
I don't want to invent one more bicycle, probably we already have something ready for that?
EDIT: please see that I need to calc area and area of intersection. I need to preserve shape to calc correct in intersection area.
Coordinate system for accurately calculating areas of polygons that cross UTM Zones? is about area, but not intersections...