5.8. Vector layer settings

5.8.1. Introduction

To edit a layer you need to navigate to a child resource group (see item 4 in Pic. 5.5.), where would be displayed resource types. Then select from child resources a resource with type vector layer and press the “Pencil” icon opposite the resource or select the layer and then select an action called “Update” in actions pane (see Pic. 5.19.). The window “Update resource” will open, where you can edit the layer properties, clear the layer or upload a new file for it, and modify attributes.

Web GIS also allows to edit objects and their attributes and to add descriptions of features and to them attachments (including photos). This works for Vector layers and PostGIS layers.

5.8.2. Allow editing

By default editing of a Web Map is disabled. To allow users to modify the layers of the map, enable editing in the Web Map settings. To find out how to open the “Update resource” dialog, see this chapter.

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. 5.126.)

../../_images/webgis_allow_editting_eng_21.png

Pic. 5.126. “Enable layers editing” is turned on

Note

By default layer editing is turned off.

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

../../_images/webgis_forbid_editting_eng_31.png

Pic. 5.127. Changes of editing permission for particular users

5.8.3. Delete or replace all features

NextGIS Web software allows to delete all features of a layer or replace them by uploading a new file.

Click on the pencil icon next to the layer.

In the “Vector layer” tab select the action from the dropdown menu.

../../_images/ngw_update_vector_file_options_en.png

Pic. 5.128. Options to edit the layer file

You can delete all the features. This will result in an empty layer of the same structure that you can add new features to. To do so, select “Delete all features from layer”, tick to confirm and press Save.

../../_images/ngw_update_vector_file_clear_en.png

Pic. 5.129. Deleting all features from the layer

You can replace all the features by uploading a previously prepared file. Select “Replace layer features from file”. Open the file or drag and drop it into the frame.

../../_images/ngw_update_vector_file_replace_en.png

Pic. 5.130. Replacing layer file

If the file has multiple layers, select the one you need in the “Source layer” field. You can also set up other properties, as while creating a new vector layer.

If you replace the file, not only the features, but the structure of the attributes and other properties will be changed to match the new file.

5.8.4. Edit vector 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 three dots to the right of the layer name (see Pic. 5.131.), then select “Edit”.

../../_images/webgis_edit_objects_eng_31.png

Pic. 5.131. Entering the editing mode

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

../../_images/webgis_edit_objects_panel_eng_21.png

Pic. 5.132. Editing toolbar

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

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

../../_images/webgis_create_new_objects_eng_21.png

Pic. 5.133. “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 “Stop editing” in the layer menu.

  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_21.png

Pic. 5.134. Dialog window of finishing edits

5.8.4.2. Delete a feature

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

../../_images/webgis_delete_objects_eng_21.png

Pic. 5.135. “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. Selected features will become dark again.

../../_images/webgis_delete_objects_select_en1.png

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

  1. Select “Stop editing” in the layer dropdown menu.

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

5.8.4.3. Move a feature or its vertices

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

../../_images/webgis_change_objects_eng_21.png

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

  1. Features you can modify will reduce their color intensity and have a blue outline.

  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_en1.png

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

  1. Select “Stop editing” in the layer dropdown menu.

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

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.

5.8.4.4. Add and delete vertices

To delete a vertice enter the editing mode, hold Shift and click on the vertice.

To add a vertice, click on the line between two existing vertices and drag it to the desired location.

../../_images/ngw_new_vertice_en.png

Pic. 5.139. Creating a new vertice

5.8.5. Edit attribute values

NextGIS Web software allows to edit attributes for geographical features. Editing could be launched from the administrator interface or from the map display.

  • Editing attributes from administrator interface:

    • Click the table icon opposite the resource or select an action for a vector layer called “Feature table” in the actions pane (see Pic. 5.11.).

    • A feature table for the layer will open. Select the row you want to edit. It will be highlighted in yellow.

    • Click Edit button (see Pic. 5.140.).

../../_images/ngweb_editing_attributes_eng_2.png

Pic. 5.140. Editing attributes from administrator interface

  • Editing attributes from the map display:

    • Open a Web Map.

    • Click on the map with Identify tool active.

    • Click edit button in the Identify window (the last tab, see Pic. 5.141.).

../../_images/ngweb_editing_when_viewing_map_eng_2.png

Pic. 5.141. Editing attributes from the map

You can change attribute values in the opened window. Description made on “Description” tab will be visible on the map display in the indentify window.

Editing page has following tabs:

../../_images/ngweb_tab_attributes_eng_2.png

Pic. 5.142. “Attributes” tab

To edit an attribute click on the field.

Numbers can be typed in or modified with errows that appear on the right end of the field.

Dates also can be typed in or selected in the calender. To open the calender click the icon on the right end of the field.

../../_images/ngweb_tab_description_eng_2.png

Pic. 5.143. “Description” tab

../../_images/ngweb_tab_attachment_eng_2.png

Pic. 5.144. “Attachments” tab

When editing a PostGIS layer attribute changes are saved to PostGIS database and descriptions are saved to a local database. When editing a layer based on a Shapefile attribute all changes are saved to a local database.

Geodata with changed attributes could be downloaded by link Download as GeoJSON or published as WFS service. Download of descriptions is currently unavailable.

5.8.6. Adding photos to geodata

NextGIS Web software supports adding photos to features. If a feature has attached photos, they will be shown along with description and attributes in the identify window (see Pic. 5.145.).

../../_images/webmap_identification_photos_eng_2.png

Pic. 5.145. Identify window for a feature with attached photos

You can add photos in a map display.

  1. Click on a feature on the map with active Identify tool.

  2. Click edit button in the Identify window (see Pic. 5.141.).

  3. In the edit tab navigate to “Attachments” tab (see Pic. 5.144.).

  4. Upload photos. JPEG and PNG formats are supported. GIF format is not supported (see. Pic. 5.146.).

../../_images/admin_object_edit_photos1_eng_2.png

Pic. 5.146. Uploading photos in the “Attachments” tab

  1. Enter description for the image and click Save.

After uploading you can see previews of photos on the “Attachments” tab of the identify window (see Pic. 5.145.).

After a click on a photo preview a lightbox window is open (a javascript powered window in browser). Photo size is adjusted to fit the window. Photos have descriptions and user can navigate through them using left and right arrow keys on the keyboard (see Pic. 5.147.).

../../_images/webmap_identification_photo_lightbox_eng_2.png

Pic. 5.147. A lightbox with uploaded photos for the identified feature

Note

By default photos could be added by any user but there is an option to limit number of users who can upload photos (see Access management).

To delete a photo select it on “Attachments” tab of editting attributes window and click “Delete”, and then click Save button.