Adds srsDimension to the pos and posList nodes when writing a WFS transaction

The WFS transaction failed if the srsDimension was not present on the
geometries.
Unit tests have been changed to accomodate the srsDimension attribute.
This commit is contained in:
Joao Gouveia
2017-08-16 10:20:22 +02:00
parent 44558b7c89
commit 5fce1b0351
9 changed files with 97 additions and 62 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
<gml:MultiPoint xmlns:gml="http://www.opengis.net/gml">
<gml:pointMember>
<gml:Point>
<gml:pos>1 2</gml:pos>
<gml:pos srsDimension="2">1 2</gml:pos>
</gml:Point>
</gml:pointMember>
</gml:MultiPoint>
@@ -20,7 +20,7 @@
<gml:MultiPoint xmlns:gml="http://www.opengis.net/gml">
<gml:pointMember>
<gml:Point>
<gml:pos>1 2</gml:pos>
<gml:pos srsDimension="2">1 2</gml:pos>
</gml:Point>
</gml:pointMember>
</gml:MultiPoint>
@@ -5,7 +5,7 @@
<gml:MultiPoint xmlns:gml="http://www.opengis.net/gml">
<gml:pointMember>
<gml:Point>
<gml:pos>1 2 3</gml:pos>
<gml:pos srsDimension="3">1 2 3</gml:pos>
</gml:Point>
</gml:pointMember>
</gml:MultiPoint>
@@ -20,7 +20,7 @@
<gml:MultiPoint xmlns:gml="http://www.opengis.net/gml">
<gml:pointMember>
<gml:Point>
<gml:pos>1 2 3</gml:pos>
<gml:pos srsDimension="3">1 2 3</gml:pos>
</gml:Point>
</gml:pointMember>
</gml:MultiPoint>
+1 -1
View File
@@ -1 +1 @@
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:Insert><feature:FAULTS xmlns:feature="http://foo"><feature:the_geom><gml:MultiCurve xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:900913"><gml:curveMember><gml:LineString srsName="EPSG:900913"><gml:posList>-5178372.1885436 1992365.7775042 -4434792.7774889 1601008.1927386 -4043435.1927233 2148908.8114105</gml:posList></gml:LineString></gml:curveMember></gml:MultiCurve></feature:the_geom><feature:TYPE>xyz</feature:TYPE></feature:FAULTS></wfs:Insert></wfs:Transaction>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:Insert><feature:FAULTS xmlns:feature="http://foo"><feature:the_geom><gml:MultiCurve xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:900913"><gml:curveMember><gml:LineString srsName="EPSG:900913"><gml:posList srsDimension="2">-5178372.1885436 1992365.7775042 -4434792.7774889 1601008.1927386 -4043435.1927233 2148908.8114105</gml:posList></gml:LineString></gml:curveMember></gml:MultiCurve></feature:the_geom><feature:TYPE>xyz</feature:TYPE></feature:FAULTS></wfs:Insert></wfs:Transaction>
@@ -8,7 +8,7 @@
<Value><MultiLineString xmlns="http://www.opengis.net/gml" srsName="EPSG:900913">
<lineStringMember>
<LineString srsName="EPSG:900913">
<posList>-12279454 6741885 -12064207
<posList srsDimension="2">-12279454 6741885 -12064207
6732101 -11941908 6595126
-12240318 6507071 -12416429
6604910</posList>
@@ -8,7 +8,7 @@
<MultiLineString xmlns="http://www.opengis.net/gml" srsName="EPSG:900913">
<lineStringMember>
<LineString srsName="EPSG:900913">
<posList>-12279454 6741885 -12064207
<posList srsDimension="2">-12279454 6741885 -12064207
6732101 -11941908 6595126
-12240318 6507071 -12416429
6604910</posList>
@@ -20,7 +20,7 @@
<MultiLineString xmlns="http://www.opengis.net/gml" srsName="EPSG:900913">
<lineStringMember>
<LineString srsName="EPSG:900913">
<posList>-12000000 6700000 -12000001 6700001 -12000002 6700002</posList>
<posList srsDimension="2">-12000000 6700000 -12000001 6700001 -12000002 6700002</posList>
</LineString>
</lineStringMember>
</MultiLineString>