0

I have successfully selected the feature from a shapefile (boundary) and intend to use this as a mask to clip the raster map underneath. However, having followed instructions when I open the GDAL > Raster extraction > Clip raster by mask layer I don't have an output layer and only an input. I have tried several options but without success.

Error code is:

QGIS version: 3.8.0-Zanzibar Qt version: 5.11.2 GDAL version: 2.4.1 GEOS version: 3.7.1-CAPI-1.11.1 27a5e771 PROJ version: Rel. 5.2.0, September 15th, 2018 Processing algorithm… Algorithm 'Clip raster by mask layer' starting… Input parameters: { 'ALPHA_BAND' : False, 'CROP_TO_CUTLINE' : True, 'DATA_TYPE' : 0, 'INPUT' : '/Users/MartynMac/My Documents/GIS Projects/Tithe & Enclosure Maps/OS Georef/Ludham Catfield Crop_modified.tif', 'KEEP_RESOLUTION' : False, 'MASK' : QgsProcessingFeatureSourceDefinition('parish_region_6a39b3b8_cbb3_4593_b1de_4f956d31c796', True), '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 /var/folders/cf/_4glv9gn5171yhgxywymh9ww0000gn/T/processing_4c8576f1d012446297b0c24783abf44b/8e3fc98821ff46718579079472e8e09c/MASK.shp -crop_to_cutline "/Users/MartynMac/My Documents/GIS Projects/Tithe & Enclosure Maps/OS Georef/Ludham Catfield Crop_modified.tif" /var/folders/cf/_4glv9gn5171yhgxywymh9ww0000gn/T/processing_4c8576f1d012446297b0c24783abf44b/42b858586ae74639b5c42371a2a19e25/OUTPUT.tif GDAL command output: /bin/sh: gdalwarp: command not found
 Execution completed in 0.19 seconds Results: {'OUTPUT': '/var/folders/cf/_4glv9gn5171yhgxywymh9ww0000gn/T/processing_4c8576f1d012446297b0c24783abf44b/42b858586ae74639b5c42371a2a19e25/OUTPUT.tif'} 
 Loading resulting layers The following layers were not correctly generated.

  • /var/folders/cf/_4glv9gn5171yhgxywymh9ww0000gn/T/processing_4c8576f1d012446297b0c24783abf44b/42b858586ae74639b5c42371a2a19e25/OUTPUT.tif
You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

  • In your screenshot the Input Layer is blank, did you set this to the raster layer when you tried it? Also I'm confused as to why you can't check 'Selected Features Only' for the Mask Layer? – TeddyTedTed Jul 12 at 11:02
  • In the input I selected the Parish boundaries and yes i used selected feature only. The screen shot was to show lack of output layer. The tutorial I was following had that so I assumed I was doing something wrong. Sorry for confusion. All I want to do is crop/clip the raster layer map with the Shapefile boundary. Thanks – Gideonsway Jul 12 at 11:12
  • If you scroll down the output layer option is called 'Clipped (mask)'. – TeddyTedTed Jul 12 at 11:19
  • Doh. Never realised that was further down. But I now have a further problem. I thought the input layer was the shapefile but when I try select I only have the raster files as potential inputs and then after run get error “files are not supported as outputs for this algorithm” Help again if possible. Thanks – Gideonsway Jul 12 at 11:48
  • 1
    You can edit your original question and add an update with what you've tried and some screenshots. – TeddyTedTed Jul 12 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.