[gdal-dev] Layer intersection: two polygons with a common point

Ari Jolma ari.jolma at gmail.com
Sat Apr 30 01:56:01 PDT 2016


28.04.2016, 10:56, Even Rouault kirjoitti:
> Oh I see we are both involved in this ;-) The advantage of the current
> behaviour is that it is compatible with most popular output formats that don't
> like mixing geometry types in the same layer (think of shapefiles, and
> generally postgis, spatialite when layer geometry type is not unknown, ...).
> Perhaps one possible approach would be to check the output layer geometry type
> : if it is wkbUnknown, keep all non empty geometries, otherwise only keep
> those compatible of the geometry type. And perhaps combine that default
> behaviour with an option to the method "KEEP_LOWER_DIMENSION_GEOMETRIES"
> (would be honoured only if output layer geometry type == wkbUnknown) ? Since I
> feel that in most cases and in real-life, intersection of polygons resulting
> in points or lines should not happen.

I have code to do this. The option is needed in Intersection, Union and 
Identity. I'm writing tests now. It seems that if we have 
KEEP_LOWER_DIMENSION_GEOMETRIES = YES as default at least one test 
fails. Which makes me think that we shouldn't have it as default.

Ari

>



More information about the gdal-dev mailing list