[postgis-tickets] [PostGIS] #2938: Patch for gml export of curved geometries
PostGIS
trac at osgeo.org
Fri Oct 31 02:20:17 PDT 2014
#2938: Patch for gml export of curved geometries
----------------------+-----------------------------------------------------
Reporter: mhugent | Owner: pramsey
Type: patch | Status: closed
Priority: medium | Milestone: PostGIS 2.1.5
Component: postgis | Version: 2.1.x
Resolution: fixed | Keywords:
----------------------+-----------------------------------------------------
Comment(by rouault):
I believe this export generates invalid GML that breaks both XML
validation and OGR GML importer. Child elements of "exterior" can be
LinearRing or Ring, but not directly curveMember. This is true for both
GML 3.1.1 and GML 3.2.1. XML validation of
{{{
<gml:Polygon xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/gml
http://schemas.opengis.net/gml/3.1.1/base/gml.xsd">
<gml:exterior><gml:curveMember><gml:Curve><gml:segments><gml:LineStringSegment><gml:posList
srsDimension="2">763650.6 189057.1 7636.35 189045.2 763650.549 189057.844
763650.6
189057.1</gml:posList></gml:LineStringSegment></gml:segments></gml:Curve></gml:curveMember></gml:exterior></gml:Polygon>
}}}
with the xmlvalidate.py utility from mapserver msautotest (based on
libxml2)
{{{
$ python pymod/xmlvalidate.py -ogc_schemas_location
wxs/SCHEMAS_OPENGIS_NET test.gml
}}}
gives
{{{
Element '{http://www.opengis.net/gml}curveMember': This element is not
expected. Expected is one of ( {http://www.opengis.net/gml}_Ring,
{http://www.opengis.net/gml}LinearRing, {http://www.opengis.net/gml}Ring
)., line 5
}}}
So the right export would be :
<gml:Polygon><gml:exterior><gml:Ring><gml:curveMember><gml:Curve><gml:segments><gml:LineStringSegment><gml:posList
srsDimension="2">763650.6 189057.1 7636.35 189045.2 763650.549 189057.844
763650.6
189057.1</gml:posList></gml:LineStringSegment></gml:segments></gml:Curve></gml:curveMember></gml:Ring></gml:exterior></gml:Polygon>
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2938#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list