Home

What is kml?

Python Documentation

Other Links

 



Installation instructions.

Compilation.

Online manual.

 

 
 

2. INSTALLATION & COMPILATION

2.1 Installation
The package consists of five python modules and a utilities folder.
Extract these and the input files in the same directory:

• Event2Kml.py - main python module to generate the kmz file.
• GenerateInput.py - secondary python module to acquire user input
and check its validity.
• FileReader.py - secondary python module to read input file and ex-
tract data.
• Assets.py - secondary python module with added utilities.
• Kml constants.py - secondary python module to write parts of kml
code.
• Resources - utilities folder containing required images and font files.

The package uses python libraries like sys, os, optparse, datetime, time,
getopt, xml.dom, tempfile, zipfile, shutil, Image, ImageDraw & ImageFont.
Make sure these are installed in the system.

2.2 Compilation
After installation, run the following commands:

cd < path >
python Event2Kml.py < options >


• path refers to the directory path where the package has been installed.
• options include: --datafile, --eventfile, --polygon, -- noanimation,
--legendoff, --outputfile, --url, --marksize, --help


– At least one input in the form of datafile, eventfile or polygon is
required.
– use --datafile= filename to supply datafiles.
– use --eventfile= filename to supply eventfiles.
– use --polygon= filename to supply polygons.
– use --noanimation to display events without animation.
– use --legendoff to display events without color description box.
– use --outputfile= filename to set name of output file.
– use --url= url to give url of time series curves.
– use --marksize= marker size to set marker size for datafiles.
– use --help for further information.


For example
**********************************************************************
python Event2Kml.py --datafile=file1.txt --datafile=file2.txt --polygon=file3.txt
--outputfile=fires --url=http://gofc.cs.umn.edu/EVI PLOTTER/plot.php
**********************************************************************
provides file1.txt, file2.txt and file3.txt as inputs to the module Event2Kml.py
and produces fires.kmz which can be rendered in earth browsers. The url
contains time series curves which can be seen by clicking the markers in
earth browsers.
Make sure that the color sequence written in the colormap dictionary
in Event2Kml.py is the same as the desired coloring sequence of input
datafiles. The module Event2Kml.py can be opened with any text editor.

***********************************************************************
python Event2Kml.py --eventfile=file1.txt --outputfile=animated fires
--url=http://gofc.cs.umn.edu/EVI PLOTTER/plot.php
**********************************************************************
provides file1.txt as input to Event2Kml.py and generates animated out-
put file animated fires.kmz. The url contains time series curves which
can be seen by clicking the markers in earth browsers.

**********************************************************************
python Event2Kml.py --eventfile=file1.txt --noanimation --outputfile=static fires
--url=http://gofc.cs.umn.edu/EVI PLOTTER/plot.php
**********************************************************************
provides file1.txt as input to Event2Kml.py and generates static output
file static fires.kmz. The url contains time series curves which can be seen
by clicking the markers in earth browsers.

 

 
© COPYRIGHT 2009  ALL RIGHTS RESERVED BY REGENTS OF UNIVERSITY OF MINNESOTA                                                webmaster: Vasudha Mithal