Opened 13 years ago
Closed 13 years ago
#3683 closed defect (fixed)
OGR produces invalid GML element name for a OGRGeometryCollection object
Reported by: | Even Rouault | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 1.7.3 |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | GML multigeometry geometrycollection |
Cc: | warmerdam, crschmidt |
Description (last modified by )
OGR currently writes <gml:GeometryCollection>, but this is not and has never been valid GML 2... The right element is <gml:MultiGeometry>. See http://schemas.opengeospatial.net/gml/2.1.2/geometry.xsd
The error is also confirmed because PostGis got it right :
ogrinfo PG:dbname=autotest -sql "select AsGML(GeomFromText('GEOMETRYCOLLECTION (POINT(0 1))'))" returns <gml:MultiGeometry><gml:geometryMember><gml:Point><gml:coordinates>0,1</gml:coordinates></gml:Point></gml:geometryMember></gml:MultiGeometry>
So it's time to fix things on the write side and validate against the GML schemas. I'll make the reading part tolerant to both old invalid syntax and new valid syntax.
I'll probably backport only the fix for the reading part in 1.7 branch, but not the fix for the writing part
Change History (2)
comment:1 by , 13 years ago
Description: | modified (diff) |
---|
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The following script now produces out.gml and out.xsd that validate with "xmllint -schema out.xsd out.gml"