[Gdal-dev] Revision 1.8 to GMLHandler.cpp seems to have broken UK Ordnance Survey GML files

Roger James roger at beardandsandals.co.uk
Mon Apr 2 20:36:31 EDT 2007


The latest revision (1.8) to GMLHandler.cpp has broken the reading UK
ordnance survey GML files.
Polygon features in the Ordnance Survey schema look like this.

      <osgb:polygon>
        <gml:Polygon srsName="osgb:BNG">
          <gml:outerBoundaryIs>
            <gml:LinearRing>
              <gml:coordinates>347346.09,461580.61 347345.35,461585.4
347337.97,461584.11 347338.7,461579.38 347346.09,461580.61</gml:coordinates>
            </gml:LinearRing>
          </gml:outerBoundaryIs>
        </gml:Polygon>
      </osgb:polygon>

This used to work in GMLReader::PrescanForSchema because osgb:polygon was
not recognised as a Geometry Element by GMLHander:: IsGeometryElement.

However at 1.8 because the namespace has been stripped it is now recognised
as a polygon geometry element. This causes a subsequent failure in
GML2OGRGeometry_XMLNode because outerBoundaryIsland is no longer an
immediate child of the polygon node.

I am not sure if this is a fatal error because I got fed up of looking at
all the error messages on the large file I was processing!

How do I get past this?

Thanks

Roger






More information about the Gdal-dev mailing list