I have a multi-band GeoTiff, and I want to extract only the first band and write a new image consisting of only that band.
How do I do this using GDAL?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
The Gdal_translate utility can be used.
The documentation mentions:
...to convert raster data between different formats, potentially performing some operations like subsettings, resampling, and rescaling pixels in the process.
It also has an option for bands, where you selects which bands you want to operate on.
So if you want to export just the first band, you can use the following command:
gdal_translate -b 1 input.tif output.tif