Axis2GE: Adding a custom Y-axis in Google Earth.

Description Usage Arguments Details Author(s) See Also Examples

View source: R/Axis2GE.R

Description

The function adds a Y-axis into Google Earth. Can be used to either generate a KML file or can be embedded into other R2G2 functions.

Usage

1
Axis2GE(coords, maxVal, maxAlt = 1e5, lwd = 2, apnd = TRUE, goo = "testAxis.kml")

Arguments

coords

Geographical position of the axis (latitude, longitude, in Decimal Degrees).

maxVal

The maximum value of the Y-axis (i.e. the largest observation).

maxAlt

The height (ceiling altitude) of the Y-axis into Google Earth (in meters).

lwd

Line widths used to draw the axis.

apnd

Should the Y-axis be appended to an existing KML that is under production (append = TRUE, to be used if Axis2GE is embedded in another KML generating function, see details) or should it be saved in its own KML file (append = FALSE)?

goo

To be provided if apnd = FALSE, name of the KML file to that will be saved into the working directory (use getwd() to find it).

Details

If apnd == TRUE, Axis2GE will provide a list containing the style (bloc1) and data (bloc2) sections of a standard KML file. These sections are then to be incorporated directly into the KML file being generated.

Author(s)

Nils Arrigo, nils.arrigo@gmail.com 2012 EEB, the University of Arizona, Tucson

See Also

contourLines

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Producing an axis as an additional KML file
Axis2GE(coords = c(1,1),
	maxVal = 6698, 
	maxAlt = 1e5, 
	lwd = 2, 
	apnd = FALSE, 
	goo = "Demo_Axis2GE.kml")

# Producing an axis, but storing the KML sections for later use
DemoAxis = Axis2GE(coords = c(1,1),
		   maxVal = 6698, 
		   maxAlt = 1e5, 
		   lwd = 2, 
		   apnd = TRUE)
attributes(DemoAxis) #check out the contents of the obtained list
DemoAxis$bloc1 #get the styles section
DemoAxis$bloc2 #get the coordinates section

R2G2 documentation built on May 29, 2017, 1:41 p.m.