ANSI-C program: kml_pt.c
NAME
kml_pt - Create a kml XML file (to be viewed e.g. in
Google Earth) visualizing values from an ascii table. Main
purpose is to visualize IPTA deformation results.
SYNOPSIS
kml_pt <table> <lat_col> <lon_col>
<val1_col> <val1_label> <val2_col>
<val2_label> <val3_col> <val3_label>
<id_col> <kml> [icon_URL] [logo_URL] [legend_URL]
[color_model] [h0] [hrange] [imin] [imax] [sat_min] [sat_max]
[sc1] [A1] [B1] [cyclic1] [sc2] [A2] [B2] [sc3] [A3]
[B3]
<table> | (input) ascii file with columns of at least latitude, longitude and value |
<lat_col> | column number containg latitude information (WGS84, decimal) |
<lon_col> | column number containg longitude information (WGS84, decimal) |
<val1_col> | column number containg the value for red/hue (enter - if not available) |
<val1_label> | label of val1_col (enter - if values shall be omitted in the popup) |
<val2_col> | column number containg the value for red/hue (enter - if not available) |
<val2_label> | label of val2_col (enter - if values shall be omitted in the popup) |
<val3_col> | column number containg the value for red/hue (enter - if not available) |
<val3_label> | label of val3_col (enter - if values shall be omitted in the popup) |
<id_col> | column number containg the id values (enter - if no ID values shall be displayed) |
<kml> | (output) kml output file |
[icon_URL] | Uniform Resource Locator to the master icon (- for default: http://www.gamma-rs.ch/media/images/kml/button_master.png) |
[logo_URL] | Uniform Resource Locator to the logo image (- for none, gamma: http://www.gamma-rs.ch/media/images/kml/gamma_logo.png) |
[legend_URL] | Uniform Resource Locator to the legend image (- for none) |
[color_model] | color model selection flag: (default=1) 0: RGB color model 1: HLS (double hexagon color model) 2: HSV (single hexagon color model) |
[h0] | starting hue (color for starting value, default=0.0) |
[hrange] | range of hue values in degrees (-360. ... 360., default=360.) |
[imin] | minimum brightness value (0.0 ... 1.0, default=0.15) |
[imax] | maximum brightness value (0.0 ... 1.0, default=0.85) |
[sat_min] | minimum color saturation value (0.0 ... 1.0, default=0.0) |
[sat_max] | maximum color saturation value (0.0 ... 1.0, default=1.0) |
[sc1] | Scaling model flag (default=0: lin, 1: log, 2: power-law) |
[A1] | Scaling parameter A (minimum or scale; default=0.0) |
[B1] | Scaling parameter B (maximum or exponent; default=6.2832) |
[cyclic1] | Cyclic scaling model (default=1; 0: no 1: yes) |
[sc2] | Scaling model flag (default=2: lin, 1: log, 2: power-law) |
[A2] | Scaling parameter A (minimum or scale; default=1.0) |
[B2] | Scaling parameter B (maximum or exponent; default=0.35) |
[sc3] | Scaling model flag (default=0: lin, 1: log, 2: power-law) |
[A3] | Scaling parameter A (minimum or scale; default=0.0) |
[B3] | Scaling parameter B (maximum or exponent; default=6.2832) |
EXAMPLE
kml_pt disp_tab.txt 5 4 7 "Displacement [mm/y]" 10
"Displacement uncertainty [mm/y]" 6 "Height [m]" 1 test.kml -
logo.png - 1 0.0 300. 0.5 0.5 0.8 0.8 0 -10.0 5.0 0 1 1 1 0 0.0
1.0
Generates the test.kml kml XML file that can be imported into Google Earth for visualisation. Values for lat/lon are taken from columns 5 and 4 of table disp_tab.txt. The 3 parameters to visualize are in columns 7 (displacement), 10 (displacement error), and 6 (height). The color model used is a double hexagon model ranging from 0 to 300 degrees. A corresponding color scale can be produced with ras8_color_scale. The parameters for the color model follow. Please note that in this example a trick was used so that only the deformation contributes to the button color. The other two parameters (error, height) have equal staring/ending ranges. Like that they only show up in the popup that is triggered by clicking on a point. For the colored buttons the default template was used, while the logo is taken from logo.png in the current directory.
DESCRIPTION
kml_pt creates a kml XML file that can be displayed with
Google Earth. Input parameters are an ascii table, the relevant
column IDs, and a color model. Its is important to note that
Google Earth works in EQA with potentially WGS84 as geoid.
The resulting kml file can be edited using any text editor.
For the button, logo, and legend images, if the image is in a
format supporting transparency (e.g. png) transparency is also
used within Google Earth. This allows to use a standard image
editor such as gimp to edit the image and add transparency for
better visualisation of the image in Google Earth.
Google Earth is a product of Google. Check the website for more
information and license info. http://earth.google.com/
DIAGNOSTICS
All messages are generally self-explanatory.
SEE ALSO
ras24_pwr, ras8_color_scale, kml_map
alls part of GAMMA DISP.
kml
implementation of Google Earth