Does anybody have some insight to an error I am getting when I use gdal2tiles.py
:
ERROR 6: PNG driver doesn't support 13 bands. Must be 1 (grey),
2 (grey+alpha), 3 (rgb) or 4 (rgba) bands.
I am starting with my original file, "my-file.tif" going through the following workflow:
- my-file.tif => gdalwarp => newFile.tif
gdalwarp -co TILED=YES -co COMPRESS=DEFLATE -t_srs EPSG:3857 my-file.tif newImage.tif
- gdal2tiles.py newImage.tif out-dir/
Here is the info for the original TIF (incidentally, newImage.tif has the same bands listed):
$ gdalinfo my-file.tif
Driver: GTiff/GeoTIFF
Files: my-file.tif
Size is 10800, 10800
Coordinate System is:
GEOGCS["GRS 1980(IUGG, 1980)",
DATUM["unknown",
SPHEROID["GRS80",6378137,298.257222101],
TOWGS84[0,0,0,0,0,0,0]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]]
Origin = (-122.000000000000000,49.000000000004398)
Pixel Size = (0.000092592592593,-0.000092592592593)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
COMPRESSION=LZW
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left (-122.0000000, 49.0000000) (122d 0' 0.00"W, 49d 0' 0.00"N)
Lower Left (-122.0000000, 48.0000000) (122d 0' 0.00"W, 48d 0' 0.00"N)
Upper Right (-121.0000000, 49.0000000) (121d 0' 0.00"W, 49d 0' 0.00"N)
Lower Right (-121.0000000, 48.0000000) (121d 0' 0.00"W, 48d 0' 0.00"N)
Center (-121.5000000, 48.5000000) (121d30' 0.00"W, 48d30' 0.00"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Gray
NoData Value=255
Band 2 Block=256x256 Type=Byte, ColorInterp=Undefined
NoData Value=255
Band 3 Block=256x256 Type=Byte, ColorInterp=Undefined
NoData Value=255
Band 4 Block=256x256 Type=Byte, ColorInterp=Undefined
NoData Value=255
Band 5 Block=256x256 Type=Byte, ColorInterp=Undefined
NoData Value=255
Band 6 Block=256x256 Type=Byte, ColorInterp=Undefined
NoData Value=255
Band 7 Block=256x256 Type=Byte, ColorInterp=Undefined
NoData Value=255
Band 8 Block=256x256 Type=Byte, ColorInterp=Undefined
NoData Value=255
Band 9 Block=256x256 Type=Byte, ColorInterp=Undefined
NoData Value=255
Band 10 Block=256x256 Type=Byte, ColorInterp=Undefined
NoData Value=255
Band 11 Block=256x256 Type=Byte, ColorInterp=Undefined
NoData Value=255
Band 12 Block=256x256 Type=Byte, ColorInterp=Undefined
NoData Value=255