######Demo script
#Preparing fake matrix
center = cbind(1:6, 1:6)
nesting = rep(1:3, each = 2)
# data to be displayed
fakedata = cbind(nesting, center)
fakedata
#Producing KML - the easy way
Shapes2GE(center = fakedata[, 2:3],
nesting = 1,
colors = "#0000FFFF",
goo = "Shapes2GE_V1.kml",
nedges = 20,
orient = 0,
maxAlt = 1e4,
radius = 5e4)
#Producing KML - the very easy way
Shapes2GE(center = fakedata[, 2:3],
nesting = fakedata[, 1],
colors = "auto", #just define your groups and let it get the colors
goo = "Shapes2GE_V1b.kml",
nedges = 20,
orient = 0,
maxAlt = 1e4,
radius = 5e4)
#Producing KML - one param per shape
Shapes2GE(center = fakedata[, 2:3],
nesting = c(1, 1, 2, 3, 3, 3),
colors = c("#0F00FFFF","#00FF00FF","#FF0000FF"), #do it yourself
goo = "Shapes2GE_V2.kml",
nedges = c(3, 3, 4, 4, 5, 5),
orient = 0,
maxAlt = 1e4,
radius = 5e4)
Run the code above in your browser using DataLab