2

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:

  1. calculate accurate area/length for each object.
  2. 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:

  1. Dirty: Get object bounding box and select proper UTM zone for projection and use geo-tools java lib to do it.
  2. 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...

Ian Turton
  • 81,417
  • 6
  • 84
  • 185
Capacytron
  • 327
  • 2
  • 11
  • 1
    My earlier comment was just about the intersection problem. For area calculation, an equal area projection would be best. – AndreJ Aug 06 '15 at 11:00
  • My earlier comment was just about the intersection problem. so your idea is to find intersecting areas using WGS84 coordinates? And then project them on the plane and calculate area and intersection area?

    – Capacytron Aug 06 '15 at 11:14
  • 1
    If you use a continent-wide aea or laea projection instead of UTM, it should go in one step. – AndreJ Aug 06 '15 at 11:24
  • aea, laea mean "area", misprint? continent-wide projection should bring distortions? I don't need to display smth, I need to calc area and intersection area. Intersections require high precision when projecting it on surface – Capacytron Aug 06 '15 at 12:30
  • 1
    Albers Equal Area and Lambert Azimuthal Equal Area. Both should be best for area calculation. – AndreJ Aug 06 '15 at 12:34
  • so If they are so good, why we need UTM zones? – Capacytron Aug 06 '15 at 12:54
  • 1
    Apart from areas, the map designer might want to preserve shape, distance and angle as well. But no projection offers all together. – AndreJ Aug 06 '15 at 12:57
  • Got it, so for areas I can easily use Albers Equal Area and Lambert Azimuthal Equal Area. But for intersection I need to use smth else since I need preserve shape and get correct intersection area. Am I right? – Capacytron Aug 06 '15 at 13:06
  • Just try it out. If your polygons have enough vertices, the intersection should be exact. – AndreJ Aug 06 '15 at 16:44
  • @ AndreJ Albers Equal Area conic or cylindric? I see that conic has EPSG code, but cylindric doesn't have. – Capacytron Aug 11 '15 at 10:54
  • 1
    http://www.remotesensing.org/geotiff/proj_list/cylindrical_equal_area.html would be the third alternative. They all promise equal-area, not sure which looks better. – AndreJ Aug 11 '15 at 11:14
  • Thanks, I'm trying to find Albert equal-area cylindrical here: http://docs.geotools.org/latest/javadocs/org/geotools/referencing/operation/projection/package-summary.html but no luck. – Capacytron Aug 11 '15 at 11:19
  • None of cylindrical equal area projections implemented in geotools :( Will report back later. – Capacytron Aug 12 '15 at 09:39
  • Hi @AndreJ, tried several approaches. Started new question. Could you see it please? http://gis.stackexchange.com/questions/158197/why-do-i-get-correct-area-and-intersect-area-when-use-wrong-projection – Capacytron Aug 13 '15 at 15:57

0 Answers0