4.10.5 Image to KMZ Export

Export the input image in a KMZ product.

Detailed description

This application exports the input image in a kmz product that can be display in the Google Earth software. The user can set the size of the product size, a logo and a legend to the product. Furthemore, to obtain a product that fits the relief, a DEM can be used.

Parameters

This section describes in details the parameters available for this application. Table 4.158, page 792 presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is KmzExport.





Parameter key

Parameter type

Parameter description




in

Input image

Input image

out

Output File name

Output .kmz product

tilesize

Int

Tile Size

logo

Input image

Image logo

legend

Input image

Image legend

elev

Group

Elevation management

elev.dem

Directory

DEM directory

elev.geoid

Input File name

Geoid File

elev.default

Float

Default elevation

inxml

XML input parameters file

Load otb application from xml file

outxml

XML output parameters file

Save otb application to xml file











Table 4.158: Parameters table for Image to KMZ Export.

Input image Input image

Output .kmz product Output Kmz product directory (with .kmz extension)

Tile Size Size of the tiles in the kmz product, in number of pixels (default = 512).

Image logo Path to the image logo to add to the KMZ product.

Image legend Path to the image legend to add to the KMZ product.

Elevation management This group of parameters allows to manage elevation values. Supported formats are SRTM, DTED or any geotiff. DownloadSRTMTiles application could be a useful tool to list/download tiles related to a product.

Load otb application from xml file Load otb application from xml file

Save otb application to xml file Save otb application to xml file

Example

To run this example in command-line, use the following:

otbcli_KmzExport -in qb_RoadExtract2.tif -out otbKmzExport.kmz -logo otb_big.png

To run this example from Python, use the following code snippet:

#!/usr/bin/python 
 
# Import the otb applications package 
import otbApplication 
 
# The following line creates an instance of the KmzExport application 
KmzExport = otbApplication.Registry.CreateApplication("KmzExport") 
 
# The following lines set all the application parameters: 
KmzExport.SetParameterString("in", "qb_RoadExtract2.tif") 
 
KmzExport.SetParameterString("out", "otbKmzExport.kmz") 
 
KmzExport.SetParameterString("logo", "otb_big.png") 
 
# The following line execute the application 
KmzExport.ExecuteAndWriteOutput()

Limitations

None

Authors

This application has been written by OTB-Team.

See also

These additional ressources can be useful for further information: