Having a problem clipping a singleband GEOTIFF of Canadian land uses to a vector Quebec provincial boundary. When I do Raster -> Extraction -> Clip by mask layer, the program processes endlessly. I never get an error message; it just doesn't stop. Out of curiosity, I let the process run for more than 24 hours in QGIS 3.4 just to see what would happen. Never got a result. I've also tried in QGIS 2.18 and 3.6. No luck. I assembled the raster coverage from five separate files that were each in their own UTM zone. I merged and reprojected to CRS 4269 (NAD 83). The resulting raster is quite large (~15 gigs), but I'm not sure that's the problem. I made sure the vector is in the same CRS, so I don't believe that's the problem either. I thought at first it might be some problem with my files, but I brought them to school and was able to clip the raster in ArcMAP. It took a while to process -- maybe 20 minutes or so -- but that worked. I've found a few mentions of similar-but not exactly the same-problems in other forums online. Is this a known issue with QGIS or user error? Is there a good work-around besides switching to ARC?

raster information

results from running raster information tool

vector information screenshot

command parameters I selected

processing message

New: jpeg screenshot of osgeo shell command

closed as off-topic by Gabriel De Luca, Vince, LaughU, Erik, Andre Silva Apr 1 at 23:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – Gabriel De Luca, Vince, LaughU, Erik, Andre Silva
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    This is an interesting situation! I'm surprised that Arc worked - in my experience it tends to be more "fragile" than QGIS. I don't have a solution, but here are three considerations, all data-based: 1) You were correct when you did your analysis with all data in the same CRS. However, I would have reprojected the individual rasters to 4269 before I merged them. 2) Make sure that all of the input rasters have the same characteristics: # bands, pixel depth, pixel type, etc. 3) The vector layer may be defective; check its geometry (Check Geometries tool) and repair if necessary. – Stu Smith Mar 17 at 21:52
  • Please, @Jaime DeWeese, include the Raster Information tool output and the GDAL/OGR console call of the Clip Raster by Mask Layer tool. – Gabriel De Luca Mar 18 at 1:42
  • @StuSmith Thanks for the suggestion. I checked the vector layer and it didn't have any geometry errors. I'm going to work on reassembling the merged raster as you suggested and see if that makes a difference. – Jamie DeWeese Mar 18 at 20:04
  • @GabrielDeLuca Thanks, I've edited the post to include the screenshots you suggested. – Jamie DeWeese Mar 18 at 20:05
  • @JamieDeWeese, try with a folder without the "space" and "É" characters. Try it from the OSGeo4W shell: navigate to the folder and use the command gdalwarp -of GTiff -srcnodata 255 -dstnodata 255 -ot Byte -cutline Qebec_Nad83_4269.shp -crop_to_cutline Merged_land_use_quebec.tif Cutted.tif. QGIS takes a lot of time (maybe creating a temporary file is the issue, try saving the output to disk intead), but GDAL needs 15 minutes to create a 50000P x 35000L cutted file, of 5GB without compression (not BIGTIFF creation option required). If it works, feel free to write the correct answer. – Gabriel De Luca Mar 19 at 5:03

Browse other questions tagged or ask your own question.