Opened 11 years ago

Closed 11 years ago

#2215 closed defect (fixed)

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 (3)

comment:1 Changed 11 years ago by warmerdam

Component: defaultOGR_SF
Keywords: gml added

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.

comment:2 Changed 11 years ago by warmerdam

Milestone: 1.6.01.5.1
Status: newassigned

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.

comment:3 Changed 11 years ago by hobu

Resolution: fixed
Status: assignedclosed
Summary: GML driver having trouble with large multipolygon geometries from MapServer 4.10GML 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.