Hi I have some contour lines which I clip with ogr2ogr's -clipsrc options. As a result and in very rare cases I get some GeometryCollections which cannot be stored in a shapefile.
So I'm clipping to a GeoPackage and tried to extract the LinesStrings from the GeometryCollections with the following command: ogr2ogr -dialect INDIRECT_SQLITE -sql 'SELECT ID, elev, (ST_Dump(geom)).geom as geom FROM linestring WHERE geometrytype = \'LINESTRING'\' clipped_dumped.shp clipped.gpkg ST_Dump seems to be unknown (as SQlite does not support arrays I guess) so is ST_CollectionExtract(geom,2). Is there a way to extract LineStrings from GeometryCollections. Probably already avoiding them when clipping the original geometry? best regards Stefan
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
