1

I'm using gdal_translate to clip 5x5 degree tiles from a raster.

I have 4 large rasters-- one for South America, and 4 that divide Africa and Asia into 4 separate pieces. Each raster is a Byte, in WGS84, and has values of 1 (land) and NoData (ocean). I can extract a tile from South America like so:

gdal_translate -co COMPRESS=LZW --config GDAL_CACHEMAX 11% -projwin 10.0 -5.0 15.0 -10.0 1.tif my_tile.tif

This takes 40 seconds.

I also have a VRT of all the rasters together, South America and the four other tifs that compose Africa/Asia. To create the same tile, I do:

gdal_translate -co COMPRESS=LZW --config GDAL_CACHEMAX 11% -projwin 10.0 -5.0 15.0 -10.0 gadm0.vrt my_tile.tif

This takes 3 minutes.

Is this expected? Is there any way to cut down on the overhead caused by the VRT dataset? Happy to provide the actual raster data if that helps.


EDIT: See this link for the data associated data: https://www.dropbox.com/s/y20gzv627kyjlwx/SE_Test_VRT_Data.zip?dl=0

  • Actual data would help. – user30184 Oct 28 '16 at 19:52
  • @user30184 i've edited my post-- see the link above. thanks for your help! – Charlie Hofmann Oct 28 '16 at 20:27

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.