1

I am trying to understand the process to re-project and re-tile a set of raster (GeoTiff) but can't wrap my head around how to use the different GDAL tools to achieve my goal.

More concretely, I would like to transform the full set of SRTM tiles that are in the geographic projection (5x5deg) into a QSC (Quadrilateralized Spherical Cube) projection to have a set of 256x256px tiles for each cube face.

Do I need to first use gdal_merge to create one big GeoTiff that I can then reproject and tile using gdal_wrap? Is it possible to perform this directly from the source tiles without merging (seems wasteful)?

1 Answer 1

3

you can use gdalbuildvrt instead of gdalmerge to create a virtual raster template (xml file) that will behave like a merged raster. then you can run gdal_translate with the -projwin option for your set of 256*256 tiles.

For most of my applications, I would create a single output per face then use gdalbuildvrt for virtual tiles. Note that if you create one large tile, you should internally tile your output using -co TILED=YES (of course, it could then be safer to use -co COMPRESS=LZW -co BIGTIFF=YES if you make one raster per face).

4
  • Shouldn't BIGTIFF=YES only be necessary when compression is used?
    – Kersten
    Jan 21, 2016 at 12:53
  • @Kersten BIGTIFF = yes has nothing to do with compression. You should use it (by safety) when you expect your TIFF file to exceed 4Gb (which could occur with global DEM at 30 m). If you don't specify, "if_needed" is used by default, but sometimes gdal gets it wrong.
    – radouxju
    Jan 21, 2016 at 13:59
  • That's what I meant. Not saying it is wrong for safety, but trying to distinguish between safe and necessary.gdal gets it wrong when compression is used, because then the filesize cannot be anticipated, as per the docu " However, when compression is used, it is not possible in advance to known the final size of the file, so classical TIFF will be chosen. In that case, the user must explicitly require the creation of a BigTIFF with BIGTIFF=YES if the final file is anticipated to be too big for classical TIFF format."
    – Kersten
    Jan 21, 2016 at 14:15
  • @kersten I apologize for misunderstanding your useful remark. thank you for the clarification. I've edited my answer to also clarify it. Note that I had to force bigtiff in other context where compression wasn't an issue, but this has not been not the case of gdal_translate
    – radouxju
    Jan 21, 2016 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.