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?
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?
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