0

In QGIS 3.16, I am clipping a large raster (48000P x 44000 L) by a vector, and trying to use the options to crank it up to "all systems go" i.e. fastest processing possible for this dataset.

Adding these options to the clip rasters tool (as text):

'-multi --config GDAL_CACHEMAX 512 --config GDAL_NUM_THREADS ALL_CPUS'

should enable multithreading, boost the GDAL cache to 512 MB, and ensure all CPU cores are being used (if I have it correctly understood).

That results in this GDAL command:

gdalwarp -of GTiff -cutline T:/diff_in_CH_2.gpkg -cl diff_in_CH_2 -crop_to_cutline -dstnodata 0.0 -multi -multi --config GDAL_CACHEMAX 512 --config GDAL_NUM_THREADS ALL_CPUS T:/aci_extent_in_low_country.tif T:/aci_clipped_in_low_country.tif

This works OK for a sample input dataset (~10000P x 4000L), but for the full size dataset I get a TIF that starts to generate, gets to be about 1.97 GB, then the model process grinds to a halt at 76%: Progress Bar stuck 76

Is this a useful way to write the options line?

Should I change the CACHEMAX number, or is there anything else I can modify to help it complete the operation?

1
  • 1
    Create output as tiled -co TILED=YES. It would help if the input is tiled as well, check that with gdalinfo.
    – user30184
    Nov 15 '21 at 9:19

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.