[Geoserver-users] Possible to update more than one feature within one same request?

Hi,

I understand we can do a <wfs:Update> to update the geometry field of a
particular feature with a filter:

<wfs:Update typeName = "prrm:vehicle_map">

                        <wfs:Property>

                                    <wfs:Name>the_geom</wfs:Name>

                                    <wfs:Value>

                                                <prrm:the_geom>

                                                            <gml:Point
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;

<gml:coordinates>104.18235378265355,1.383478808</gml:coordinates>

                                                             </gml:Point>

                                                </prrm:the_geom>

</wfs:Value>

</wfs:Property>

<ogc:Filter>

<ogc:PropertyIsEqualTo>

<ogc:PropertyName>vehicle_number</ogc:PropertyName>

<ogc:Literal>SGD7575D</ogc:Literal>

</ogc:PropertyIsEqualTo>

</ogc:Filter>

            </wfs:Update>

My question is, is it possible to update the coordinates of more than one
feature within just one request? That is, suppose I have this set of data
consisting of three records [SGD7575D, 104.18235378265355,1.383478808],
[FZ8989L, 103.8617263193862,1.311391065], [GT1212A,
103.7945074844350,1.329840021] and I want to update all the features at the
same time. Is it possible to do it and how should I construct my request?

Would greatly appreciate any help/suggestions I can get. Thanks a lot.

Regards,
Lee Wai See
ST Electronics (Info-Software Systems) Pte Ltd

[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the message
from your system; please do not copy or use it for any purpose, nor disclose
its contents to any other person. Thank you.]
---ST Electronics Group---

You're updating each to a different set of coordinates? If you're updating all three to the same coordinate you can just use <Or> filters on the three values to match against.

If they're each their own update, you can do it all in one request, a Transaction can have multiple Insert, Update or Deletes. Just make the three different Updates, and put them one after another inside the transaction. GeoServer should update things atomically (if one fails then none of them go in), and all in one request.

best regards,

Chris

Lee Wai See wrote:

Hi,

I understand we can do a <wfs:Update> to update the geometry field of a particular feature with a filter:

<wfs:Update typeName = "prrm:vehicle_map">

                        <wfs:Property>

                                    <wfs:Name>the_geom</wfs:Name>

                                    <wfs:Value>

                                                <prrm:the_geom>

                                                            <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;

                                                                        <gml:coordinates>104.18235378265355,1.383478808</gml:coordinates&g t;

                                                             </gml:Point>

                                                </prrm:the_geom>

</wfs:Value>

</wfs:Property>

<ogc:Filter>

<ogc:PropertyIsEqualTo>

<ogc:PropertyName>vehicle_number</ogc:PropertyName>

                                                <ogc:Literal>SGD7575D</ogc:Literal>

</ogc:PropertyIsEqualTo>

</ogc:Filter>

            </wfs:Update>

My question is, is it possible to update the coordinates of more than one feature within just one request? That is, suppose I have this set of data consisting of three records [SGD7575D, 104.18235378265355,1.383478808], [FZ8989L, 103.8617263193862,1.311391065], [GT1212A, 103.7945074844350,1.329840021] and I want to update all the features at the same time. Is it possible to do it and how should I construct my request?

Would greatly appreciate any help/suggestions I can get. Thanks a lot.

Regards,
Lee Wai See
ST Electronics (Info-Software Systems) Pte Ltd

[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the message
from your system; please do not copy or use it for any purpose, nor disclose
its contents to any other person. Thank you.]
---ST Electronics Group---

!DSPAM:1003,44add28e33971194215290!

------------------------------------------------------------------------

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

!DSPAM:1003,44add28e33971194215290!

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:1003,44add28e33971194215290!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org