Thanks Even! Silas
----- Original Message ----- From: "Even Rouault" <even.roua...@mines-paris.org> To: "Silas Faltus" <fal...@spacecomputer.com> Cc: gdal-dev@lists.osgeo.org Sent: Tuesday, June 10, 2014 11:17:32 AM Subject: Re: [gdal-dev] Question regarding OGRPolygon intersection Silas, More exactly, GEOS is a port in C++ of JTS. It does exactly what JTS does for this, so it considers the coordinates as being located on a 2D cartesian plane. No spherical/ellipsoidal geometry is involved. Even > Hi, > > I was hoping to use GDAL for testing when two convex polygons intersect. I > was able to do this with something similar to: > > polyOne->Intersects(polyTwo); > > Both polyOne and polyTwo are OGRPolygon and are defined in geographic > coordinates, i.e. latitude and longitude (decimal degrees). I've also set the > spatial reference of the polygons to 'SetWellKnownGeogCS("WGS84")'. Also, > I've built GDAL with GEOS. > > My question is this, what coordinate system is the intersection calculated > in? Looking through the code, it appears that GDAL uses GEOS for the > intersection test, and GEOS seems to rely on JTS for the intersection test. > However, JTS describes itself as providing '... algorithms for processing > linear geometry on the 2-dimensional cartesion plane'. > > So, as an example, if my polygons each contain three vertices, are they > treated as spherical triangles in a geographic coordinate system (with curved > edges) when the intersection test is performed? Or, are then treated as flat > triangles with straight edges in some Cartesian / 2D coordinate system. > > I appreciate any help answering this question, > > Silas > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev > _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev