Skip to content
/ tiff2kml Public

Embeds GeoTIFF files in KML for display in Google Earth/Maps

License

Notifications You must be signed in to change notification settings

cgls/tiff2kml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

TIFF2KML

Embeds GeoTIFF files in KML for display in Google Earth/Maps

Sample Python script that builds a ground overlay in Keyhole Markup Language (KML) format, commonly used to display in Google Earth.

It currently takes a Quicklook (browse image in GeoTIFF format) as input and retrieves its coordinates using the open source GDAL library before writing out the KML file.

Example: python TIFF2KML.py g2_BIOPAR_FCOVER_QL_201207030000_OCEA_VGT_V1.3.tiff g2_BIOPAR_FCOVER_QL_201207030000_OCEA_VGT_V1.3.kml

To repeat for several quicklook files in same folder: in Windows, Command Prompt for %I in (QL) do python QLtoKMLoverlay.py %I %~nI.kml in Linux, bash shell for I in QL; do python QLtoKMLoverlay.py ${I} ${I/.tiff/.kml}

Hint: For distribution to colleagues, take the quicklook image (input) and KML output file and put them together in a zip file. Then rename the zip file, replacing .zip with .kmz Google Earth can open the zipped file (.kmz) directly.

References:

Limitations:

  • Quicklooks are typically at reduced resolution (sub-sampled). Similar code can be developed for the actual, full-resolution layers in the data files (HDF5, NetCDF, GeoTiff). HDF5 files do not contain standardized georeference information, hence the GetGeoTransform will not provide the coordinates. Other CGLS tools will show how to deal with HDF5 data files.

Alternatives:

About

Embeds GeoTIFF files in KML for display in Google Earth/Maps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages