I used QGIS to reproject a raster data. QGIS does this via gdalwarp like so:

gdalwarp -overwrite -t_srs EPSG:4326 -of GTiff /path/to/input.tif /path/to/output.tif

Comparison of input and output files

input.tif enter image description here output.tif enter image description here

Is it possible to use gdalwarp to reproject a raster without changing band labels? If so, how?

  • I don't know, but you can just copy and paste the style from your original raster (right click on the layer). – Jon Oct 2 '20 at 0:01
  • Right, raster styles are saved into external style file (.qml) that contains entries like <colorPalette> <paletteEntry label="0" color="#32c82c" value="0" alpha="255"/> <paletteEntry label="test" color="#59d1c3" value="1" alpha="255"/>. Plain GeoTIFF is not aware of labels. – user30184 Oct 2 '20 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.