Open nmco opened 7 years ago
When updating 3D geometries the WFS transaction needs to include the srsDimension="3" attribute. MapStore is also not sending the elevation coordinates.
srsDimension="3"
To reproduce this issue just tried to edit a 3D geometry with MapStore feature editor.
Currently MapStore is sending this POST data:
<?xml version="1.0" encoding="UTF-8"?> <wfs:Transaction service="WFS" version="1.1.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> <wfs:Update typeName="feature:ASTE" xmlns:feature="http://sit.comune.genova.it/CORSO_1"> <wfs:Property> <wfs:Name>GEOMETRY</wfs:Name> <wfs:Value> <gml:LineString srsName="EPSG:900913" xmlns:gml="http://www.opengis.net/gml"> <gml:posList>990625.37934894 5529428.0925571 990670.88825339 5529319.98398187 990660.85541699 5529292.51595793 990656.22027412 5529275.78706304 990606.54237449 5529288.84293073 990563.04271315 5529303.00052165</gml:posList> </gml:LineString> </wfs:Value> </wfs:Property> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:FeatureId fid="ASTE.555560219"/> </ogc:Filter> </wfs:Update> </wfs:Transaction>
GeoServer will not accept the transaction request.
The correct POST data should be similar to this one:
<?xml version="1.0" encoding="UTF-8"?> <wfs:Transaction service="WFS" version="1.1.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> <wfs:Update typeName="feature:ASTE" xmlns:feature="http://sit.comune.genova.it/CORSO_1"> <wfs:Property> <wfs:Name>GEOMETRY</wfs:Name> <wfs:Value> <gml:LineString srsDimension="3" srsName="EPSG:900913" xmlns:gml="http://www.opengis.net/gml"> <gml:posList>991442.21178071 5530360.55012233 106.3 991443.53181047 5530380.01284852 107.36 991475.45471724 5530380.34419275 106.62</gml:posList> </gml:LineString> </wfs:Value> </wfs:Property> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:FeatureId fid="ASTE.555560219"/> </ogc:Filter> </wfs:Update> </wfs:Transaction>
This can be tried with CURL (add the correct authentication token):
curl --request POST --url 'http://vm-linuxgeofetest.comune.genova.it/geoserver-test/wfs?authkey=<PUT AUTH TOKEN>' --header 'content-type: application/xml' --data '<?xml version="1.0" encoding="UTF-8"?><wfs:Transaction service="WFS" version="1.1.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"><wfs:Update typeName="feature:ASTE" xmlns:feature="http://sit.comune.genova.it/CORSO_1"><wfs:Property> <wfs:Name>GEOMETRY</wfs:Name> <wfs:Value> <gml:LineString srsDimension="3" srsName="EPSG:900913" xmlns:gml="http://www.opengis.net/gml"> <gml:posList>991442.21178071 5530360.55012233 106.3 991443.53181047 5530380.01284852 107.36 991475.45471724 5530380.34419275 106.62</gml:posList> </gml:LineString> </wfs:Value> </wfs:Property> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:FeatureId fid="ASTE.555560219"/> </ogc:Filter> </wfs:Update></wfs:Transaction>'
When updating 3D geometries the WFS transaction needs to include the
srsDimension="3"
attribute. MapStore is also not sending the elevation coordinates.To reproduce this issue just tried to edit a 3D geometry with MapStore feature editor.
Currently MapStore is sending this POST data:
GeoServer will not accept the transaction request.
The correct POST data should be similar to this one:
This can be tried with CURL (add the correct authentication token):