1

I have downloaded some landsat8 TIFF files from Amazon and there are 11 bands. Then I use
for BAND in {4,3,2}; do gdalwarp -t_srs EPSG:3857 LC08_L1TP_114027_20171116_20171116_01_RT_B$BAND.TIF farm/$BAND-projected.tif; done
and then
convert -combine {4,3,2}-projected.tif RGB.tif.
The color doesn't seem right. I want to convert the RGB.tif to tiles to put it on a leaftlet map, so I use
gdal2tiles.py -t tile -e -a 0 -z 0-12 RGB.tif img
but the error is shown:
gdal2tiles.py: error: There is no georeference - neither affine transformation (worldfile) nor GCPs. You can generate only 'raster' profile tiles.
What should I do now to merge the TIFFs and put it on a map as tiles?

  • 1
    Welcome to GIS SE. As a new user, please take the Tour. Please Edit the question to specify what you want and more details (exact command(s) used) about what you've tried. – Vince Nov 22 '17 at 4:14
  • 1
    So what did you want? You're not being clear on what you're trying to achieve. – Michael Stimson Nov 22 '17 at 4:44
  • 1
    You used ImageMagick convert, which doesn't support georeferencing. Use gdalbuildvrt -separate instead. – user2856 Nov 22 '17 at 8:11
1

Another approach would be to consider using gdal_merge.py instead of convert as this will keep the projection information. For instance, once you have reprojected your images using gdal_translate, you could:

gdal_merge.py -o L8_RGB.tif *-projected.tif -separate

You could then use the output in gdal2tiles.py

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.