10.6. Editing layers

NextGIS Mobile allows you to edit vector layers added to the map. While editing, you can:

  • add new features;

  • delete features;

  • edit features.

10.6.1. Switching to Edit mode

There are several ways to switch to Edit mode.

  1. The first way is Main actions button (the big blue button in the right bottom corner of map screen). Pressing Main actions button opens a menu of most common actions (see Pic. 10.44.).

../../_images/ngmobile_mainscreen_2.png

Pic. 10.44. Common actions menu

The numbers indicate: 1 - Zoom in; 2 - Zoom out; 3 – Scale ruler; 4 - Measure button; 5 - Add geometry by walk; 6 - Edit layers; 7 - Add current location; 8 - Close Common actions menu.

You need to tap the pencil button (item 6 in Pic. 10.44.) to switch to Edit mode.

Then select a vector layer you want to edit in an opened dialog (see Pic. 10.45.).

../../_images/select_layer_dialogtch.png

Pic. 10.45. Select layer dialog

  1. The second way to switch to Edit mode is to long-press the feature on the Map. This will activate Edit mode for the layer which includes this feature. (A short press will activate a similar menu, but only the “info” icon will be available.) If there are multiple overlaying features, a list will appear. Select the layer you wish to edit from that list.

  2. The third way is to open Layers tree panel (item 1 in Pic. 10.3.) and tap on Layer contextual menu icon next to the vector layer name . This will open the contextual menu items. There you need to select “Edit”.

../../_images/mobile_layer_context_edit_en.png

Pic. 10.46. Layer context menu

10.6.2. The Editing Toolbar

After switching to Edit mode using any of the methods described in Switching to Edit mode section Editing Toolbar is opened at the bottom of the map screen (see Pic. 10.47.).

../../_images/toolbar_edit_layer.png

Pic. 10.47. Editing Toolbar.

The numbers indicate: 1 - Quit Edit mode; 2 - Add new feature; 3 – Edit feature; 4 - Delete feature; 5 - Attributes info.

Note

This editing toolbar is common for all vector layers irrespective of the type of geometry they contain (point, line or polygon).

10.6.3. Adding features

To create a new feature first select a layer you want to add this feature to. Then switch to Edit mode using any of the methods described in Switching to Edit mode section.

After Editing Toolbar is opened tap “Add new feature” button (item 2 in Pic. 10.47.).

Note

Type of geometry of a new feature should correspond to the type of geometry of the layer you want to add this feature to (e.g. you can only add a new point to a point/multipoint vector layer, a new line - to a line/multiline vector layer, etc.).

Note

If you want to start adding new features from scratch first you have to create an empty layer as described in Creating new vector layer section.

10.6.3.1. Adding a point

  1. To create a new point first select a point/multipoint vector layer you want to add this feature to. Then switch to Edit mode using any of the methods described in Switching to Edit mode section.

  2. Tap “Add new feature” button in Editing Toolbar (item 2 in Pic. 10.47.).

  3. In a point layer a new point will appear in the center of the screen highlighted in red. You can move this point anywhere on the map simply by dragging the circular handle attached to it. The red crosshair marker indicates the center of Map screen (see Pic. 10.48.).

../../_images/creation_of_points.png

Pic. 10.48. Adding a point to Point layer.

The numbers indicate: 1 - Quit (without saving); 2 - Feature ID & Name of the Layer; 3 - Undo changes; 4 - Redo changes; 5 - Set attributes; 6 - Move point to the center of Map screen; 7 - Move point to the current location.

  1. For adding a point to a multipoint layer execute steps 1-2 and then tap “Add point” (item 6 in Pic. 10.49.). After that you can set point’s location as described above in the step 3.

../../_images/creation_of_multipoints.png

Pic. 10.49. Adding a point to Multipoint layer.

The numbers indicate: 1 - Quit (without saving); 2 - Feature ID & Name of the Layer; 3 - Undo changes; 4 - Redo changes; 5 - Set attributes; 6 - Add point; 7 - Delete point; 8 - Move point to the center of Map screen; 9 - Move point to the current location.

  1. After a geometry of new point is added you may set its attributes by tapping on the “floppy” button (item 5 in Pic. 10.48. and Pic. 10.49.). Pressing floppy icon will save a new point and open Attributes editing form (see Pic. 10.50.).

../../_images/input_form_attributes.png

Pic. 10.50. Attributes editing form.

