Ticket #2215 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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

Reported by: hobu Owned by: 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

Changed 5 years ago by warmerdam

  • keywords gml added
  • 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.

Changed 5 years ago 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.

Changed 5 years ago 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.

Note: See TracTickets for help on using tickets.