Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3244 closed defect (fixed)

ParseGMLCoordinates() only parses the first <gml:pos> element of a <LinearRing> (GML 3.1.1)

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone: 1.6.3
Component: default Version: unspecified
Severity: normal Keywords: GML
Cc:

Description

Quote of http://lists.osgeo.org/pipermail/gdal-dev/2009-November/022738.html

As an example of how things are going wrong, here’s sample input text to createFromGML where a collection of <pos> elements is used:

<p1:polygon xmlns:p1="http://foo" xmlns:p2="http://www.opengis.net/gml">

 

  <p2:exterior>

    <p2:LinearRing>

      <p2:pos>-39 77.5</p2:pos>

      <p2:pos>-38.75 77.75</p2:pos>

      <p2:pos>-38.5 77.75</p2:pos>

      <p2:pos>-38.25 77.5</p2:pos>

      <p2:pos>-38.25 77.25</p2:pos>

      <p2:pos>-38.5 77</p2:pos>

      <p2:pos>-38.75 77</p2:pos>

      <p2:pos>-39 77.25</p2:pos>

      <p2:pos>-39 77.5</p2:pos>

    </p2:LinearRing>

  </p2:exterior>

 

  <p2:interior>

    <p2:LinearRing>

      <p2:pos>-38.75 77.5</p2:pos>

      <p2:pos>-38.5 77.5</p2:pos>

      <p2:pos>-38.5 77.25</p2:pos>

      <p2:pos>-38.75 77.25</p2:pos>

      <p2:pos>-38.75 77.5</p2:pos>

    </p2:LinearRing>

  </p2:interior>

</p1:polygon>

 

Given the OGRGeometry created from the above text, exportToWkt gives me the following:

POLYGON ((-39.0 77.5),(-38.75 77.5))

Change History (2)

comment:1 by Even Rouault, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk (r18085) and in branches/1.6 (r18086 - probably in 1.6.4 if 1.6.3RC1 is promotted directly). Test added in r18087

comment:2 by Even Rouault, 14 years ago

Milestone: 1.6.3

There was a RC2 so it's in 1.6.3 ;-)

Note: See TracTickets for help on using tickets.