Ticket #2215 (closed defect: fixed)

Opened 3 months ago

Last modified 3 months ago

GML driver having trouble detecting geometries when same name but different cased properties exist

Reported by: hobu Assigned to: warmerdam
Priority: normal Milestone: 1.5.1
Component: OGR_SF Version: unspecified
Severity: normal Keywords: gml
Cc:

Description

http://iowa.hobu.biz/wfs.response.txt

with the latest trunk, ogrinfo on this file reports the attributes, but it does not report geometries.

Chris Schmidt reports that it also doesn't work (no geometries) with 1.4.0, but it *does* work with 1.3.2.

Change History

02/11/08 12:25:07 changed by warmerdam

  • keywords set to gml.
  • component changed from default to OGR_SF.

The problem is that naming the geometry property ms:multipolygon is confusing the GML parser. It ends up passing that element down as the geometry instead of just the gml:MultiPolygon element and down as it ought. The file features look like:

      <ms:MapunitPoly fid="406383">
        <gml:boundedBy>
        	<gml:Box srsName="EPSG:26915">
        		<gml:coordinates>378639.582311,4595526.382760 390145.197808,4600100.860224</gml:coordinates>
        	</gml:Box>
        </gml:boundedBy>
        <ms:mpgeometry>
        <gml:MultiPolygon srsName="EPSG:26915">
        <gml:polygonMember>
          <gml:Polygon>
            <gml:outerBoundaryIs>
...

I was able to get the file working properly by doing a search and replace of ms:multipolygon to ms:mpgeometry.

Ideally the GML parser would be much smarter. But that is hard to do, so a work around would be to modify MapServer? to avoid using the same names for properties as are element names in GML.

02/11/08 12:49:15 changed by warmerdam

  • status changed from new to assigned.
  • milestone changed from 1.6.0 to 1.5.1.

On reflection, I've decided that GMLHandler::IsGeometryElement?() really ought to do a case sensitive test of the element name which will help avoid this sort of false positive situation. I have applied this change in trunk (r13760) and 1.5 branch (r13761) and it fixes this particular problem.

02/11/08 12:54:11 changed by hobu

  • status changed from assigned to closed.
  • resolution set to fixed.
  • summary changed from GML driver having trouble with large multipolygon geometries from MapServer 4.10 to GML driver having trouble detecting geometries when same name but different cased properties exist.

confirmed that this fixes it.