Ticket #1604 (new defect)

Opened 1 year ago

Last modified 7 months ago

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

Reported by: PeterHalls Assigned to: warmerdam
Priority: normal Milestone: 1.6.0
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

gml2ogrgeometry.cpp (24.5 kB) - added by PeterHalls on 05/02/07 02:46:33.
gdal-1.4.1/ogr/gml2ogrgeometry.cpp as modified at York

Change History

05/02/07 02:46:33 changed by PeterHalls

  • attachment gml2ogrgeometry.cpp added.

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

06/21/07 14:06:18 changed by warmerdam

  • keywords set to gml.
  • component changed from default to OGR_SF.
  • milestone set to 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.

12/11/07 10:01:37 changed by warmerdam

  • milestone changed from 1.5.0 to 1.6.0.