Opened 17 years ago

Closed 15 years ago

#1604 closed defect (duplicate)

ogr2ogr fails to convert input Ordnance Survey Mastermap (GML) data

Reported by: PeterHalls Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords: gml
Cc:

Description

Ogr2ogr did an excellent job converting the old Ordnance Survey NTF data; now Ordnance Survey have moved to GML for Mastermap. Attempting to convert Mastermap data earns "Missing outerBoundaryIs property on Polygon" and neither polygon nor point data are converted. Tested in 1.4.1.

As is permitted in the GML Standard, Ordnance Survey have introduced a private namespace, osgb, which includes lower case repetitions of GML tags - specifically <osgb:polygon> and <osgb:point>. Module ogr/gml2ogrgeometry.cpp, function GML2OGRGeometry_XMLNode, performs a case insensitive match outside namespace and matches (osgb:)polygon with (GML:)Polygon and (osgb:)point with (GML:)Point and gets thoroughly confused. It should treat these as for multipolygon/multipoint, ignore the osgb tag and process the GML tags as usual.

Attached is an edited form of gml2ogrgeometry.cpp which now seems to perform as expected.

Sample OSGB Mastermap data, for testing, is available from http://www.ordnancesurvey.co.uk/oswebsite/products/osmastermap/layers/topography/sample.html

Attachments (1)

gml2ogrgeometry.cpp (24.5 KB ) - added by PeterHalls 17 years ago.
gdal-1.4.1/ogr/gml2ogrgeometry.cpp as modified at York

Download all attachments as: .zip

Change History (4)

by PeterHalls, 17 years ago

Attachment: gml2ogrgeometry.cpp added

gdal-1.4.1/ogr/gml2ogrgeometry.cpp as modified at York

comment:1 by warmerdam, 17 years ago

Component: defaultOGR_SF
Keywords: gml added
Milestone: 1.5.0

This is a known issue, and I'm leery about the suggested change which may break other things. I'm leaving this open for now, hopefully for closer review before 1.5.0 release.

comment:2 by warmerdam, 16 years ago

Milestone: 1.5.01.6.0

comment:3 by Even Rouault, 15 years ago

Milestone: 1.6.1
Resolution: duplicate
Status: newclosed

Fixed by #2215 (gdal 1.5.1) and #2709 (gdal 1.5.4)

Note: See TracTickets for help on using tickets.