Opened 19 months ago

Closed 19 months ago

Last modified 19 months ago

#6247 closed defect (fixed)

GML <xx:geometry> behavior does not work correctly

Reported by: JuergenWeichand Owned by: warmerdam
Priority: normal Milestone: 1.11.4
Component: default Version: unspecified
Severity: normal Keywords: gml, inspire
Cc:

Description (last modified by JuergenWeichand)

According to changeset #25183 (https://trac.osgeo.org/gdal/changeset/25183) the geometry inside <xx:geometry> should be used if there are several geometries per feature. This function seems to be broken. The attached test case produces a wrong result after the .gfs file has been written?

Output:

	---> GDAL Version: 2000100 <---
	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	Open attempt: 1
	GetGeometryType: 3
	GetGeometryRef: POLYGON ((2 49,2 50,3 50,3 49,2 49))
	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	Open attempt: 2
	GetGeometryType: 1
	GetGeometryRef: POINT (-2 -49)
	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	Open attempt: 3
	GetGeometryType: 1
	GetGeometryRef: POINT (-2 -49)

Attachments (1)

ogr-bugreport.py (1.3 KB) - added by JuergenWeichand 19 months ago.
Python Testcase

Download all attachments as: .zip

Change History (6)

Changed 19 months ago by JuergenWeichand

Attachment: ogr-bugreport.py added

Python Testcase

comment:1 Changed 19 months ago by JuergenWeichand

Description: modified (diff)

comment:2 Changed 19 months ago by Even Rouault

Milestone: 2.0.2
Resolution: fixed
Status: newclosed

Can be workarounded by adding to the .gfs :

    <GeometryName>geometry</GeometryName>
    <GeometryElementPath>geometry</GeometryElementPath>

trunk r31859, branches/2.0 r31860 "GML: serialize in .gfs file the name of the geometry element when it is 'geometry' since this is a particular case (#6247)"

comment:3 Changed 19 months ago by JuergenWeichand

Thank you very much Even! Any chance for a 1.11.4 backport (e.g. for QGIS)?

comment:4 Changed 19 months ago by Even Rouault

Milestone: 2.0.21.11.4

Backported in 1.11 in r31861

comment:5 Changed 19 months ago by JuergenWeichand

Perfect, thanks!

Note: See TracTickets for help on using tickets.