Edit your data

In addition to graphical styling, GeoExplorer also allows for editing of geospatial data when the layer is served through a local copy of GeoServer. Since this is how our data was loaded, we will use GeoExplorer to edit features.

Note

Editing data served directly from shapefiles is not recommended. We recommend that you load your data into a spatial database such as PostGIS before editing.

If you don’t wish to edit any of your data, you can continue on to Compose and publish your map.

Editing an existing feature

To edit features for a given layer:

  1. Use the pan and zoom tools to focus in on the area that contains the feature(s) that you would like to edit.

    ../../_images/edit_mapextent.png

    Zooming in on the features to edit

  2. If it is not already, select the layer you wish to edit by clicking it in the Layers Panel on the left side of the screen.

  3. The Edit menu on the toolbar will become enabled. Click this menu and click Modify.

    ../../_images/edit_modifymenu.png

    Select this menu entry to modify existing features

  4. Click an existing feature. A pop-up will appear showing its current attributes. Click the Edit button to change the values for any of these attributes. In addition, clicking the Edit button will also enable the feature (if a point) or its vertices to be moved. Click a feature or its vertices in order to move them.

    ../../_images/edit_attribute.png

    List of attributes with Edit button for editing

    ../../_images/edit_attributeedit.png

    Changed attributes

  5. When done making edits, click Save. The pop-up can then be closed.

Creating a new feature

To create a new feature in a layer:

  1. First make sure, as before, that the layer is selected, then click the Edit menu and click Create.

    ../../_images/edit_createmenu.png

    Select this menu entry to create new features

  2. Click anywhere in the map window to start drawing the feature. The behavior will vary depending on the type of geometry in the layer (points, lines, or polygons). Clicking the map will add new features (for a point layer) or vertices. Clicking and dragging existing vertices will move them. Holding the shift button while dragging will draw smooth curves instead of discrete vertices.

  3. Double-click the feature when done. A pop-up will display, where attribute data can then be entered. If creating a new point, the pop-up will display immediately.

    ../../_images/edit_create.png

    Creating a new feature

    ../../_images/edit_createattributes.png

    Editing the attributes of a new feature

  4. When finished, click Save. Your new feature will immediately become part of the layer.

    ../../_images/edit_created.png

    New feature saved

Deleting an existing feature

Warning

Deleting a feature is not undoable.

  1. To delete a feature, click the Edit menu as above and click Modify.

  2. Click a feature. A pop-up will display, showing the attributes of this feature. Click the Delete button.

    ../../_images/edit_delete.png

    Deleting a feature

  3. A confirmation dialog box will display. Click Yes to confirm deletion.

    ../../_images/edit_deleteconfirm.png

    Confirmation for deleting a feature

  4. The feature will be removed from the layer.

    ../../_images/edit_deleted.png

    Feature deleted

Now that the data has been edited, continue on to Compose and publish your map.