The numbers indicate: 1 - Back to previous screen; 2 - Apply changes; 3 - Add photo.

  1. When all the attributes are set tap “Apply changes” button (item 2 in Pic. 10.50.) to save the attributes. If you tap “Back” button instead (item 1 in Pic. 10.50.) the app will warn you of any unsaved changes. You can also attach photos to each feature using “Add photo” button in Attributes editing form (item 3 in Pic. 10.50.).

10.6.3.2. Adding a line

  1. To create a new line first select a linestring/multilinestring vector layer you want to add this feature to. Then switch to Edit mode using any of the methods described in Switching to Edit mode section.

  2. Tap “Add new feature” button in Editing Toolbar (item 2 in Pic. 10.47.).

  3. In a linestring layer a new line will appear in the center of the screen, with one of its vertices highlighted in red (see Pic. 10.51.).

../../_images/creating_lines_eng.png

Pic. 10.51. Adding a line to Linestring layer.

The numbers indicate: 1 - Quit (without saving); 2 - Feature ID & name of the Layer; 3 - Undo changes; 4 - Redo changes; 5 - Set attributes; 6 - Delete vertex; 7 - Move vertex to the center of Map screen; 8 - Move vertex to the current location; 9 - Append geometry by walk; 10 - Edit by touch.

You can move the vertices anywhere on the map simply by dragging the circular handle attached to the selected vertex. If you tap on the vertex in the middle of the line, two new vertices will be created automatically. This way you can add as many vertices as you need and shape the line geometry any way you like, including smooth curves.

  1. For adding a line to a multilinestring layer execute steps 1-2 and then tap “Add line” (item 6 in Pic. 10.52.). After that you can set vertices’ location as described above in the step 3.

../../_images/creating_multilines.png

Pic. 10.52. Adding a line to Multilinestring layer.

The numbers indicate: 1 - Quit (without saving); 2 - Feature ID & name of the Layer; 3 - Undo changes; 4 - Redo changes; 5 - Set attributes; 6 - Add line; 7 - Delete line; 8 - Delete vertex; 9 - Move vertex to the center of Map screen; 10 - Move vertex to the current location; 11 - Contextual menu with the rest of commands (Append geometry by walk, Append geometry by touch).

  1. After a geometry of new line is added you may set its attributes by tapping on the “floppy” button (item 5 in Pic. 10.51. and Pic. 10.52.). Pressing floppy icon will save a new line and open Attributes editing form (see Pic. 10.50.).

  2. When all the attributes are set tap “Apply changes” button (item 2 in Pic. 10.50.) to save the attributes. If you tap “Back” button instead (item 1 in Pic. 10.50.) the app will warn you of any unsaved changes. You can also attach photos to each feature using “Add photo” button in Attributes editing form (item 3 in Pic. 10.50.).

10.6.3.3. Adding a polygon

  1. To create a new polygon first select a polygon/multipolygon vector layer you want to add this feature to. Then switch to Edit mode using any of the methods described in Switching to Edit mode section.

  2. Tap “Add new feature” button in Editing Toolbar (item 2 in Pic. 10.47.).

  3. In a polygon layer a new polygon will appear in the center of the screen, with one of its vertices highlighted in red (see Pic. 10.53.).

../../_images/creation_landfill.png

Pic. 10.53. Adding a polygon to Polygon layer.

The numbers indicate: 1 - Quit (without saving); 2 - Feature ID & name of the Layer; 3 - Undo changes; 4 - Redo changes; 5 - Set attributes; 6 - Add hole; 7 - Delete hole; 8 - Delete vertex; 9 - Move vertex to the center of Map screen, 10 - Move vertex to the current location, 11 - Contextual menu with the rest of commands (Append geometry by walk, Append geometry by touch).

You can move the vertices anywhere on the map simply by dragging the circular handle attached to the selected vertex. If you tap on the vertex in the middle of the line, two new vertices will be created automatically. This way you can add as many vertices as you need and shape the polygon geometry any way you like, including smooth curves.

You can also create holes in polygons by tapping button “Add hole” (item 6 in Pic. 10.53. or item 8 in Pic. 10.54.) and creating a hole geometry the same way you create polygon geometry.

Note

Hole geometry must be located INSIDE a polygon geometry otherwise the changes won’t be saved!

  1. For adding a polygon to a multilipolygon layer execute steps 1-2 and then tap “Add polygon” (item 6 in Pic. 10.54.). After that you can set vertices’ location as described above in the step 3.

