I am attempting to insert a geometry into a table using the st_geomfromgml function.
The GML is being sourced from a Geoserver WFS request.
The function call looks like this
st_geomfromgml('<?xml version="1.0" encoding="UTF-8"?><gml:LineString xmlns:gml="http://www.opengis.net/gml" srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" srsDimension="2">
<gml:posList>146.48296 -18.6222 146.48296 -18.6222</gml:posList>
</gml:LineString>');
This worked on PostGIS version POSTGIS="1.5.3" GEOS="3.3.1-CAPI-1.7.1" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.3" USE_STATS
but fails on POSTGIS="2.0.0 r9605" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.8.0, 6 March 2012" LIBXML="2.7.8" LIBJSON="UNKNOWN"
However I can make it work if I specify three dimensions like so;
select st_geomfromgml('<?xml version="1.0" encoding="UTF-8"?><gml:LineString xmlns:gml="http://www.opengis.net/gml" srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" srsDimension="3">
<gml:posList>146.48296 -18.6222 0 146.48296 -18.6222 0</gml:posList>
</gml:LineString>');
Is there a way to keep the geometry in two dimensions and insert it?
LineStringare the same, this appears to be the cause of my problem. – tojofo Feb 26 at 0:27