Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#4328 closed defect (fixed)

GML3 features with element "role" get skipped

Reported by: Jukka Rahkonen Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc:

Description

Ogr2ogr from gdal 1.8.1 cannot convert GML3 features which contain element "role". The error is

ERROR 1: Unrecognised geometry type <role>.
ERROR 1: Invalid surfaceMember

Example of such a feature

<au:geometry>
<gml:MultiSurface gml:id="ms26117800" srsName="urn:ogc:def:crs:EPSG::3047">
<gml:surfaceMember xlink:role="main">
<gml:Surface gml:id="pg26127610">
<gml:patches>
<gml:PolygonPatch>
<gml:exterior>
<gml:LinearRing>
<gml:posList>6774944.921 407223.608 6773359.131 407473.568 6772570.012 408433.966 6770280.874 407498.335 6769209.965 406732.762 6769089.590 406016.889 6768338.527 406430.290 6767984.944 406093.172 6767727.715 405773.649 6767208.878 405450.179 6767021.990 405101.573 6766684.788 405165.878 6765459.586 404854.618 6765963.063 404309.368 6766143.057 403429.345 6765462.392 402845.961 6764682.877 404323.600 6763880.042 404325.215 6763511.577 404703.127 6763214.658 404506.794 6761994.718 405921.920 6760911.913 405116.726 6760772.820 403858.465 6760161.556 403192.993 6758676.956 401836.526 6755954.164 400802.833 6753653.565 398758.104 6751531.909 398212.152 6750003.380 398175.228 6749094.950 397829.515 6749240.891 397251.575 6750986.658 397113.617 6753278.804 396795.450 6755267.619 396647.610 6756313.412 394102.316 6756355.692 393094.362 6756401.455 392003.342 6758222.546 392675.227 6760136.654 393110.616 6760764.362 393908.791 6762771.980 395004.212 6763232.042 394481.919 6763576.960 394430.135 6764131.419 394975.511 6764301.440 394702.833 6763686.468 393299.352 6764872.406 393266.806 6765456.134 393768.382 6765521.120 394248.842 6766216.830 394351.313 6766455.961 394143.310 6767837.503 393495.338 6768194.948 394097.294 6769919.838 395087.371 6771210.613 400270.848 6772409.141 401269.783 6772618.129 402784.055 6775615.020 403654.905 6776455.044 404375.956 6776822.410 405156.381 6777231.029 406024.744 6776779.079 406032.030 6775964.177 406383.247 6775852.337 406663.163 6774944.921 407223.608</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:PolygonPatch>
</gml:patches>
</gml:Surface>
</gml:surfaceMember>
</gml:MultiSurface>
</au:geometry>


Data is using the INSPIRE administrational units schema. Links to 10 MB sized data and schema are http://latuviitta.org/documents/inspire_au.xml http://latuviitta.org/documents/inspire_au.xsd

Change History (4)

comment:1 Changed 6 years ago by Even Rouault

Component: defaultOGR_SF
Milestone: 1.8.2
Resolution: fixed
Status: newclosed

r23316 /trunk/ (autotest/ogr/ogr_gml_geom.py gdal/ogr/gml2ogrgeometry.cpp): GML: ignore properly xlink:role attribute in <gml:surfaceMember> element (#4328)

r23317 /branches/1.8/ (autotest/ogr/ogr_gml_geom.py gdal/ogr/gml2ogrgeometry.cpp): GML: ignore properly xlink:role attribute in <gml:surfaceMember> element (#4328)

And a few unrelated (trunk) commits so that the GML driver is happy with the inspire_au.xml and inspire_au.xsd files :

r23314 /trunk/gdal/ogr/ogrsf_frmts/gml/gmlreader.h: GML: avoid segfault when no property at all has been set on a GML feature, but whose class has properties (on the test case that lead to the fix, only reproduced only on trunk)

r23315 /trunk/gdal/ogr/ogrsf_frmts/gml/parsexsd.cpp: GML: don't try to parse successfully a feature type in the .xsd if there are elements we don't know how to parse. Better to rely on the .gfs mechanism (better handling of the data mentionned in #4328)

comment:2 Changed 6 years ago by Even Rouault

Needed to parse the schemas of "WFS:http://apollo.erdas.com/erdas-apollo/vector/Cherokee"

r23685 /trunk/gdal/ogr/ogrsf_frmts/gml/parsexsd.cpp: GML .xsd parser: recognize simpleTypes not inlined, but defined elsewhere in the .xsd (partial revert of r23315, #4328) r23686 /branches/1.9/gdal/ogr/ogrsf_frmts/gml/parsexsd.cpp: GML .xsd parser: recognize simpleTypes not inlined, but defined elsewhere in the .xsd (partial revert of r23315, #4328)

comment:3 Changed 6 years ago by Even Rouault

r23688 /trunk/autotest/ogr/ (3 files in 2 dirs): Add test for r23685 (#4328)

comment:4 Changed 4 years ago by Even Rouault

Milestone: 1.8.2

Milestone 1.8.2 deleted

Note: See TracTickets for help on using tickets.