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
The vector layer should be above the raster layer in the layer list. To draw on the orthophoto, select the vector layer in the Layers panel, then click Toggle Editing. The first time, configure overlap avoidance. Right-click an empty part of the upper toolbar and make sure the Advanced Digitizing and Snapping toolbars are enabled. Enable snapping with the red horseshoe icon, open Advanced Settings, and choose the option for editing the advanced settings. Click the eye icon and tick the checkboxes before and after the name of the layer to be edited:
In the checkbox on the left, select which layer the setting applies to. The checkbox on the right must also be enabled so that polygons cannot be drawn on top of one another.
Click the overlap icon and select Avoid Overlap on Active Layer. This command is available from QGIS 3.16 onward and helps prevent accidental overlaps. After clicking Add Polygon Feature, zoom in far enough to trace object boundaries accurately. Place vertices with the left mouse button and close the shape with the right mouse button. Set the layer transparency on the Symbology tab, using a colour that remains visible against the imagery. Start a neighbouring polygon inside the existing one, trace its boundary, and finish inside the existing polygon so QGIS removes the overlap automatically. Take care not to create multipart patches, narrow slivers, or omitted triangles. Use Ctrl+Z to undo. Selected patches can be deleted with Del, and an immediate deletion can also be undone with Ctrl+Z.
Do not snap the points to the points of the existing patch, because a point may be missed and a gap or sliver may be created. Also avoid creating multipart polygons by letting the boundary of an older polygon 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. Searching for geometry errors
Clicking the Processing Toolbox icon opens the panel on the right, where the Check Validity command can be searched for. Double-clicking it opens a window in which the layer to be examined must be selected. After running the tool, three new overlays are created: one point layer shows the locations of error points (Error output), one polygon layer shows the valid polygons (Valid output), and the third shows the damaged patches (Invalid output). It is worth switching off the other layers to find these errors, then correcting them in the original layer. Be careful not to delete the edited file instead of the three temporary layers. After opening the Processing Toolbox (Ctrl+Alt+T), type Check Validity into the search field at the top. Double-click the function, select the vector layer to be examined in the window that opens, then click Run at the bottom. Three new overlays are then created in the layer list on the left: the Invalid output patch map represents the faulty polygons, the Valid output represents the problem-free polygons, and the Error output layer marks the error points. Correct the errors in the original overlay. After correcting the errors, it is advisable to delete the three error-analysis layers by right-clicking them and choosing Remove Layer, then run the error 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
Small spikes remain in the overlay if patches are closed incorrectly or if editing changes are not handled carefully. These can later be found after running the multipart tool by clicking the header of the area column in the attribute table and filtering for patches with the smallest areas. The Zoom Map to Selected Rows button can help with this. Self-intersecting polygons must not occur, and similar patch meetings should also be avoided. In the example, the shadows marked in red also influenced the drawing, although they are not relevant from a land-cover perspective. If neighbouring patches differ in any data content, it is worth separating them. For example, if the upper patch is fragmented by grassland patches while its lower half is bare, the difference appearing in the plant species list justifies separation. If, however, there is no difference in their attribute tables, the patches should be merged. Overlapping patches are not permitted. If a distinct patch is defined by a certain characteristic, the area under that patch must be separated from the underlying land-cover patches, and the different property must be entered in the attribute tables of the newly created patches. Some task parts do not need to be performed one by one for each patch. A good example is assigning naturalness level: when filling in the naturalness column of the database, this is typically not done patch by patch. Because the database is unified across all monitoring areas, so that all HRAMN areas can be compared statistically, classification decisions are made according to unified principles. It is useful to open the naturalness guide on the monitoring network website, which follows the recommendations of the staff of the Centre for Ecological Research. Then select the patches where the species composition, structure, pollution level, and the guide on the website allow the given naturalness level. After carefully and precisely selecting the patches corresponding to the given value, open the attribute table. If there are many patches, the selection can be partial, because the next step can be performed several times in succession while continuing to assign the given value in different parts of the map.
