[Gdal-dev] ogr geometry intersection

Didrik Pinte dpinte at itae.be
Tue May 30 04:31:05 EDT 2006


Le lundi 29 mai 2006 à 11:27 -0400, Frank Warmerdam a écrit :
> 
> Didrik,
> 
> GEOS is used to implement the intersection so you would really need to
> dig into the GEOS (or perhaps even JTS) docs to find out how this is
> implemented.  Or, of course, you could experiment.
> 
> My expectation is that an intersection between abutting polygons would
> result in either a linestring, or a multilinestring.  but I'm not too sure
> about it.
> 
> Best regards,

Hi Frank,

In order to be sure of what's happening in intersections, i've build
some testcases to be sure of the results.

I've attached the python test file but here are the results :


surface overlap --> wkbPolygon intersection
border overlap  --> wkbLineString or wkbMultiLineString if it's not
straigth
mix between surface and border --> wkbPolygon intersection
point overlap --> wkbPoint intersection
no overlap --> wkbGeometryCollection intersection but empty

The last one is the only "strange" answer. All the other are the logic
behaviour.

So your expectation is confirmed ;-)

Didrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_intersection.py
Type: text/x-python
Size: 3349 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060530/713f38f5/test_intersection.py


More information about the Gdal-dev mailing list