I have a TIFF file which is georeferenced in UTM coordinates.
So as a first step, I convert the UTM TIFF into a WGS84 TIFF using gdalwarp. On the next step, I used gdal_translate to convert a TIFF into a KMZ file but I have a problem with the "color" of the image. Here are the commands I used :
gdalwarp test_utm.tif -t_srs EPSG:4326 test_wgs84.tif gdal_translate -a_nodata 0 -of KMLSUPEROVERLAY -co FORMAT=JPEG test_wgs84.tif test.kml
In fact, the image should be in greyscale (there is only 1 band on the TIFF) but here, the result is fully white with only the shadows which are gray/dark. I think there is a problem with the values of the KMZ ?
Here is the TIFF description of the WGS84 converted TIFF :
gdalinfo test_wgs84.tif Driver: GTiff/GeoTIFF Files: test_wgs84.tif Size is 8618, 6296 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]] Origin = (-111.186216437919299,38.213784466217568) Pixel Size = (0.000005191716045,-0.000005191716045) Metadata: AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left (-111.1862164, 38.2137845) (111d11'10.38"W, 38d12'49.62"N) Lower Left (-111.1862164, 38.1810974) (111d11'10.38"W, 38d10'51.95"N) Upper Right (-111.1414742, 38.2137845) (111d 8'29.31"W, 38d12'49.62"N) Lower Right (-111.1414742, 38.1810974) (111d 8'29.31"W, 38d10'51.95"N) Center (-111.1638453, 38.1974409) (111d 9'49.84"W, 38d11'50.79"N) Band 1 Block=8618x1 Type=UInt16, ColorInterp=Gray NoData Value=0 Metadata: LAYER_TYPE=athematic STATISTICS_MAXIMUM=4744 STATISTICS_MEAN=836.61375991249 STATISTICS_MINIMUM=12 STATISTICS_STDDEV=407.61174893669
Do you have any idea about why I have this problem ? I already convert other images with only 1 band also, and the output KMZ file was great (but I didn't process any conversion with gdal_warp, the tif was already in WGS84). I'm open in any free solution to convert an UTM TIFF into a KMZ file.