../../_images/creation_multipolygon.png

Pic. 10.54. Adding a polygon to Multipolygon layer.

The numbers indicate: 1 - Quit (without saving); 2 - Feature ID & name of the Layer; 3 - Undo changes; 4 - Redo changes; 5 - Set attributes; 6 - Add polygon; 7 - Delete polygon; 8 - Add hole; 9 - Delete hole; 10 - Delete vertex; 11 - Contextual menu with the rest of commands (Move vertex to the center of Map screen, Move vertex to the current location, Append geometry by walk, Append geometry by touch).

  1. After a geometry of new polygon is added you may set its attributes by tapping on the “floppy” button (item 5 in Pic. 10.53. and Pic. 10.54.). Pressing floppy icon will save a new line and open Attributes editing form (see Pic. 10.50.).

  2. When all the attributes are set tap “Apply changes” button (item 2 in Pic. 10.50.) to save the attributes. If you tap “Back” button instead (item 1 in Pic. 10.50.) the app will warn you of any unsaved changes. You can also attach photos to each feature using “Add photo” button in Attributes editing form (item 3 in Pic. 10.50.).

10.6.4. Adding current location

To add current location to a vector layer press Main actions button (item 8 in Pic. 10.3.), and then press a pushpin icon (item 7 in Pic. 10.44.). In an opened dialog select a layer you’d like to add current location to (only point/multipoint geometry will be displayed) (see Pic. 10.55.). If there is only one point/multipoint layer available, it will be selected automatically.

../../_images/ngmobile_selectlayer.png

Pic. 10.55. Select layer dialog.

Current location will be added to selected layer as a new point or a new multipoint consisting of 1 point.

You can then add attributes as described in Adding a point section.

Note

You can add current location to Point and Multipoint layers only!

10.6.5. Adding line or polygon by walk

To add line or polygon by walk to a vector layer press Main actions button, and then press a walking man icon (item 5 in Pic. 10.44.). In an opened dialog select a layer you’d like to add a new feature to (only linestring/multilinestring and polygon/multipolygon layers will be displayed) (see Pic. 10.56.).

../../_images/ngmobile_selectlayer_by_walk_eng.png

Pic. 10.56. Select layer dialog.

Find more information about adding geometries in Record tracks to vector layer section.

Note

You can add tracks to either Linestring/Multilinestring or Polygon/Multipolygon layers!

10.6.6. Editing a geometry

To edit an existing layer first select that vector layer and switch to Edit mode using any of the 3 methods described in Switching to Edit mode section. The feature will turn its colour to Blue. Then tap on the pencil icon in Bottom toolbar (item 3 in Pic. 10.47.). The feature will turn its colour to Red in edit mode.

10.6.6.1. Editing a point

To start editing a point first select the point/multipoint layer in the Layer tree and switch to Edit mode, then select a point by pressing on it. It will change its colour to blue. Then tap on the pencil icon in Bottom toolbar (item 3 in Pic. 10.47.). The selected point feature will be highlighted in red and have an arrow pointing at it.

To change location of a selected point simply pull it or arrow pointing at it to a desired place. Also a point can be moved using buttons from Bottom toolbar - to the center of the screen shown as Red Crosshair marker (item 6 in Pic. 10.57.) or to the current device location (see item 7 in Pic. 10.57.).

You can cancel editing at any point of time, without saving changes, by close editing button. (see item 1 in Pic. 10.57.). The system will warn you about this.

In the end you can have your geofeatures digitized as shown below. See Pic. 10.57..

../../_images/editing_of_points.png

Pic. 10.57. Editing point.

The numbers indicate: 1 - Close editing (without saving); 2 - Feature ID & name of the Layer; 3 - Undo changes; 4 - Redo changes; 5 - Set attributes; 6 - Move point to the Red Crossover (Center); 7 - Move point to the current location.

When you edit a multipoint all points included in it change their colour to blue. The selected point will be highlighted in red and have an arrow pointing at it (see Pic. 10.57.).

../../_images/ngmobile_edit_multipoint_new_eng.png

Pic. 10.58. Editing multipoint.

The numbers indicate: 1 - Quit (without saving); 2 - Feature ID & Name of the Layer; 3 - Undo changes; 4 - Redo changes; 5 - Set attributes; 6 - Add point; 7 - Delete point; 8 - Move point to the center of Map screen; 9 - Move point to the current location.

