Description Usage Arguments References Examples
View source: R/CreateKML_Function.R
Create a KML Google Earth file from a dataframe.
1 2 3 | CreateKML_Function(dataset = dataset,
proj4stringdata = proj4stringdata, CRSdata = CRSdata,
NameField = NameField, filename = filename)
|
dataset |
Dataset |
proj4stringdata |
The projection data for the dataset. |
CRSdata |
The projection to which the dataset should be converted. |
NameField |
The attribute to use to name the points. |
filename |
Name of the KML file to be generated. |
# inspired by the answer from rcs on http://stackoverflow.com/questions/7813141/how-to-create-a-kml-file-using-r
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Plot_Info_Islands = read.csv(file = "../../../Written-Documents/Data-forms/island-data-collection-form/IslandRoadway1_MasterPlotList_OrderedbyGeography_Unsurveyed.csv", header = TRUE, stringsAsFactors = FALSE)
# Roadway 1
CreateKML_Function(dataset=Florida.ghcnd.stations, proj4stringdata="+proj=utm +zone=17 +datum=WGS84", CRSdata="+proj=longlat +datum=WGS84", NameField="Tag_Number", filename="Florida.ghcnd.stations")
# EXAMPLE
# create KML of unsurveyed plots - dataset "Unsurveyed"
# The points should be named based on the column "Tag_Number"
# give the KML file the name "unsurveyed_7sept14"
CreateKML(
dataset=Unsurveyed,
proj4stringdata="+proj=utm +zone=17 +datum=WGS84",
CRSdata="+proj=longlat +datum=WGS84",
NameField="Tag_Number",
filename="unsurveyed_7sept14"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.