1.25. How to edit data

Note

You can use described functionality in Web GIS created in nextgis.com service on Premium plan

Web GIS allows to edit objects and their attributes and to add descriptions and attachments (including photos) of features in Vector layers and PostGIS layers.

1.25.1. How to set up editing permission

By default, Web Map editing is always disabled. In order for the user to be able to make changes to the layers on the map, editing must be enabled in the Web Map settings. You can change permission for editing in “Update resource” dialog of a Web Map. You can find how to enter it in Update resource of NextGIS Web documentation. You can allow or deny editing of all map layers on the “Settings” tab by ticking or clearing a box next to “Enable layers editing” field (see Pic. 6.151.):

../../_images/webgis_allow_editting_eng_2.png

Pic. 1.85. “Enable layers editing” field

Note

By default a box next to “Enable layers editing” field is clear.

To forbid some users to edit layers add a rule to deny specified users or groups of users to write data (permission "Resource:Modify") on the “Permissions” tab of the “Update resorce” dialog (see Pic. 6.152.). For user without permission the edit mode is unavailable.

../../_images/webgis_forbid_editting_eng_3.png

Pic. 1.86. Changes of editing permission for separate users

1.25.2. Edit a feature on a Web Map

  1. Open Web Map and select the layer with the feature you need to edit.

  2. Open dropdown menu by pressing the “Layer” button (see Pic. 6.156.), then tick the box next to “Editing”.

../../_images/webgis_edit_objects_eng_3.png

Pic. 1.87. “Layer” menu

  1. Editing toolbar will appear on the Web Map (see Pic. 6.157.):

../../_images/webgis_edit_objects_panel_eng_2.png

Pic. 1.88. Editing toolbar

1.25.2.1. Create a new feature (point, line, polygon)

  1. On the editing toolbar activate “Create features” button (see Pic. 6.158.):

../../_images/webgis_create_new_objects_eng_2.png

Pic. 1.89. “Create features” button on the editing toolbar

  1. A blue circle will appear nearby a mouse pointer, with it you can add new features. Click on the map to create a new feature. You can add several new features one after another. While creating a line you need to indicate its start and end points by clicking on the map. While creating a polygon each new click on the map will indicate its new vertice, to finish a polygon you need to click on its start point. You can use adhesion while creating vertices.

  2. To finish creation of the new feature press “Layer” button (see Pic. 6.156.) and clear the tick box next to “Editing”.

  3. In the opened dialog select “Save” to save changes, “Don’t save” to discard them, or “Cancel” to stay in the edit mode:

../../_images/webgis_finish_editting_eng_2.png

Pic. 1.90. Dialog window of finishing edits

1.25.2.2. Delete a feature

  1. On the editing toolbar activate “Delete features” button (see Pic. 6.160.):

../../_images/webgis_delete_objects_eng_2.png

Pic. 1.91. “Delete features” button on the editing toolbar.

  1. Features you can modify will reduce their color intensity and have a blue outline. The pointer will become a black cross.

  2. Left-click to select the features you would like to delete.

../../_images/webgis_delete_objects_select_en.png

Pic. 1.92. The layer with the purple points is active. The marked points have been selected to be deleted

  1. Press “Layer” button (see Pic. 6.156.) and clear the tick box next to “Editing”.

  2. In the opened dialog select “Save” (see Pic. 6.159.).

1.25.2.3. Modify a feature

  1. On the editing toolbar activate “Modify features” button (pencil icon, see Pic. 6.162.):

../../_images/webgis_change_objects_eng_2.png

Pic. 1.93. “Modify features” button on the editing toolbar

  1. Features you can modify will reduce their color intensity.

  2. Select a feature (point) or one of its vertices (line, polygon) with the pointer and drag it, then release on a new place. For vertices modifying an adhesion will work.

../../_images/webgis_move_objects_en.png

Pic. 1.94. Moving a point. Before you confirm the edit, both its initial and its final location will be visible on the map

  1. Press “Layer” button (see Pic. 6.156.) and clear the tick box next to “Editing”.

  2. In the opened dialog select “Save” (see Pic. 6.159.).

Note

You can edit several layers simultaneously. To do it enter the edit mode in every layer you want to edit. Adhesion will work for features of all these layers.

1.25.3. Edit feature’s attributes

There are 2 ways to edit feature’s attributes: 1) using edit form in Feature table or 2) using edit form in Web Map web client (if the relevant layer is added to Web Map).

1.25.3.1. Edit attributes using Feature table

  1. Open the Properties page of Vector layer or PostGIS layer;

  2. Select Vector layer ‣ Feature table on the right side of Web GIS admin console;

  3. In the opened dialog window select a feature you want to edit (if necessary search it by its attributes using Search bar) and press Edit button;

  4. In the opened form edit feature attributes values in Attributes tab, add description and attachments in Description and Attachments tabs;

  5. Press Save button. If attributes, description and attachments are saved successfully you’ll be able to view them by selecting the feature in Feature table and pressing Open button.

1.25.3.2. Edit attributes using Web Map

  1. Open Web Map and switch on the visibility of the relevant layer;

  2. Find the feature on the Web Map (if necessary search it by its attributes using Search bar in the Toolbar or in the Feature table which can be opened via Layer dropdown menu in the upper left corner of Web Map web client. You can quickly find the selected feature on Web Map using Go to button in Feature table);

  3. Click on the feature. In the opened dialog window with feature properties press Edit button;

../../_images/webgis_change_attr_en.png

Pic. 1.95. Edit icon in the feature properties

  1. In the opened form edit the values of feature attributes in Attributes tab, add description and attachments in Description and Attachments tabs;

../../_images/webgis_change_attr_value_en.png

Pic. 1.96. Editing attributes

  1. Press Save button. If attributes, description and attachments are saved successfully you’ll be able to view them on the Web Map by clicking on the feature or by selecting the feature in the Feature table and pressing the Open button.

Note

Updated attributes in PostGIS layers are saved directly to the external PostGIS database. Updated attributes in Vector layers, as well as descriptions and attachments in Vector layers and PostGIS layers are saved to your Web GIS.

Note

You can also edit geometries and attributes of Vector layers features with desktop app QGIS.

Read more on data editing here.