[gdal-dev] import gml with curves

Piotr Pachół piotrpachol at gmail.com
Fri Jul 8 14:03:21 PDT 2016


Hello,
Is there any way to import properly to Postgis gml which contain curves 
with more than one segment ?
Below I attach a part of gml with exemplary object.

<gml:featureMember>
<bt:Object>
     <bt:ID>10000</bt:ID>
<bt:geometry>
<gml:Curve gml:id="ID_786" srsDimension="2" srsName="EPSG:2180">
<gml:segments>
<gml:LineStringSegment>
<gml:posList>485840.70 318178.50 485819.70 318182.37 </gml:posList>
</gml:LineStringSegment>
<gml:LineStringSegment>
<gml:posList>485825.11 318176.40 485826.88 318186.02 </gml:posList>
</gml:LineStringSegment>
</gml:segments>
          </gml:Curve>
</bt:geometry>
  </bt:Object>
  </gml:featureMember>


And here is how I try to import gml:
SET PGCLIENTENCODING=UTF8
SET GML_EXPOSE_GML_ID=YES
SET GML_ATTRIBUTES_TO_OGR_FIELDS=YES
SET GML_FETCH_ALL_GEOMETRIES= YES
ogr2ogr -f "PostgreSQL" PG:"host=localhost user=*** dbname=test 
password=*** port=5432" d:\test.xml -forceNullable -splitlistfields -nlt 
GEOMETRY

And I've got errors:
ERROR 1: Non contiguous curves
ERROR 1: Curve: Got NULL geometry as Member instead of segments.

I there any option or trick to import such object? Curves with one 
segment are imported without any problem.

Regards,
Piotr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160708/e5072f40/attachment.html>


More information about the gdal-dev mailing list