Opened 14 years ago
Closed 14 years ago
#802 closed defect (fixed)
AsGML: use posList with attribute rather than coordinates tag
Reported by: | aperi2007 | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.0 |
Component: | topology | Version: | master |
Keywords: | Cc: |
Description
In the GML generated from AsGML() I guess is better use the posList rather than coordinates (deprecated).
so instead of <gml:curveProperty> <gml:LineString srsName="EPSG:3003"> <gml:coordinates>1 4, 4 6,... </gml:coordinates> </gml:LineString> </gml:curveProperty>
is better:
<gml:curveProperty> <gml:LineString srsName="EPSG:3003"> <gml:posList srsDimension="2">1 4 4 6... </gml:posList> </gml:LineString> </gml:curveProperty>
please note the posList is with the attribute srsDimension to give the dimension and without comma separating the coordinates.
Change History (4)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
I tested with the xsd of GML 3.1.1.
Under a TopoCurve is mandatory a directedEdge. under the directedEdfge the only choice is Edge with the two directedNode. under the Edge because the choice is "curveProperties" under a curveProperties in a TopoCurve the only choice availables are: CompositeCurve, OrientableCurve, Curve and LineString
so the logical choice is "LineString".
There isn't the option of "LineStringSegment". That instead is good for the MultiCurve tag od type simplefeature (not for the topology "TopoCurve").
comment:3 by , 14 years ago
I check better. Is possibile to use the LineStringSegment, but using a sub-part of what generated from ST_AsGML(3). Infact the structure is like this:
<gml:TopoCurve>
<gml:directedEdge>
<gml:Edge gml:id="Edge_2_192278">
<gml:directedNode orientation="-">
<gml:Node gml:id="Node_1_242975" />
</gml:directedNode> <gml:directedNode>
<gml:Node gml:id="Node_1_243597" />
</gml:directedNode> <gml:curveProperty>
<gml:Curve>
<gml:segments>
<gml:LineStringSegment>
<gml:posList srsDimension="2">...</gml:posList>
</gml:LineStringSegment>
</gml:segments>
</gml:Curve>
</gml:curveProperty>
</gml:Edge>
</gml:directedEdge>
</gml:TopoCurve>
This version is better because allow even the description of multiparts repeating the LineStringSegments. Like this
<gml:TopoCurve>
<gml:directedEdge>
<gml:Edge gml:id="Edge_2_192278">
<gml:directedNode orientation="-">
<gml:Node gml:id="Node_1_242975" />
</gml:directedNode> <gml:directedNode>
<gml:Node gml:id="Node_1_243597" />
</gml:directedNode> <gml:curveProperty>
<gml:Curve>
<gml:segments>
<gml:LineStringSegment>
<gml:posList srsDimension="2">...</gml:posList>
</gml:LineStringSegment> <gml:LineStringSegment>
<gml:posList srsDimension="2">...</gml:posList>
</gml:LineStringSegment> <gml:LineStringSegment>
<gml:posList srsDimension="2">...</gml:posList>
</gml:LineStringSegment>
</gml:segments>
</gml:Curve>
</gml:curveProperty>
</gml:Edge>
</gml:directedEdge>
</gml:TopoCurve>
Regards
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
As of r6691 I've switched topology.AsGML to use GML3 for the curveProperty of Edges and pointProperty of Nodes.
Uhm, topology.AsGML is using the underlying ST_AsGML(geometry) for the components. These are the ST_AsGML outputs for GML version 2 and GML version 3:
and
Does the LineString-posList version you suggest correspond to another version ?