You can delete selected point (item 7 in Pic. 10.58.), move it to a new location simply pulling it or arrow pointing at it to a desired place, to the center of the screen shown as Red Crosshair marker (item 8 in Pic. 10.58.) or to the current device location (item 9 in Pic. 10.58.). Also you can add a new point to the multipoint (item 6 in Pic. 10.58.).

10.6.6.2. Editing a line

To start editing a line first select the linestring/multilinestring layer in the Layer tree and switch to Edit mode, then select a line by pressing on it. It will change its colour to blue. Then tap on the pencil icon in Bottom toolbar (item 3 in Pic. 10.47.). The line will change its colour to red and will show all its vertices. Current vertex is highlighted in red and has an arrow pointing at it. The center of line segment between vertices is also indicated. Pressing the center of line segment leads to two new vertex being added to the line.

Selected vertex can be moved simply by pulling it or arrow pointing at it to a desired place. Also a vertex can be moved using buttons from Bottom toolbar - to the center of the screen shown as Red Crosshair marker (item 7 in Pic. 10.59.) or to the current device location (see item 8 in Pic. 10.59.).

You can delete the unrequired vertex by highlighting it and tapping delete vertex (see item 6 in Pic. 10.59.)

In this way you can even get a smooth curve as per the geographic shape.

In the end you can have your geofeatures digitized as shown below. See Pic. 10.59..

../../_images/editing_lines_eng.png

Pic. 10.59. Editing line.

The numbers indicate: 1 - Quit (without saving); 2 - Feature ID & name of the Layer; 3 - Undo changes; 4 - Redo changes; 5 - Set attributes; 6 - Delete vertex; 7 - Move vertex to the center of Map screen; 8 - Move vertex to the current location; 9 - Append geometry by walk; 10 - Edit by touch.

Note

If only one vertex remains in a line this line is deleted automatically.

When you edit a multiline all points included in it change their colour to blue. The selected point will be highlighted in red and have an arrow pointing at it (see Pic. 10.60.)

../../_images/editing_multilines_eng.png

Pic. 10.60. Editing multiline.

The numbers indicate: 1 - Quit (without saving); 2 - Feature ID & name of the Layer; 3 - Undo changes; 4 - Redo changes; 5 - Set attributes; 6 - Add line; 7 - Delete line; 8 - Delete vertex; 9 - Move vertex to the center of Map screen; 10 - Move vertex to the current location; 11 - Contextual menu with the rest of commands (Append geometry by walk, Append geometry by touch).

You can delete selected point or line (item 7 and 8 in Pic. 10.60.), move a point to a new location simply pulling it or arrow pointing at it to a desired place, to the center of the screen shown as Red Crosshair marker (item 9 in Pic. 10.60.) or to the current device location (item 10 in Pic. 10.60.). Also you can add a new line to the multiline (item 6 in Pic. 10.60.).

10.6.6.3. Editing a polygon

To start editing a polygon first select the poligon/multipoligon layer in the Layer tree and switch to Edit mode, then select a poligon by pressing on it. It will change its colour to blue. Then tap on the pencil icon in Bottom toolbar (item 3 in Pic. 10.47.). The polygon will change its colour to red and will show all its vertices. Current vertex is highlighted in red and has an arrow pointing at it. The center of line segment between vertices is also indicated. Pressing the center of line segment leads to two new vertex being added to the line.

New vertex can be moved or otherwise edited right after it has been added. Selected vertex can be moved simply by pulling it or arrow pointing at it to a desired place. Also a vertex can be moved using buttons from Bottom toolbar - to the center of the screen shown as Red Crosshair marker (item 7 in Pic. 10.61.) or to the current device location (see item 8 in Pic. 10.61.).

You can delete the unrequired vertex by highlighting it and tapping “Delete vertex” button (see item 6 in Pic. 10.61.).

Note

If only two vertices remain in a poligon this poligon is deleted automatically.

../../_images/editing_polygon.png

Pic. 10.61. Editing polygon.

The numbers indicate: 1 - Quit (without saving); 2 - Feature ID & name of the Layer; 3 - Undo changes; 4 - Redo changes; 5 - Set attributes; 6 - Add hole; 7 - Delete hole; 8 - Delete vertex; 9 - Move vertex to the center of Map screen; 10 - Move vertex to the current location; 11 - Contextual menu with the rest of commands (Append geometry by walk, Append geometry by touch).

