Created an issue too:
https://github.com/qgis/QGIS/issues/67061
On 8/14/26 07:02, Raymond Nijssen via QGIS-Developer wrote:
Dear developers,
Currently I'm working on a process that uses a WCS service containing
elevation data. I need 800x800m pieces from the elevation raster.
My graphical model uses a Raster Calculator algorithm, with one of the
(2) layers being the WCS layer from my project. This works but is very
slow. It takes about 1 minute to process the 800x800m calculation.
If I download the raster using gdal_translate, it only takes 2 seconds
or so. I cannot find out what the Raster Calculator is doing differently.
On top of that, I need to do calculations for the same area 3x, so every
location takes up over 3 minutes, and my entire process with many
locations over 6 hours.
So I had some ideas to speed this up, but so far they all have downsides
and I'm not sure what is the best way to proceed:
1. Using the Raster Calculator with only one layer and storing the
output for the next 3 calculations. Will still take 1 minute extra, but
is more effective (and a bit lame).
2. Using the Clip Raster by Extent algorithm, which seems perfect for
this. But it does not work for WCS, cause it parses the QGIS layer
source string directly into gdal_translate but GDAL needs another string
and throws an error. Looking at the Python source code, this has
probably never worked for WCS.
2a. Fixing the Clip Raster by Extent algorithm. Cause it is in
Python, I can give it a try. But I already found out that the Clip
Raster by Mask algorithm has the same issue. And maybe more raster
algorithms do. So that should be solved in less redundant way, right?
2b. Asking a core developer to rewrite this properly in c++. Maybe in
a way that uses the QGIS network manager so the http-calls get shown in
the debugging panel? No idea what this would cost but I think I can get
this funded somehow.
3. Making my own Python WCS downloader algorithm in Python (I think I
will need to do this anyway to deliver my project on time, but I prefer
more long term solutions for all QGIS users.)
Any suggestions?
Kind regards,
Raymond
Some data
This is the GDAL command QGIS generates to clip the extent (2) and the
error:
GDAL command:
gdal_translate -projwin 148100.0 412300.0 148900.0 411500.0 -of GTiff
"cache=AlwaysNetwork&crs=EPSG:28992&format=GEOTIFF&identifier=dsm_05m&url=https://service.pdok.nl/rws/actueel-hoogtebestand-nederland/wcs/v1_0" /tmp/processing_NXPMbm/6597707893384cf9b74c2603ab45909d/OUTPUT.tif
GDAL command output:
ERROR 4:
cache=AlwaysNetwork&crs=EPSG:28992&format=GEOTIFF&identifier=dsm_05m&url=https://service.pdok.nl/rws/actueel-hoogtebestand-nederland/wcs/v1_0: No such file or directory
Process returned error code 1
This is the working WCS, url generated by QGIS and copied from the
debugging panel:
https://service.pdok.nl/rws/actueel-hoogtebestand-nederland/wcs/v1_0?
SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&FORMAT=GEOTIFF&COVERAGE=dsm_05m&BBOX=142327.30414899752940983,408519.58202700602123514,156029.62145483330823481,415020.39733971789246425&CRS=EPSG:28992&RESPONSE_CRS=EPSG:28992&WIDTH=704&HEIGHT=334
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer