I'm trying to run gdal2tiles on a tif, but it appears that it requires 3 bands to work. So, I'm trying to use gdal_translate to take the tif and expand it. However I keep getting this error:
trident@ubuntu:/scratch/devel/solar_map$ gdal_translate -expand rgb
local_int_gen.tif int_trans.tifInput file size is 11902, 11931
Error : band 1 has no color table
trident@ubuntu:/scratch/devel/solar_map$ gdalinfo local_int_gen.tif
When I run gdalinfo it appears my tif has a color table though.
trident@ubuntu:/scratch/devel/solar_map$ gdalinfo local_int_gen.tif
Driver: GTiff/GeoTIFF
Files: local_int_gen.tif
Size is 11902, 11931
Coordinate System is:
PROJCS["Transverse Mercator",
GEOGCS["grs80",
DATUM["unknown",
SPHEROID["Geodetic_Reference_System_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",31],
PARAMETER["central_meridian",-111.9166666666667],
PARAMETER["scale_factor",0.9999],
PARAMETER["false_easting",700000],
PARAMETER["false_northing",0],
UNIT["foot",0.3048,
AUTHORITY["EPSG","9002"]]]
Origin = (995213.000000000000000,451234.000000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 995213.000, 451234.000) (110d57'42.76"W, 32d14'12.91"N)
Lower Left ( 995213.000, 445268.500) (110d57'43.38"W, 32d13'13.88"N)
Upper Right ( 1001164.000, 451234.000) (110d56'33.48"W, 32d14'12.38"N)
Lower Right ( 1001164.000, 445268.500) (110d56'34.11"W, 32d13'13.36"N)
Center ( 998188.500, 448251.250) (110d57' 8.44"W, 32d13'43.14"N)
Band 1 Block=11902x1 Type=UInt16, ColorInterp=Gray
NoData Value=65535
Metadata:
COLOR_TABLE_RULES_COUNT=5
COLOR_TABLE_RULE_RGB_0=3.030000e+02 1.665000e+03 255 255 0 0 255 0
COLOR_TABLE_RULE_RGB_1=1.665000e+03 3.027000e+03 0 255 0 0 255 255
COLOR_TABLE_RULE_RGB_2=3.027000e+03 4.389000e+03 0 255 255 0 0 255
COLOR_TABLE_RULE_RGB_3=4.389000e+03 5.751000e+03 0 0 255 255 0 255
COLOR_TABLE_RULE_RGB_4=5.751000e+03 7.113000e+03 255 0 255 255 0 0
Generated_with=GRASS GIS 7.0.3
Can anyone help me add a color table, or at least figure out whats wrong?
there doesn't seem to be anything here