How can we convert a .tif with .tfw .htm into a raster KML/KMZ file to open in google earth? I have a .tif file along with a .tfw and .htm files. I wanted to open it in Google Earth. Converting the .tif into a raster in KML/KMZ format will solve the problem. I was working in MATLAB mapping toolbox and did not find a solution in there. A Matlab or any opensource solution will work.
2 Answers
You can load tiff files into Google Earth and embed in a kml/kmz file.
You can open GIS imagery files to project images embedded with display information over specific map coordinates in the 3D viewer. Files using NAD83 projection are not supported by Google Earth.
TIFF (.tif), including GeoTiff and compressed TIFF files National Imagery Transmission Format (.ntf) Erdas Imagine Images (.img) Other image files You can also import images if you manually edit their coordinates for correct positioning. Imagery files without the correct projection information will not be accurately re-projected.
Portable Network Graphic (.png) Joint Photographic Expert (.jpg) Atlantis MFF Raster (.hdr) PCIDSK Database File (.pix) Portable Pixmap Format (.pnm) Device Independent Bitmap (.bmp)
Use GDAL2TILES.py or GDAL2TILES_Parallel.py or GDAL2TILES
Make a folder of TILES (JPG) and KML or Zip that and rename to KMZ. I recommend using one of these Tools that are free and open source.
https://gitlab.com/GitLabRGI/erdc/geopackage-python
https://github.com/roblabs/gdal2tilesp
They will also build XYZ and TMS 256x256 TILES for use in Web and Mobile Apps. You can also package the data into SQLite Database (MBTILES or GPKG -GeoPackage)