Creating and editing data

In many GIS or environmental sectors, your data will already exist and it is possible to simply download it or for someone else to provide it. In Antarctica, this can often not be the case and we regularly have to create our own data for visualisation or for further analysis.

In this exercise, we are going to learn how to create a new vector dataset by making a new, empty file and then digitising (drawing) features from one of our raster datasets.

Exercise

Before you can add new vector data, you need a vector dataset to add it to. In our case, you’ll begin by creating new data entirely, rather than editing an existing dataset. Therefore, you’ll need to define your own new dataset first.

You have a few options for what data you would like to create. A few suggestions are:

  • Crevassed areas on the glaciers in the satellite image around Börgen Bay

  • The coastline on the Börgen Bay image

  • The front of the Brunt Ice Shelf in the Sentinel-1 SAR image

  • Any other features that you have noticed in the images, if you want to do something different!

Please choose something that can be represented as polygons, as the instructions given here are for polygons. Lines and points work in a similar way though, for future reference.

The coastline and ice shelf front can be digitised as polygons in this exercise by drawing along the edge/front and then completing the polygon around the edge of the image.

  1. Open your your main working QGIS project for this tutorial

  2. Navigate to Layer ➤ Create Layer ➤ New Shapefile Layer. A New Shapefile Layer dialog box will appear which allows you to define the specifications for your new layer.

  3. Click the ...after the File name, to make a save dialog pop up. Navigate to your data directory and save your new dataset with a self-explanatory name.

  4. For the Geometry type, decide if your data needs to be Points, Lines or Polygons.

  5. The next field allows you to specify the Coordinate Reference System (CRS). We want our shapefile to be Antarctic Polar Stereographic, EPSG 3031. If this is not selected, click the drop-down and select it from the list. It should be listed here as the CRS of your project, but if it isn't, you can click the little symbol to the right of the drop-down to search through all CRSs (hint, it is often easiest to search by EPSG code).

  6. Next, there is a collection of fields grouped under New Field. By default, a new layer has only one attribute, the id field. To make this data really useful, you generally want to add some further pieces of information into the attribute table. For this exercise, we will simply add one field containing the date of the imagery which you are digitising from. Name your field 'Date' and select 'Date' in Type. Click 'Add to Fields List'.

  7. Check that your dialog looks like the screenshot below (but maybe with a different file name), and then click ok. The layer should appear in your Layers panel.

Now that you have your new, empty shapefile, it is time to digitise some data!

8. Zoom to the feature that you want to draw. Click on your new shapefile layer in the Layers panel to select it, and then click on the Toggle Editing button, as shown below.

If you can't find this button, check that the Digitizing toolbar is enabled. Check that there is a check mark next to the toolbar by accessing it through View, Toolbars.

9. As soon as you click this, you are now in an editing mode and you can edit your data. Some digitizing tools should have become active on your toolbar:

Note as well, that your layer in the Layers panel now has the pencil icon, indicating that it is in edit mode.

10. Click on the 'Add Polygon Feature' button to begin your digitising (hint: hover over the buttons to see what they are called).

You'll notice that your mouse cursor has become a crosshair. This allows you to more accurately place the points you'll be digitizing. Remember that even when you’re using the digitizing tool, you can zoom in and out on your map by rolling the mouse wheel, and you can pan around by holding down the mouse wheel and dragging around in the map.

11. Start digitizing by clicking on a point somewhere along the boundary of what you want to capture. Place more points by clicking further along the edge, until the shape you're drawing is complete.

12. After placing your last point, right click to finish drawing the polygon. This will finalise the feature and show you the 'Attributes' dialog. Fill in the values with the date (2nd Feb 2021 for the RGB image, 22nd Feb 2021 for the SAR image). Note: this dialog does not always pop up. See below if it does not.

13. If the Attributes dialog did not pop up, you can assign the date in your attribute table another way: right click on the layer in your Layers panel and select Open Attribute Table, as shown below. Fill in the date using the helpful calendar pop up. If you have multiple polygons you can do this for all of them after finishing digitising.

Do not worry about accurately digitising all of your features! Spend ~5 minutes on the actual digitising work. This is only a rough practice.

If you want to change the symbology of your polygons, then you can do this as well. It is often easiest to have a transparent fill while creating the data, so that you can see what you have digitised.

14. If you make a mistake while digitising a feature, you can always edit it after you've finished creating it. Continue digitising and finish the polygon, and then do the following:

  • Click on the Vertex tool (next to the polygon tool)

  • Hover the mouse over a vertex you want to move and left click on the vertex

  • Move the mouse to the correct location of the vertex, and left click. This will move the vertex to the new location. The screenshot below highlights this.

  • If you want to undo one of your changes, you can click the undo button (big orange arrow to the right of the other Digitising buttons) or press ctrl/cmd Z

Even if you haven't made a mistake, practise moving a few vertices.

15. When you have finished digitising, save your edits by clicking the Save button on your digitising tool (highlighted above). It is a good idea to do this at regular intervals throughout your editing session.

16. Click the pencil Toggle Editing button to stop your editing session (if you haven't saved by now, it will ask if you want to save your edits).

You have just created and filled in a brand new vector dataset! There are far more editing tools than we have covered here, but this gives you a general introduction. Editing lines and points generally work in a very similar way.

If you have finished with some time to spare, try creating another new vector file:

  • Try a GeoPackage instead of a Shapefile (Layer ➤ Create Layer ➤New GeoPackage Layer). Name the 'database' and 'table' name something self-explanatory, as before.

  • Perhaps try a line for your geometry type this time and see how the editing tools change slightly.

  • Add 1 or 2 new fields if you want to, but this isn't essential.

Information source:

https://docs.qgis.org/3.16/en/docs/training_manual/create_vector_data/create_new_vector.html

Last updated