CreateKML_Function: Create a KML from a dataframe

Description Usage Arguments References Examples

View source: R/CreateKML_Function.R

Description

Create a KML Google Earth file from a dataframe.

Usage

1
2
3
CreateKML_Function(dataset = dataset,
  proj4stringdata = proj4stringdata, CRSdata = CRSdata,
  NameField = NameField, filename = filename)

Arguments

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.

References

# inspired by the answer from rcs on http://stackoverflow.com/questions/7813141/how-to-create-a-kml-file-using-r

Examples

 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"
)

ksauby/dataproc documentation built on May 20, 2019, 7:02 p.m.