[GIS] Determining whether polygon crosses the antimeridian

algorithmantimeridiancrosslatitude longitudepolygon

I'm working on a system that uses bounding boxes as a fast first check for a point-in-polygon filter. My current naive implementation (just taking the min/max lat and long for all points) fails on polygons that cross the antimeridian (180 longitude).

I've done enough research to determine that the Right Way is probably to use spherical polygons, but I'm hoping to avoid the complexity of this approach (code complexity and time complexity). I think I can ignore issues at the poles, at least for the present, so the problem is relatively simple if I can accurately identify polygons that cross the antimeridian, set the appropriate east/west values, and then change the bbox check if east < west. But I'm stuck on identification.

Constraints:

  • I don't control the format of the input polygons.
  • I assume all longitudes in the polygon are in the range -180 - 180
  • I assume that all input polygons follow the right-hand rule, i.e. have a counter-clockwise winding order.

Given these constraints, what's the easiest way to identify a polygon that crosses 180 longitude?

Best Answer

The easiest way to identify a polygon that crosses 180 longitude is:

  1. Create polyline vector file with antimeridian line that crosses 180 (for test purposes I used GCS_WGS_1984 WKID: 4326 Authority: EPSG coordinate system).
  2. Use select by location tool to select polygon features that intersect antimeridian line.

This method is tested with ArcGIS Desktop:

Picture 1: WGS 84 test Picture 2: UTM test

Related Question