A QGIS plugin that casts elevation values onto a raster using surface polygons and elevation points stored in a GeoPackage.
The plugin adds a Raster Caster provider to the Processing Toolbox with two algorithms.
Creates an empty GeoPackage in the CRS of your choice (EPSG:28992 by default) and loads its two layers into the project:
- surface (Polygon): the areas to cast.
definition_type = 'constant':param_1holds the elevation value.definition_type = 'tin': the elevation is interpolated from the elevation points inside the surface.
- elevation point (Point): supporting points for TIN surfaces. The
elevationattribute is used to define height. Setin_polygon_onlyto true to restrict a point to the surfaces it actually lies inside.
Burns the surfaces into a new raster. Constant surfaces are rasterized with their
param_1 value; TIN surfaces are interpolated from the elevation points they
contain.
- Surface layer: polygons with the
definition_typeandparam_1fields, as created by Begin new. - Elevation point layer: points with an
elevationandin_polygon_onlyfield. - Input Raster: optional; its extent and pixel size are used for the output. Surfaces are cast onto this raster.
- Pixel Size: output resolution, required when no input raster is given.
- Snapping distance: search buffer around a TIN surface for elevation points
that lie just outside it. Points with
in_polygon_onlyset are not picked up by this buffer.
Without an input raster, the output extent follows the extent of the surface layer.
Run the tests in the provided container:
docker compose build
docker compose run --rm qgis pytestBuild an installable plugin zip:
python zip_plugin.py