When you edit a multipolygon all points included in it change their colour to blue. The selected point will be highlighted in red and have an arrow pointing at it (see Pic. 10.62.).

../../_images/editing_multipolygon_eng.png

Pic. 10.62. Editing multipolygon.

The numbers indicate: 1 - Quit (without saving); 2 - Feature ID & name of the Layer; 3 - Undo changes; 4 - Redo changes; 5 - Set attributes; 6 - Add polygon; 7 - Delete polygon; 8 - Add hole; 9 - Delete hole; 10 - Delete vertex; 11 - Contextual menu with the rest of commands (Move vertex to the center of Map screen, Move vertex to the current location, Append geometry by walk, Append geometry by touch).

You can delete selected point or polygon (item 7 and 10 in Pic. 10.62.), move a point to a new location simply pulling it or arrow pointing at it to a desired place, to the center of the screen shown as Red Crosshair marker (item 11 in Pic. 10.62.) or to the current device location (item 11 in Pic. 10.62.). Also you can add a new polygon to the multipolygon (item 6 in Pic. 10.62.) and add or delete a hole (item 8 or 9 in Pic. 10.62.).

10.6.7. Editing attributes

To start editing attributes first select a layer you want to edit attributes in. Then switch to Edit mode using any of the methods described in Switching to Edit mode section.

After Editing Toolbar is opened tap “Attributes info” button (item 5 in Pic. 10.47.). This will open Attributes Info panel as shown in Pic. 10.63. below.

../../_images/ngmobile_attributes_info.png

Pic. 10.63. Attributes Info panel

The numbers indicate: 1 - Back to previous screen; 2 - Layer name & feature count; 3 - Settings; 4 - Attribute fields; 5 - Close Attributes Info panel; 6 - Set attributes; 7 - Previous record; 8 - Next record.

Note

NextGIS Mobile shows the following attribute fields by default (see item 4 in Pic. 10.63.):

  • For Point/Multipoint layers: each point’s location (in Latitude/Longitude).

  • For Line/Multiline layers: length of each line feature (in meters).

  • For Polygon/Multipolygon layer: length of each polygon feature’s perimeter (in meters) & area of each polygon feature (in square meters).

10.6.7.1. Editing attributes using standard form

To start editing attributes using standard form first tap on “Set attributes” button (see item 6 in Pic. 10.63.).

This opens a standard Attributes editing form as shown in Pic. 10.50..

After all the attributes are set tap “Tick” icon in the top right corner (item 2 in Pic. 10.50.) to save the edits.

Note

If you tap the back button in the top left corner (item 1 in Pic. 10.50.) instead, the system will warn you about unsaved changes.

The Camera icon at the bottom of a standard Attributes editing form (item 3 in Pic. 10.50.) allows to add to each feature image files (e.g. photos) from the local storage or take new photos.

10.6.7.2. Editing attributes using custom form

If the layer was created from a custom form (NGFP) the custom Attributes editing form will be used for editing. An example of such custom form is shown below in Pic. 10.64.:

../../_images/custom_form.png

Pic. 10.64. Custom Attributes editing form.

The numbers indicate: 1 - Back to previous screen; 2 - Apply changes; 3 - Settings; 4 - Text or Integer field; 5 - Dropdown list; 6 - Date & Datetime; 7 - Radio buttons.

Custom Attributes editing forms may contain the following entry fields:

  • Text;

  • Space;

  • Text field;

  • List; Tandem list;

  • Checkbox;

  • Radio button;

  • Date Picker;

  • Photo.

“Text” field is used to provide additional information about geometry feature.

“Space” field is used to increase intervals between fields.

“Text field” can be used to add text or integers, depending on the field type (see item 4 in Pic. 10.64.).

“List” and “Tandem list” fields are used to store and select values included in custom lists, for example, “List” - region/republic/territory, “Tandem list” - district/area in region/republic/territory (see item 5 in Pic. 10.64.).

“Checkbox” field allows to check or uncheck a value.

“Date picker” field allows to select date, time or both of them (see item 6 in Pic. 10.64.).

“Radio button” field allows to select one element from a list of mutually exclusive options (see item 7 in Pic. 10.64.).

“Photo” field allows to take a new photo or to add photos from the local storage.

After all the attributes are set tap “Tick” icon in the top right corner (item 2 in Pic. 10.64.) to save the edits.

Note

If you tap the back button in the top left corner (item 1 in Pic. 10.64.) instead, the system will warn you about unsaved changes.