[postgis-devel] [PostGIS] #1377: GML for empty geometries should be NULL
PostGIS
trac at osgeo.org
Wed Dec 14 12:15:46 PST 2011
#1377: GML for empty geometries should be NULL
---------------------+------------------------------------------------------
Reporter: strk | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis | Version: trunk
Keywords: |
---------------------+------------------------------------------------------
Comment(by aperi2007):
Hi,
I tested with xml-spy the available solutions so this solutions are all
acceptable with the xsd rules of GML 3.1.1
{{{
<gml:MultiCurve srsName="urn:ogc:def:crs:EPSG:3003">
<gml:curveMember>
<gml:Curve>
<gml:segments>
<gml:LineStringSegment>
<gml:posList srsDimension="2"></gml:posList>
</gml:LineStringSegment>
</gml:segments>
</gml:Curve>
</gml:curveMember>
</gml:MultiCurve>
<gml:MultiCurve srsName="urn:ogc:def:crs:EPSG:3003">
<gml:curveMember>
<gml:Curve>
<gml:segments>
<gml:LineStringSegment>
<gml:posList srsDimension="2" />
</gml:LineStringSegment>
</gml:segments>
</gml:Curve>
</gml:curveMember>
</gml:MultiCurve>
<gml:LineString srsName="urn:ogc:def:crs:EPSG:3003">
<gml:posList srsDimension="2" />
</gml:LineString>
<gml:Point srsName="urn:ogc:def:crs:EPSG:3003">
<gml:pos srsDimension="2" />
</gml:Point>
<gml:MultiPoint srsName="urn:ogc:def:crs:EPSG:3003">
<gml:pointMember>
<gml:Point>
<gml:pos srsDimension="2" />
</gml:Point>
</gml:pointMember>
</gml:MultiPoint>
<gml:TopoCurve>
<gml:directedEdge>
<gml:Edge gml:id="Edge_32_2174" >
<gml:directedNode orientation="-">
<gml:Node gml:id="Node_1_231068"/>
</gml:directedNode>
<gml:directedNode xlink:href="#Node_1_231068"/>
<gml:curveProperty>
<gml:LineString srsName="urn:ogc:def:crs:EPSG:3003">
<gml:posList srsDimension="2" />
</gml:LineString>
</gml:curveProperty>
</gml:Edge>
</gml:directedEdge>
</gml:TopoCurve>
}}}
please notice that this instead give an error to validate test:
{{{
<gml:TopoCurve>
<gml:directedEdge>
<gml:Edge gml:id="Edge_32_2174">
<gml:directedNode orientation="-">
<gml:Node gml:id="Node_1_231068"/>
</gml:directedNode>
<gml:directedNode xlink:href="#Node_1_231068"/>
<gml:curveProperty>
<gml:LineString srsName="urn:ogc:def:crs:EPSG:3003"/>
</gml:curveProperty>
</gml:Edge>
</gml:directedEdge>
</gml:TopoCurve>
also this is not allowed:
<gml:TopoCurve>
<gml:directedEdge>
<gml:Edge gml:id="Edge_32_2174" />
</gml:directedEdge>
</gml:TopoCurve>
}}}
instead this is compliant with xsd validate:
{{{
<gml:TopoCurve>
<gml:directedEdge>
<gml:Edge gml:id="Edge_32_2174">
<gml:directedNode orientation="-">
<gml:Node gml:id="Node_1_231068"/>
</gml:directedNode>
<gml:directedNode xlink:href="#Node_1_231068"/>
<gml:curveProperty />
</gml:Edge>
</gml:directedEdge>
</gml:TopoCurve>
}}}
So I Guess the better strategy is put always on the posList or pos tag the
null,
using
<posList />
or
<pos />
regards,
Andrea.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/1377#comment:1>
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-devel
mailing list