Excerpt from the university lecture note Visual Interpretation of Orthophotos by Dr Gábor Bakó and Dr Krisztina Demény
The manual mapping operations of land-cover analysis are described in the Visual Interpretation lecture note and in numerous publications on vegetation mapping and evaluation. This short guide provides quick help only for carrying out the most basic operations and functions as a checklist for the most common problems. It was created to give rapid guidance to specialists who have not previously worked with GIS software and do not have time to learn its operation in detail.
The only supported purpose of this description is to establish manual patch mapping with complete area coverage, without gaps or overlaps.
1. Downloading QGIS:
In the Download menu, click the latest long-term release, which is the most stable version. If the operating system is 64-bit, choose that version. In Windows, this can be checked by right-clicking the “This PC” icon in File Explorer and selecting “Properties”. If Windows is 32-bit, download the 32-bit version. During installation, accept the default settings.
2. First launch and settings
On first launch it may indicate that a new version is available, but do not update, because that is a beta version and is not stable.
First steps:
In the lower-right corner, change the projection from EPSG:4326 to the HD72/EOV EPSG:23700 coordinate reference system. This can be done by clicking the lower-right corner and using the pop-up window. If the projection is not offered, search for it in the filter.
If the HD72 EOV option is not offered, it can be found using the filter.
In the top menu, open Settings / Options. On the General tab, select the interface language you want to use; this guide refers to the English menu names. On the CRS tab, set the default coordinate reference system for new projects to EPSG:23700 - HD72/EOV*. Click OK and restart QGIS so the settings are retained. *Note: in EPSG:23700 - HD72/EOV, HD72 is the base datum and EOV is Hungary's Unified National Projection, introduced in 1975. EPSG:23700 is the identifier of this system in the international EPSG database.
3. First workflow
Create a folder for the work. Inside it, create a subfolder whose name consists of the topic name and the date. Save a project file here by clicking the floppy-disk icon in the top toolbar; its name should follow the pattern proj_topicname, for example Proj_Merzse.qgz.
3.1 Adding the raster layer
Add an orthophoto or another two-dimensional raster map layer by opening the Data Source Manager and selecting Raster. Choose the required file and make sure the correct coordinate reference system is selected. A raster layer can also be added from the top menu. In the coordinate-system selector, choose HD72/EOV, or set and verify it later on the Source tab of the layer properties.
3.2 Creating a new vector layer:
Top Layer menu / Create Layer / New Shapefile Layer
Use the following settings in the window: File encoding: UTF-8. Geometry type: Polygon. If a point map is required, for example to mark standing deadwood trunks or torsos, select point geometry; for linear features, select line geometry. For complete land-cover mapping without overlaps or gaps, however, the polygon type is the appropriate choice. The projection should be EPSG:23700 - HD72 / EOV, which should already appear because of the earlier settings. For the file name, browse to the working folder and save the Shape file containing the map layer next to the project file. This file type consists of several component files, which must remain in the same folder: Shp, Shx, Dbf, Cpg, Prj, and Qpj. When sending the completed map to someone, all of these files must be sent together.
3.3 Loading a vector map
To load an existing layer, open the Data Source Manager. Select Raster for an orthophoto or another raster map, or Vector for a vector layer, and browse to the required file. Click Add, then Close. If QGIS asks for the projection, choose HD72/EOV (EPSG:23700). When opening a vector file, make sure the encoding is UTF-8. If System was left selected and strange characters appear in the attribute table, correct the encoding on the Source tab of the layer properties; the projection can be changed there as well. If the map does not appear, verify the projection, then right-click the layer and select Zoom to Layer. In the Layers panel, place raster layers such as the orthophoto below the vector layer to be edited.
3.4 Drawing
Keep the vector layer above the raster layer in the layer list; otherwise, the raster may obscure it. To draw on the orthophoto, select the vector layer in the Layers panel, then click Toggle Editing. Before drawing for the first time, configure overlap avoidance. Right-click an empty area of the upper grey toolbar and make sure that the Advanced Digitizing and Snapping toolbars are enabled. Enable snapping using the red horseshoe icon, then open the Advanced Configuration menu and choose Edit Advanced Configuration. In the panel that appears, click the eye icon and tick the checkboxes to the left and right of the name of the layer to be edited:
Use the left-hand checkbox to select the layer to which the setting applies. The right-hand checkbox must also be enabled to prevent polygons from being drawn on top of one another.
Next, click the overlap-management icon and select Avoid Overlap on Active Layer. This option has been available since QGIS 3.16 Hannover. It prevents patches from accidentally overlapping. Click Add Polygon Feature to begin drawing. Zoom in far enough for the boundaries of the object to be recorded accurately. Trace the object visible on the orthophoto by placing vertices with the left mouse button, then finish the shape with the right mouse button. Click OK in the attribute form to create the polygon. Set the transparency of the layer by double-clicking its name and opening the Symbology tab. Choose a colour that remains clearly visible against the imagery, such as lemon yellow, set the Transparency slider to 50, then click OK. To draw a second polygon, start inside the first polygon: place the first vertex inside the existing patch and the second outside it. Trace the adjoining patch and place the final vertex inside the previous polygon. When the shape is finished with the right mouse button, QGIS automatically removes the overlapping part of the new polygon. The same method can be used when a new polygon adjoins several existing polygons. Take care not to create multipart patches, tiny slivers or omitted triangles. To avoid this, draw the closing edges well inside the existing polygons before finishing, while making sure that they do not emerge beyond the opposite edge. Use Ctrl+Z to undo an operation. One or more patches selected with the selection tool can be deleted by pressing Del. A deletion can also be undone with Ctrl+Z immediately after the operation. Do not leave slivers or very narrow, almost invisible triangles between polygons. When drawing outwards from an existing polygon, do not snap the new polygon to its boundary; instead, draw its closing edges well inside the existing polygon, while taking care not to cross its opposite edge:
Do not snap the new vertices to the vertices of the existing patch: if one is missed, a gap or sliver may be left. Do not create multipart polygons by allowing the boundary of the existing polygon to split the new patch into two parts.
3.5 Splitting a polygon and adding a ring
Splitting a polygon: when cutting features, make sure to select the scissors icon with the grey-green polygon symbol. Feature cutting will not be performed if another polygon is selected, even outside the zoomed image area, or if there is a geometry error in the polygons affected by the cut. A cutting line drawn across several polygons will split several polygons, and it may sometimes temporarily split a patch that should not be divided. Make sure to merge such parts again immediately so they do not remain segmented. Adding a ring: use the Add Ring icon when a smaller polygon of another type or code must be created inside a larger area. This icon cuts out the area; after that, add the inner polygon again with Add Polygon Feature and save it with the new name.
3.6 Merging features
When merging two polygons, make sure the data of the resulting larger polygon come from the polygon whose attributes are valid for the entire combined area:
Select the row whose data should appear in the new merged patch, then click the “Attributes from selected feature” icon to copy its data into the “Merge” row, which contains the attributes of the new patch. The cells in the Merge row can also be edited manually.
3.7 Saving
It is very important that saving consists of two parts. The drawn map is saved by deactivating the pencil icon. If this is not done, all geometric changes and attribute-table edits will be lost, because the work is only stored in memory. After that, save the project file, which preserves the zoom level, the current view, colouring, transparency, projection, and special editing settings. This means the projection and overlap-free editing settings described above do not have to be configured repeatedly.
3.8 Creating an attribute table
Open the attribute table with the Open Attribute Table button. If polygons are selected on the map, set the filter in the lower-left corner to Show Selected Features; only the corresponding rows will be displayed. Restore the full list with All Features or by reopening the table. Enable editing with the pencil icon. To create a column, click New Field, enter its name, choose Text (String) and a length of 200. A mistaken column can be removed with Delete Field. Selecting a row highlights the corresponding patch in yellow; use Zoom Map to Selected Rows if it is outside the current view. Clearing a selection and deleting selected features are separate commands, so do not confuse them. It is useful to place the map and table side by side. To copy the attribute table to Excel, select all rows and columns, choose Copy, and paste the data into a new workbook.
4. Numbering the patches
Open the Field Calculator in the attribute table. If such a field does not yet exist, create a new field named “ID” or “Azonosito”. The field type should be Integer, and the output field length should be 10. In the middle, choose Variables / row_number. Double-clicking it fills the left-hand expression window. After confirming, the rows are numbered in a new ID column. If an ID column already exists, select Update Existing Field at the start of the operation. After selecting the correct column name, choose the same command. The purpose of numbering is to make it possible to enter field-collected information into the correct row at any time using a unique identifier. Because numbers are formed during editing and patches may be deleted, split, or merged, it is best to assign the identifier at the end of the lab work, after geometric editing. If the file has been split, or the table is edited separately in Excel, do not renumber the identifier column, otherwise the data cannot be joined again.
5. Area calculation
Area can only be calculated in a metric projection, generally a projected coordinate system. Coordinate systems that operate with angles are not suitable for direct area calculation. In the EOV projection system, therefore, patch areas can be calculated. Open the attribute table for editing, then click the Field Calculator icon. Name the field, for example, Terület. Set Field type to Decimal number (real), with an output field length of 20 and a precision of 2. In the middle, double-click Geometry / $area so the command is inserted into the expression window on the left. After confirming, a new column is created with the area of each patch calculated in m². If polygons are split or merged, the area values become incorrect, so this column must be recalculated with the Field Calculator using Update Existing Field and selecting the column name.
6. Copying the contents of a column under a new column name
If a column name was entered incorrectly earlier, it can be corrected in the layer properties on the Fields tab, but its content can also be copied into a new column. In the Field Calculator, enter the correct column name, field type, and field length, then click Fields and Values in the middle. Expand it with a double click, then double-click the name of the column whose contents should be copied. The new column is created on the right, and the old one can be removed with the Delete Field icon.
7. Correcting column names
Open layer properties from the layer list by double-clicking. Click Source Fields, or in earlier versions the Fields tab. Here, too, the field properties can only be edited after activating the small yellow pencil icon. Double-click a column name to rename it.
8. Drawing regular geometry
By clicking the upper grey toolbar, the Shape Digitizing toolbar can be enabled. It allows regular circles, squares, rectangles, and ellipses to be created. A circle is defined by one point on the circumference and the opposite point.
9. Checking for geometry errors
Open the Processing Toolbox (Ctrl+Alt+T), then search for the Check Validity command. Select the vector layer to be examined and click Run. The operation creates three temporary layers: Error output shows the locations of the errors, Valid output contains the valid geometries, and Invalid output contains the damaged polygons. Always correct the errors in the original layer, and take care not to delete it instead of the temporary result layers. After making the corrections, remove the three result layers and run the check again.
10. Geometry error / several isolated geometries belong to one attribute row
If several isolated geometries belong to a single attribute row, install the Multipart Split plugin from the top Plugins / Manage and Install Plugins menu. Select the multipart patch, then click the new Split featuretypes icon. A light-blue bar at the top shows how many parts the patch has been split into. This way, the distant sub-patches also receive separate rows in the attribute table. They can be edited independently, although their cell contents may also remain identical.
11. Moving an incorrect vertex
Activating the hammer icon, the vertex tool, allows points to be moved and polygons to be corrected. To insert a new point into a boundary line, place the cursor over the middle of the segment. The newly appearing potential vertex can then be moved. For touching patches, make sure the given point is created for both patches; otherwise a narrow triangular gap will appear in the fabric of the complete area-coverage map. If the boundary line is not grabbed in the middle, the entire segment is moved, which leads to errors. This can be fixed with Undo (Ctrl+Z). When correcting one polygon, take great care to correct the neighbouring polygon as well. In the image, a point of the left polygon has been moved to the right, causing it to overlap the polygon on the right; therefore the matching point of the other polygon must also be snapped to the modified point:
12. Colouring the map
Double-click the layer and, on the Symbology tab, set the “No symbols” row to Categorized. In the Symbol field, specify which attribute column should be used for colouring. To discard a previous colouring rule set, click Delete All at the bottom, then use Classify to reload the colouring categories; this also assigns random colours to the categories. By clicking the coloured squares, the colours can be changed freely, either by mixing colours or by entering a hex code for standard colours. Creating a legend: in the same Layer Properties / Symbology panel, not only colours can be set, but legend labels can also be added. Double-click the rows to enter the name belonging to each ID. Saving and loading happen together with the colour scale.
12.1 Saving and loading colouring
The colour scheme can be saved by opening the Style button at the bottom and clicking Save Style. A predefined, previously saved colour scheme can be loaded in the same place with Load Style.
13. Important keyboard shortcuts
Undo: while drawing a polygon, use Backspace. Otherwise use Ctrl+Z. Changes are saved only when the Toggle Editing icon is deactivated. The floppy-disk icon saves the project file, including zoom level, view, colouring, and settings; it does not save the edited map layer itself.
14. Intersecting layers
14.1. Intersecting layers: this may be needed, for example, when imagery along a boundary line is important for an area. This is where the basic command for intersecting two shp files can be found. Clicking it opens the following panel. It is important to set the input and overlay shp layers correctly: input is the layer to be intersected, while the overlay is the layer used for the intersection. After clicking Run, a new shp layer is created, automatically named Metszés. The Metszés.shp layer is a temporary working layer, so if it will be needed later, it must be saved by right-clicking the layer name, then Export / Save Features As, using a clearly identifiable file name.
15. Errors to avoid
Incorrectly closing patches or editing carelessly can leave tiny spikes in the overlay. After splitting multipart geometries, these can be found by sorting the area column of the attribute table in ascending order; the Zoom Map to Selected Rows button can also help. Self-intersecting or overlapping polygons must not remain in the overlay. Base patch boundaries on the actual land cover rather than on irrelevant shadows. If neighbouring patches differ in their attribute data, keep them separate; if there is no difference between their attributes, merge them. Separate any area with markedly different characteristics from the underlying patch and record the difference in the attribute table of the new patch. Some values, such as naturalness level, may be assigned to several selected patches at the same time. Apply consistent classification principles across all monitoring areas, taking account of species composition, structure, the degree of pollution and the naturalness guide. If there are many patches, the selection can be carried out in several batches.
