Categories
Ask Geographic Information System (GIS)

Why does “clip raster by mask layer” in QGIS seem to take forever?

I have successfully used the "Clip" operation to trim a vector layer by another vector layer. Now I’m trying to do the same thing with a raster layer using "Clip raster by mask layer", but it seems to be taking forever: after watching the "Processing algorithm…" message for several (> 5) minutes with no sign of progress, I’m wondering if I’m doing the wrong thing?

For reference, I’m trying to clip the MassGIS DEM data (https://docs.digital.mass.gov/dataset/massgis-data-elevation-topographic-data-2005) to a single town (the layer is https://docs.digital.mass.gov/dataset/massgis-data-community-boundaries-towns, filtered by "town" = 'TOWNNAME').

The log says:

QGIS version: 3.16.0-Hannover
Qt version: 5.12.8
GDAL version: 3.0.4
GEOS version: 3.8.0-CAPI-1.13.1 
PROJ version: Rel. 6.3.1, February 10th, 2020
Processing algorithm…
Algorithm 'Clip raster by mask layer' starting…
Input parameters:
{ 'ALPHA_BAND' : False, 'CROP_TO_CUTLINE' : True, 'DATA_TYPE' : 0, 'EXTRA' : '', 'INPUT' : '/vsizip//home/lars/Downloads/elevation_2005_INT.zip/img_elev2005_int.img', 'KEEP_RESOLUTION' : False, 'MASK' : 'WFS:// filter=\'\"town\" = \\\'NEWTON\\\'\' restrictToRequestBBOX=\'1\' srsname=\'EPSG:26986\' typename=\'massgis:GISDATA.PARCELTOWNS_100ACREWIND\' url=\'http://giswebservices.massgis.state.ma.us/geoserver/wfs\' version=\'auto\'', 'MULTITHREADING' : False, 'NODATA' : None, 'OPTIONS' : '', 'OUTPUT' : 'TEMPORARY_OUTPUT', 'SET_RESOLUTION' : False, 'SOURCE_CRS' : None, 'TARGET_CRS' : None, 'X_RESOLUTION' : None, 'Y_RESOLUTION' : None }

GDAL command:
gdalwarp -of GTiff -cutline WFS:http://giswebservices.massgis.state.ma.us/geoserver/wfs -cl massgis:GISDATA.PARCELTOWNS_100ACREWIND -crop_to_cutline /vsizip//home/lars/Downloads/elevation_2005_INT.zip/img_elev2005_int.img /tmp/processing_LpGYQl/34495b41dcca479a8cdc6c0cb3608dda/OUTPUT.tif
GDAL command output:
Copying raster attribute table from /vsizip//home/lars/Downloads/elevation_2005_INT.zip/img_elev2005_int.img to new file.

Creating output file that is 59396P x 36446L.

Processing /vsizip//home/lars/Downloads/elevation_2005_INT.zip/img_elev2005_int.img [1/1] : 0Using internal nodata values (e.g. -76) for image /vsizip//home/lars/Downloads/elevation_2005_INT.zip/img_elev2005_int.img.

Copying nodata values from source /vsizip//home/lars/Downloads/elevation_2005_INT.zip/img_elev2005_int.img to destination /tmp/processing_LpGYQl/34495b41dcca479a8cdc6c0cb3608dda/OUTPUT.tif.

Leave a Reply

Your email address will not be published. Required fields are marked *