[gdal-dev] Extract Linestrings from GeometryCollections with ogr2gor

Stefan Ziegler stefan.ziegler.de at gmail.com
Tue Mar 17 12:40:50 PDT 2015


Thank you guys.

I used -explodecollections:

1) SHP -> GPKG
2) Clip contour lines in GPKG (this produces geometrycollections) -> GPKG
3) GPKG -> GPKG (with -explodecollections)
4) GPKG -> SHP (-nlt LINESTRING25 -skipfailures)

At the moment I have to use GDAL 1.11. With >= 2.0 there are for sure more
elegant ways (with -dialect INDIRECT_SQLITE option).

regards
Stefan

On Mon, Mar 16, 2015 at 10:39 PM, Jukka Rahkonen <
jukka.rahkonen at maanmittauslaitos.fi> wrote:

> Even Rouault <even.rouault <at> spatialys.com> writes:
>
> >
> > Stefan,
> >
> > you could try the -explodecollections of ogr2ogr.
> >
> > Even
>
> Right, I did not remember but there is a bit similar case about separating
> elementary geometries from collections in gis.stackexchange
>
> http://gis.stackexchange.com/questions/137408/ogr2ogr-unable-to-open-kml-datasource
>
> -Jukka Rahkonen-
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150317/724a85df/attachment.html>


More information about the gdal-dev mailing list