-
-
Notifications
You must be signed in to change notification settings - Fork 802
Description
Request for documentation
From pull request qgis/QGIS#62937
Author: @gacarrillor
QGIS version: 4.0
[processing] Introduce QgsProcessingRasterLayerDefinition and make Raster Extraction algorithms work with WMSs requested at a given scale
PR Description:
This PR makes Raster Extraction algorithms work with WMS rasters requested at a particular scale, so that scale-dependant rendering (symbology/labeling) is preserved in the output raster.
The improved algorithms are Clip raster by extent
and Clip raster by mask layer
, although other GDAL algorithms could easily benefit from this enhancement in the future, e.g., Translate (convert format)
or Raster information
.
To achieve it, a brand new spanner button is next to WMS layers (the other raster types have the spanner button disabled), which shows an Advanced options
panel when clicked.
vokoscreenNG-2025-08-22_18-37-44.mp4

The Reference scale
is the scale at which the WMS raster should be requested/rendered.
The Service resolution
is the resolution (in DPI) used by the server to render the WMS raster. By default 96 dpi.
This PR also introduces a QgsWmsUtils
class for some utility functions related to WMS layers (e.g., get WMS version from a WMS layer or test if a raster layer is a WMS).
A bunch of unit tests were added for QgsProcessingRasterLayerDefinition
, QgsWmsUtils
, GdalUtils
and the aforementioned algorithms.
Funded by City of Frankfurt – Stadtplanungsamt.