[OpenLayers-Users] Problem with Wfs-t, Geoserver & GML

Husson Florian f.husson at brgm.fr
Tue Jun 5 05:23:28 EDT 2007


Hi,
 
I work with OpenLayers 2.4 + Geoserver + PostGIS, and I used the
wfs-scribble example like starting point.
 
I have a geometry table in PostGIS, to put any type of geometry (point,
polygon, line...) inside, wich corresponds to my only layer on my
application.
On this layer, I can so draw line, point and polygon.
I have to recover my layer in GML form to make treatments above
thereafter.
 
 
Here is my problem :
 
* When I draw a (or several) feature(s) and then I click on "Export GML"
button, it's great : 
 
<gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml">
<http://www.opengis.net/gml">> 
 
<gml:featureMember><wps:feat xmlns:wps="http://swing.brgm.fr/wps">
<http://swing.brgm.fr/wps">>
<wps:msGeometry><gml:MultiPolygon><gml:polygonMember><gml:Polygon><gml:o
uterBoundaryIs><gml:LinearRing>
<gml:coordinates decimal="." cs="," ts=" ">-28.02734375,38.06640625
-31.806640625,29.453125 -13.701171875,32.353515625
-28.02734375,38.06640625</gml:coordinates>
</gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember
></gml:MultiPolygon></wps:msGeometry><wps:name>polygon1</wps:name></wps:
feat></gml:featureMember>
 
<gml:featureMember><wps:feat xmlns:wps="http://swing.brgm.fr/wps">
<http://swing.brgm.fr/wps">>
<wps:msGeometry><gml:MultiPoint><gml:pointMember><gml:Point>
<gml:coordinates decimal="." cs="," ts="
">1.56982422,28.13476562</gml:coordinates>
</gml:Point></gml:pointMember></gml:MultiPoint></wps:msGeometry><wps:nam
e>point1</wps:name></wps:feat></gml:featureMember>
 
<gml:featureMember><wps:feat xmlns:wps="http://swing.brgm.fr/wps">
<http://swing.brgm.fr/wps">>
<wps:msGeometry><gml:MultiLineString><gml:lineStringMember><gml:LineStri
ng>
<gml:coordinates decimal="." cs="," ts=" ">-9.39453125,44.04296875
5.458984375,46.6796875 </gml:coordinates>
</gml:LineString></gml:lineStringMember></gml:MultiLineString></wps:msGe
ometry><wps:name>line1</wps:name></wps:feat></gml:featureMember>
</gml:FeatureCollection>
 
 
 
* But when I draw features, and then I save them into database with
button "Save", if I refresh and then I click on "Export GML", here is
the result : 
 
<gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml">
<http://www.opengis.net/gml">> 
<gml:featureMember><wps:feat xmlns:wps="http://swing.brgm.fr/wps">
<http://swing.brgm.fr/wps">>
<wps:msGeometry><gml:MultiPolygon><gml:polygonMember><gml:Polygon><gml:o
uterBoundaryIs><gml:LinearRing>
<gml:coordinates decimal="." cs="," ts="
">undefined,undefined</gml:coordinates>
</gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember
></gml:MultiPolygon></wps:msGeometry></wps:feat></gml:featureMember>
<gml:featureMember><wps:feat xmlns:wps="http://swing.brgm.fr/wps">
<http://swing.brgm.fr/wps">>
<wps:msGeometry><gml:MultiPoint><gml:pointMember><gml:Point>
<gml:coordinates decimal="." cs="," ts=" ">1.56982422,28.13476562
</gml:coordinates>
</gml:Point></gml:pointMember></gml:MultiPoint></wps:msGeometry></wps:fe
at></gml:featureMember>
<gml:featureMember><wps:feat xmlns:wps="http://swing.brgm.fr/wps">
<http://swing.brgm.fr/wps">>
<wps:msGeometry><gml:MultiLineString><gml:lineStringMember><gml:LineStri
ng>
<gml:coordinates decimal="." cs="," ts=" ">undefined,undefined
</gml:coordinates>
</gml:LineString></gml:lineStringMember></gml:MultiLineString></wps:msGe
ometry></wps:feat></gml:featureMember>
</gml:FeatureCollection>
 
 The features are drawn perfectly on the screen, but only the GML of
point's geometry is correct, and moreover, the name of my features
(attributte name) don't appear anymore in the GML.
 
 
any ideay ?
 
Thanks,
Florian.
**********************************************************************************************

Pensez à l'environnement avant d'imprimer ce message
 Think Environment before printing
 
Le contenu de ce mél et de ses pièces jointes est destiné à l'usage exclusif du (des) destinataire(s) désigné(s) 
comme tel(s). 
En cas de réception par erreur, le signaler à son expéditeur et ne pas en divulguer le contenu. 
L'absence de virus a été vérifiée à l'émission, il convient néanmoins de s'assurer de l'absence de 
contamination à sa réception.
 
The contents of this email and any attachments areconfidential. They are intended for the named recipient(s) 
only. 
If you have received this email in error please notifythe system manager or the sender immediately and do not 
disclose the contents to anyone or make copies. 
eSafe scanned this email for viruses, vandals and malicious content.
 
**********************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070605/631ddc84/attachment.html


More information about the Users mailing list