[gdal-dev] Fwd: Converting multi-geometry GML with ogr2ogr not working

Stefan van der Hoorn stefan.van.der.hoorn at geodan.nl
Wed Dec 16 03:05:23 PST 2015


All

I am having difficulties with GML loading in PostGIS with ogr2ogr.

It is a GML of buildingparts containing both polygons and (label)-points.
In this example (below) I have a selection of 9 objects. The number of
polygons is 9 and there are 6 point-objects. So there are 6 object with
both polygon and point geometry.

ogr2ogr -skipfailures -lco OVERWRITE=yes --config PG_USE_COPY YES -gt
50000 -lco LAUNDER=NO -f "PostgreSQL" PG:"host=xxxx user=xxxx
dbname=xxxx password=xxxx" "buildingpart.gml" -sql "select * from
buildingpart where OGR_GEOMETRY = 'MULTIPOLYGON'" -nln
test.buildingpart_multipolygon_selection

ogr2ogr -skipfailures -lco OVERWRITE=yes --config PG_USE_COPY YES -gt
50000 -lco LAUNDER=NO -f "PostgreSQL" PG:"host=xxxx user=xxxx
dbname=xxxx password=xxxx" "buildingpart.gml" -sql "select * from
buildingpart where OGR_GEOMETRY = 'POINT'" -nln
test.buildingpart_point_selection


Unfortunately without result.
Is anyone familiar with this problem of multiple geometry in GML. And is
there a solution?

Attached you will find a selection of the GML.

Hope to hear from you.

Kind regards,
Stefan van der Hoorn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20151216/9408effc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buildingpart_selection.gml
Type: application/octet-stream
Size: 18266 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20151216/9408effc/attachment-0001.obj>


More information about the gdal-dev mailing list