Opened 20 years ago

Closed 9 years ago

#515 closed defect (wontfix)

OGRGeometry::Intersect does not work correctly for geographic coordinate system

Reported by: gdal@… Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SRS Version: unspecified
Severity: normal Keywords:
Cc: gdal@…

Description (last modified by warmerdam)

OGRGeometry Intersect method does not work correctly in a geographic coordinate system (lat/lon coordinates), because it does not account for periodicity (i.e. "wrap-around" of lon-coordinate at dateline). OGRGeometry already has an associated spatial reference (with the method IsGeographic()). However, a remaining problem is that polygon edges are not well-defined in such a coordinate system (although the shortest connection is probably a reasonable assumption).

As a test case: 

1) download & tar xzf the following wrs2 zone definition file: 
ftp://ftp.glcf.umiacs.umd.edu/www/shapefile/wrs2.tar.gz 

2) execute 'ogrinfo -al wrs2.shp -spat 42 42 44 44' 
 
ogrinfo will wrongly report wrs2 zones crossing the dateline, because the intersection routines' min-max check inverts the longitudal extent of these cells.

Change History (3)

comment:1 by warmerdam, 20 years ago

It is unlikely that I will correct this in the near future. It is not
really my expectation that I will make the OGR geometry functions work
smoothly in dateline spanning situations.  It is hard, and geometry 
*operations* like that are more the domain of packages like GEOS.

comment:3 by warmerdam, 17 years ago

Description: modified (diff)

comment:4 by Jukka Rahkonen, 9 years ago

Resolution: wontfix
Status: assignedclosed

From http://www.gdal.org/classOGRGeometry.html

Intersect (OGRGeometry *) const CPL_WARN_DEPRECATED("Non standard method. Use Intersects() instead")

Because this method does not exist if won't fix either.

Note: See TracTickets for help on using tickets.