I need to process many large GeoTiff files with gdalwarp
.
For this I have used the following command:
gdalwarp -r cubic -s_srs EPSG:25832 -t_srs EPSG:3857 -cutline shapefile.shp -crop_to_cutline -dstalpha file1.tif file2.tif /path/to/output/out.tif
The problem here is that only one CPU core is used and the calculation takes a very long time. Now I've seen that gdalwarp
has the option -multi
.
So I tried the following command:
gdalwarp -multi -r cubic -s_srs EPSG:25832 -t_srs EPSG:3857 -cutline shapefile.shp -crop_to_cutline -dstalpha file1.tif file2.tif /path/to/output/out.tif -wo NUM_THREADS=4
Now, gdalwarp
uses 4 cores, but the utilization per core is only at 25%.
Is there a way to speed up the process or to fully utilize the cores used?