[Mapbender-users] wfs:transaction problem

Michael Schwarz mschwarz at umwelt-freiraum.de
Thu Oct 4 09:26:26 EDT 2007


Hello,

i have the problem that when I´m digitizing a polygon and saving it the
'geom' get the value 'NULL'. In the request the content between <geom>
and </geom> is missing. All other attributes were saved in the database.

Here the request from the mapbender log:

<wfs:Transaction version="1.0.0" service="WFS"
xmlns="http://www.someserver.com/myns"
xmlns:citef="http://www.opengis.net/cite/functions"
xmlns:gml="http://www.opengis.net/gml"
xmlns:topp="http://www.openplans.org/topp"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wfs="http://www.opengis.net/wfs"
xsi:schemaLocation="http://www.someserver.com/myns
http://wms1.ccgis.de/geoserver-1.3-beta4/wfs/getCapabilities?request=des
cribefeaturetype
http://www.opengis.net/wfs../wfs/1.0.0/WFS-transaction.xsd">
<wfs:Insert>
<topp:freigaben_md1>
<Nr>4</Nr>
<geom>
</geom>
</topp:freigaben_md1>
</wfs:Insert>
</wfs:Transaction> 

This problem only appears with polygons or multipolygons. With points
and lines all works fine.

As a test I have complete the request like the following

<wfs:Transaction service="WFS" version="1.0.0"
  xmlns:wfs="http://www.opengis.net/wfs"
  xmlns:topp="http://www.openplans.org/topp"
  xmlns:gml="http://www.opengis.net/gml"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd
http://www.openplans.org/topp
http://127.0.0.1:8080/geoserver/wfs/DescribeFeatureType?typename=topp:fr
eigaben_md1">
<wfs:Insert>
<topp:freigaben_md1>
<Nr>3</Nr>
<geom>
<gml:MultiPolygon srsName="EPSG:4326">
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>0,0 20,0 20,20 30,30 0,20 0,0</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</geom>
</topp:freigaben_md1>
</wfs:Insert>
</wfs:Transaction>

and the request will be done well. 

Did anyone have an advice where to look for the error?


Greating! Michael



Deutsch

Hallo,

ich habe das Problem, dass beim Digitalisieren und dem anschließenden
Speichern von Multipolygonen der Wert für die Geometryspalte auf "Null"
gesetzt wird. Alle anderen Attribute werden wie gewollt gespeichert. Im
Request fehlt der Inhalt des Geometry-Objektes. 

Hier der Request aus dem mapbender log:

<wfs:Transaction version="1.0.0" service="WFS"
xmlns="http://www.someserver.com/myns"
xmlns:citef="http://www.opengis.net/cite/functions"
xmlns:gml="http://www.opengis.net/gml"
xmlns:topp="http://www.openplans.org/topp"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wfs="http://www.opengis.net/wfs"
xsi:schemaLocation="http://www.someserver.com/myns
http://wms1.ccgis.de/geoserver-1.3-beta4/wfs/getCapabilities?request=des
cribefeaturetype
http://www.opengis.net/wfs../wfs/1.0.0/WFS-transaction.xsd">
<wfs:Insert>
<topp:freigaben_md1>
<Nr>4</Nr>
<geom>
</geom>
</topp:freigaben_md1>
</wfs:Insert>
</wfs:Transaction>

Das Problem tritt nur bei Polygonen bzw. Multipolygonen auf. Mit den
entsprechenden FeatureTypes kann ich ohne Probleme Linien und Punkte
digitalisieren und bearbeiten.

Als Test habe ich den oben stehenden Request mal wie folgt ergänzt:

<wfs:Transaction service="WFS" version="1.0.0"
  xmlns:wfs="http://www.opengis.net/wfs"
  xmlns:topp="http://www.openplans.org/topp"
  xmlns:gml="http://www.opengis.net/gml"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd
http://www.openplans.org/topp
http://127.0.0.1:8080/geoserver/wfs/DescribeFeatureType?typename=topp:fr
eigaben_md1">
<wfs:Insert>
<topp:freigaben_md1>
<Nr>3</Nr>
<geom>
<gml:MultiPolygon srsName="EPSG:4326">
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>0,0 20,0 20,20 30,30 0,20 0,0</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</geom>
</topp:freigaben_md1>
</wfs:Insert>
</wfs:Transaction>

Jetzt wird auch die Geometriespalte richtig in die Datenbank
eingetragen.

Weiß jemand, wo das Problem liegen könnte?


Viele Grüße!

Michael



More information about the Mapbender_users mailing list