Contours - JiriVales/automatic-creation-orienteering-map GitHub Wiki

Tools for creating orienteering contours.

Create principal and thickened contours

Model Create principal and thickened contours Picture: Model Create principal and thickened contours

Algorithm description

Automatic creation of contours. Creating contours from DEM (digital elevation model) and selected thickened contours in attribute "thick" (value 0 or 1).
Used tools: Contour (GDAL), Field calculator

Input parameters

Digital elevation model (raster)
Raster representing the height of the terrain.
Format: raster
Formula for thickened contours (25 = interval of thickened contour is 25 meters)
if(("ELEV" % (thickened contour interval))=0,1,0)
If the contour elevation is divided by the thickened contour interval and the rest is 0 (it is the thickened contour), if not, the value of the attribute is 0. The name of attribute with values 0 or 1 is thick. If there is not principal contour interval of 5 meters, thickened contour interval after the modulo must be changed. When the interval of thickened contours is a decimal number, it must be written with a dot. For example: 12.5 -> if(("ELEV" % 12.5)=0,1,0)).
Format: String
Default value: if(("ELEV" % 25)=0,1,0)
Contour interval
Difference in elevation between successive contour lines.
Format: number (may be decimal) (0.5 - 20.0)
Units: meters
Default value: 5

Outputs

Contours
Contours with attribute "thick" (selected thickened contours).
Format: vector, polyline Created contours (red) Picture: Created contours (red)

Generalize orienteering contours

Model Generalize orienteering contours Picture: Model Generalize orienteering contours

Algorithm description

Automatic generalization of orienteering contours. Remove short contours (elimination) and simplify using Douglas-Peucker algorithm.
Used tools: Field calculator, Extract by attribute, v.generalize, Delete column

Input parameters

Contours
Orienteering contours.
Format: vector, polyline
Minimum contour length (meters)
Shorter contours than the specified value will be deleted.
Format: number, integer
Units: meters
Default value: 37
Maximum distance (meters) between the original and the simplified curve (Douglas–Peucker algorithm)
Parameter for curve simplification using the Douglas-Peucker algorithm. The number specifies the maximum distance of the simplified curve from the original.
Format: number, integer (1-50)
Units: meters
Default value: 4\

Outputs

Generalize_contours
Contours after generalization.
Format: vector, polyline Contour before and after generalize (red) Picture: Contours (red) before (left) and after (right) generalization

Smooth orienteering contours

Model Smooth orienteering contours Picture: Model Smooth orienteering contours

Algorithm description

Smooth contours using Hermite spline interpolation.
Used tool: v.generalize

Input parameters

Contours to smooth
Format: vector, polyline
Minimum angle between two consecutive segments in Hermite Spline Interpolation
Curve smoothing parameter using Hermite Spline interpolation. Minimum angle.
Format: number, integer (1-10)
Units: angle
Default value: 3
Distance (meters) between the created points (Hermite Spline Interpolation)
Curve smoothing parameter using Hermite Spline interpolation. Distance between the created points.
Format: number, integer (1-50)
Units: meters
Default value: 3

Outputs

Smoothed_contours
Format: vector, polyline Smoothed contours Picture: Smoothed contours

Create orienteering contours (basic version)

Model Create orienteering contours (basic version) Picture: Model Create orienteering contours (basic version)

Algorithm description

Creating orienteering contours from digital elevation model, generalize (elimination, Douglas-Peucker algorithm), smooth (Hermite spline interpolation), resolution of principal and thickened contours (attribute "thick", value 0 or 1, 1= thickened contour)
Used tools: Create principal and thickened contours, Generalize orienteering contours, Smooth orienteering contours

Input parameters

Digital elevation model (raster)
Raster representing the height of the terrain.
Format: raster
Formula for thickened contours (25 = interval of thickened contour is 25 meters)
if(("ELEV" % (thickened contour interval))=0,1,0)
If the contour elevation is divided by the thickened contour interval and the rest is 0 (it is the thickened contour), if not, the value of the attribute is 0. The name of attribute with values 0 or 1 is thick. If there is not principal contour interval of 5 meters, thickened contour interval after the modulo must be changed. When the interval of thickened contours is a decimal number, it must be written with a dot. For example: 12.5 -> if(("ELEV" % 12.5)=0,1,0)).
Format: String
Default value: if(("ELEV" % 25)=0,1,0)
Minimum contour length (meters)
Shorter contours than the specified value will be deleted.
Format: number, integer
Units: meters
Default value: 37
Contour interval
Difference in elevation between successive contour lines.
Format: number (may be decimal) (0.5 - 20.0)
Units: meters
Default value: 5
Maximum distance (meters) between the original and the simplified curve (Douglas–Peucker algorithm)
Parameter for curve simplification using the Douglas-Peucker algorithm. The number specifies the maximum distance of the simplified curve from the original.
Format: number, integer (1-50)
Units: meters
Default value: 4
Distance (meters) between the created points (Hermite Spline Interpolation)
Curve smoothing parameter using Hermite Spline interpolation. Distance between the created points.
Format: number, integer (1-50)
Units: meters
Default value: 3
Minimum angle between two consecutive segments in Hermite Spline Interpolation
Curve smoothing parameter using Hermite Spline interpolation. Minimum angle.
Format: number, integer (1-10)
Units: angle
Default value: 3

Outputs

orienteering_contours
Orienteering contours with attribute thick (0 or 1, 1 = thickened contour)
Format: vector, polyline

Find contour of depression

Model Find contour of depression Picture: Model Find contour of depression

Algorithm description

Finding depression contours. Attribute "depress" = 1 (contour is depression) or 0 (not depression).
Used tools: Find depression area, Polygons to lines, Fixed distance buffer, Merge vector layers, Dissolve, Select by location, Field calculator, Delete duplicate geometry

Input parameters

Digital elevation model (raster)
Raster representing the height of the terrain.
Format: raster
Contours
Source contours.
Format: vector, polyline
Number (meters) of enlarge the depression area
To find depression contours at the edge of the depression / sink, you need to enlarge the area of the depression. Optimal value is 9 meters.
Format: number (may be decimal) (1-500)
Units: meters
Default value: 9

Outputs

Contours_of_depressions
Contours with attribute "depress" (values 1 or 0).
Format: vector, polyline Contours of depressions Picture: Contours of depressions (red)