I have a web-gis application based on OpenLayers and GeoServer. I need to modify a shape layer. I'm able to show the shape using the OpenLayers.Layer.WMS method. In fact I published the shape in GeoServer and called it in the OpenLayers map file.

My idea is to copy the shape layer in a vector layer. In this way I can modify the vector layer before to save it.

How can I copy the shape layer in a vector layer?


Why dont you use WFS-T in geoserver. You know a transactional Web Feature Service (WFS-T) allows all CRUD Operations as creation, deletion, and updating of features. I know that GeoServer supports WFS-T which they have told in wikipedia as:

In addition, one can edit data via the WFS transactional profile (WFS-T).

and in reference page you can find sth:

The Transaction operation performs edits of actual data that is exposed by the WFS. A transaction can add, modify and remove features. Each transaction consists of zero or more Insert, Update and Delete elements. Each element is performed in order....

and the last thing if you search any tutorial about how can you achieve WFS-T operation, you should read OpenLayers WFS-T Using a GeoServer Hosted PostGIS Layer which realy giving excellent information about what you search...

From that site, maybe this is important before reading.

This is an advanced OpenLayers tutorial which explains how to setup your own WFS-T example using a combination of GeoServer and PostgreSQL/PostGIS. In order to complete this tutorial, a user must have administrative access to both GeoServer and PostgreSQL running on a server. Users must also have an intermediate understanding of programming OpenLayers for developing web mapping applications.

I hope it helps you...


At the end I've found the way to visualize the layer.

The problem was that it seems that I needed to define the bounds of the map. What is not exactly clear is why, once you have defined a starting bounds, if you move the map over the bounds, you still can see the layer.

By the way, it doesn't matter. The important is to have clear how to set a wfs layer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.