[gdal-dev] importing GML with geometry of many parts

Piotr Pachół piotrpachol at gmail.com
Mon Dec 15 05:46:06 PST 2014


Hello,

I have gml file with  geometries of different types (Points, Lines, 
Polygons)
I try to import it into PostGIS with this command:
ogr2ogr -a_srs EPSG:2180 -f "PostgreSQL" PG:"host=localhost 
user=postgres dbname=test password=*** port=5432" c:\test.xml -nlt 
PROMOTE_TO_MULTI

Almost everything works OK except  objects like that:

<gml:featureMember>
   <KR>
     <bt:kod>0010_803</bt:kod>
     <bt:geometria>
       <gml:LineString gml_id="ID_1" srsName="EPSG:2180" srsDimension="2">
             <gml:posList>479444.04 317832.37 479447.99 317823.28 
</gml:posList>
       </gml:LineString>
     </bt:geometria>
     <bt:geometria>
       <gml:LineString gml_id="ID_2" srsName="EPSG:2180" srsDimension="2">
             <gml:posList>479659.15 318668.28 479695.28 318671.1 
</gml:posList>
       </gml:LineString>
     </bt:geometria>
   </KR>
</gml:featureMember>

In above example object consists of 2 parts and only second part of 
geometry(gml_id="ID_2") is imported to PostGIS.
What should I do to import all the parts of the geometry of an object?

Regards,
Piotr



More information about the gdal-dev mailing list