I am using GDAL.
Assume I have four adjacent GDAL tiles in the formation of a square. I have a bounding box with a corner in each tile so that the rectangle formed spans all four tiles. My goal is to generate a DEM from those four adjacent GDAL files that is cropped to the bounding box. Also as an added bonus, assume these GDAL tiles are in folder of GDAL tiles. In this case, the DEM is a Geotile.
In essence I am asking how to perform three steps here:
- Find all GDAL tiles covered by the bounding box.
- Merge the tiles into one giant DEM
- Crop the DEM to the bounding box and output as GEOTIFF.
The methods I know to do this would be really efficient (ex: open each GDAL sequentially and find all the ones that contain a corner point, merge tiles, then crop, surely GDAL has a more efficient means of doing this).