Skip to main content
readability
Source Link
Andre Silva
  • 10.3k
  • 12
  • 55
  • 109

I'd recommend using gdalwarpgdalwarp as you can increase the efficiency of the process. Imagine

For example, if you want to cut a raster inraster.tifinraster.tif with a shapefile extent.shpextent.shp:

gdalwarp -cutline extent.shp -crop_to_cutline -of GTiff -dstnodata 255 inraster.tif inraster_cropped.tif -co COMPRESS=LZW -co TILED=YES --config GDAL_CACHEMAX 2048 -multi

gdalwarp -cutline extent.shp -crop_to_cutline -of GTiff  -dstnodata 255 inraster.tif inraster_cropped.tif -co COMPRESS=LZW -co TILED=YES --config GDAL_CACHEMAX 2048 -multi

The last two parameters allows you to boost the process using 1) a multicore implementation and 2) setting the cache available to the function.:

  1. A multicore implementation.
  2. Setting the cache available to the function.

I'd recommend using gdalwarp as you can increase the efficiency of the process. Imagine you want to cut a raster inraster.tif with a shapefile extent.shp:

gdalwarp -cutline extent.shp -crop_to_cutline -of GTiff -dstnodata 255 inraster.tif inraster_cropped.tif -co COMPRESS=LZW -co TILED=YES --config GDAL_CACHEMAX 2048 -multi

The last two parameters allows you to boost the process using 1) a multicore implementation and 2) setting the cache available to the function.

I'd recommend using gdalwarp as you can increase the efficiency of the process.

For example, if you want to cut a raster inraster.tif with a shapefile extent.shp:

gdalwarp -cutline extent.shp -crop_to_cutline -of GTiff  -dstnodata 255 inraster.tif inraster_cropped.tif -co COMPRESS=LZW -co TILED=YES --config GDAL_CACHEMAX 2048 -multi

The last two parameters allows you to boost the process using:

  1. A multicore implementation.
  2. Setting the cache available to the function.
Source Link
WAF
  • 625
  • 8
  • 22

I'd recommend using gdalwarp as you can increase the efficiency of the process. Imagine you want to cut a raster inraster.tif with a shapefile extent.shp:

gdalwarp -cutline extent.shp -crop_to_cutline -of GTiff -dstnodata 255 inraster.tif inraster_cropped.tif -co COMPRESS=LZW -co TILED=YES --config GDAL_CACHEMAX 2048 -multi

The last two parameters allows you to boost the process using 1) a multicore implementation and 2) setting the cache available to the function.