Modifying Feature TypesΒΆ

GeoServer provides a fully Transactional Web Feature Service (WFS-T) which enables users to insert / delete / modify the available FeatureTypes. This section shows a few of the GeoServer WFS-T capabilities and interactions with desktop GIS clients.


The layer Mainrd is required for this exercise. Be sure to have completed the Adding a Shapefile section.


This section assumes all the layers are open for anyone to modify.

Open the Security -> Data page

Ensure the Rule path *.*.w is set to be available to any role

Refer to the Layer level security section for further information


For this exercise, we will use uDig GIS desktop client. In general, all GIS desktop clients provides same kind of features allowing to reproduce the exercise.

  1. Open your preferred GIS desktop client. In our case QGIS.

  2. Add GeoServer WFS to the catalog. Use the import button in the catalog tab (1), and select “data” (2) in the first page of the wizard


    Select the Web Feature Service Data Source


    Insert the following address into the URL text box and press finish:


    Right click on the Mainrd layer from the list and select Add to current map

  3. The Mainrd layer is now visible in the uDig map

  4. Perform a zoom operation on the upper-right part of the layer.


    Zooming in ...


    Zooming in ...

  5. By using the Select and Edit Geometry tool try to move/add/remove some vertex to the small line at the center of the screen.


    Playing with the Geometry

  6. Once finished use the Commit tool to persist the changes on GeoServer.


    Committing changes throught the WFS-T protocol

  7. Use GeoServer Layer Preview to view the changes on the Mainrd layer.


    Showing the changes to the Mainrd Feature Type

  8. On uDig look the Feature attribute values using the Info tool.


    Retrieving Feature Type info from uDig interface

  9. Now open / create the request.xml file in the training root dir and set in the following request, which will be used to issue an update Feature type request to the WFS-T updating all roads labelled as Monarch Rd to Monarch Road

    <wfs:Transaction xmlns:topp="" xmlns:ogc="" xmlns:wfs="" service="WFS" version="1.0.0">
      <wfs:Update typeName="geosolutions:Mainrd">
              <wfs:Value>Monarch Road</wfs:Value>
                  <ogc:Literal>Monarch Rd</ogc:Literal>
  10. Issue the WFS-T request towards GeoServer using curl on the command line:

    curl -XPOST -d @request.xml -H "Content-type: application/xml" "http://localhost:8083/geoserver/ows"
  11. The response should be a TransactionResponse XML document containing a wfs:SUCCESS element

  12. Ask the info again using the uDig Info tool. In some cases you have also to refresh the catalog to see the data changes in uDig.


    Obtaining the updated Feature Type info from uDig interface

  13. Finally, obtain the Feature type info using the GetFeatureInfo operation issued directly by the Map Preview.


    Obtaining the updated Feature Type info from OpenLayers MapPreview GetFeatureInfo


In order to issue a GetFeatureInfo request from the OpenLayers MapPreview tool, just left-click over the line.