Wednesday, June 17, 2015

Using GDAL to cut a large GeoTIFF raster image to smaller files

Sometimes it may be necessary to cut up a large raster image into smaller tiles so that the dataset can be more manageable. GDAL's command line executable gdal_translate has a projwin option where a bounding window in geographical coordinates can be specified to extract a smaller subset from the input raster image into one or more smaller raster files.


The following steps show how this can be done.

  1. Create a DOS batch file with commands of the following syntax.

    gdal_translate -projwin xlow yhigh xhigh ylow input.tif output.tif

    Note:
    replace xlow with the clipping box's low X geographical coordinate
    replace yhigh with the clipping box's high Y geographical coordinate
    replace xhigh with the clipping box's high X geographical coordinate
    replace ylow with the clipping box's low Y geographical coordinate


  2. Run the clipping batch file.



    The larger image is separated into smaller tiles.

No comments:

Related Posts with Thumbnails