Opened 12 years ago

Last modified 7 years ago

#1986 new enhancement

Support curved geometry in ST_GeomFromGML

Reported by: pramsey Owned by: pramsey
Priority: medium Milestone: PostGIS Fund Me
Component: postgis Version: master
Keywords: sql/mm Cc: petr@…

Description

In general, GML allows representation of curved features from SQL/MM so we should be able to consume them.

For example:

select st_astext(st_geomfromgml(
    '<gml:Polygon xmlns:gml="http://www.opengis.net/gml/3.2" 
    gml:id="HPA.15449990010" srsName="urn:ogc:def:crs:EPSG::2065" 
    srsDimension="2">
    <gml:exterior>
    <gml:Ring>
    <gml:curveMember>
    <gml:LineString gml:id="HPA.15449990010.1">
    <gml:posList>711540.35 1070163.61 711523.82 1070166.54 711521.30 1070164.14 711519.52 1070162.44 711518.57 1070164.62 712154.47 1070824.94</gml:posList>
    </gml:LineString>
    </gml:curveMember>
    <gml:curveMember>
    <gml:Curve gml:id="HPA.15449990010.2">
    <gml:segments><gml:ArcString>
    <gml:posList>712154.47 1070824.94 712154.98 1070826.04 712154.41 1070827.22</gml:posList>
    </gml:ArcString>
    </gml:segments>
    </gml:Curve>
    </gml:curveMember>
    <gml:curveMember>
    <gml:LineString gml:id="HPA.15449990010.3">
    <gml:posList>712154.41 1070827.22 712160.31 1070837.07 712160.92 1070835.36 712207.89 1071007.95</gml:posList>
    </gml:LineString>
    </gml:curveMember>
    <gml:curveMember>
    <gml:Curve gml:id="HPA.15449990010.4"><gml:segments><gml:ArcString><gml:posList>712207.89 1071007.95 712207.48 1071005.59 712208.38 1071001.28</gml:posList></gml:ArcString></gml:segments></gml:Curve></gml:curveMember><gml:curveMember><gml:LineString gml:id="HPA.15449990010.5"><gml:posList>712208.38 1071001.28 712228.74 1070949.67 712233.98 1070936.15 712124.93 1070788.72</gml:posList></gml:LineString></gml:curveMember><gml:curveMember><gml:Curve gml:id="HPA.15449990010.6"><gml:segments><gml:ArcString><gml:posList>712124.93 1070788.72 712124.28 1070785.87 712124.63 1070783.38</gml:posList></gml:ArcString></gml:segments></gml:Curve></gml:curveMember><gml:curveMember><gml:LineString gml:id="HPA.15449990010.7"><gml:posList>712124.63 1070783.38 712141.04 1070764.12 712146.60 1070757.01 711540.35 1070163.61</gml:posList></gml:LineString></gml:curveMember></gml:Ring></gml:exterior>
    <gml:interior>
    <gml:LinearRing>
    <gml:posList>713061.62 1070354.46 713053.59 1070335.12 713049.58 1070315.92 713049.65 1070298.33 713061.62 1070354.46</gml:posList>
    </gml:LinearRing>
    </gml:interior>
    </gml:Polygon>'));

Change History (5)

comment:1 by xificurk, 12 years ago

Cc: petr@… added

comment:2 by radeczek, 12 years ago

I have same problem, posthis crashes after running

SELECT ST_AsText(ST_GeomFromGML('
<gml:Polygon xmlns:gml="http://www.opengis.net/gml/3.2" gml:id="HPA.9107539010" srsName="urn:ogc:def:crs:EPSG::2065" srsDimension="2">
<gml:exterior><gml:Ring><gml:curveMember>
<gml:LineString gml:id="HPA.9107539010.1">
<gml:posList>521259.34 1168197.00 521254.10 1168199.65</gml:posList>
</gml:LineString></gml:curveMember><gml:curveMember><gml:Curve gml:id="HPA.9107539010.2"><gml:segments><gml:ArcString>
<gml:posList>521254.10 1168199.65 521243.58 1168206.99 521235.56 1168217.00</gml:posList></gml:ArcString>
</gml:segments>
</gml:Curve>
</gml:curveMember>
<gml:curveMember>
<gml:LineString gml:id="HPA.9107539010.3"><gml:posList>521235.56 1168217.00 521284.43 1168247.50 521289.61 1168237.50 521259.34 1168197.00</gml:posList></gml:LineString>
</gml:curveMember></gml:Ring>
</gml:exterior><gml:interior>
<gml:LinearRing><gml:posList>521260.81 1168207.70 521262.47 1168209.51 521264.62 1168209.57 521264.56 1168211.84 521266.33 1168213.83 521266.10 1168217.37 521262.42 1168217.10 521261.75 1168216.55 521259.47 1168216.42 521253.91 1168221.53 521247.79 1168214.90 521255.84 1168207.48 521255.97 1168204.83 521260.96 1168205.12 521260.81 1168207.70
</gml:posList></gml:LinearRing></gml:interior></gml:Polygon>'))

Error message is only: " Error "

comment:3 by robe, 12 years ago

Milestone: PostGIS 2.1.0PostGIS 2.2.0

comment:4 by pramsey, 9 years ago

Milestone: PostGIS 2.2.0PostGIS Future

No comments, no interest, no dev.

comment:5 by robe, 7 years ago

Milestone: PostGIS FuturePostGIS Fund Me

Milestone renamed

Note: See TracTickets for help on using tickets.