Description Usage Arguments Details Author(s) See Also Examples
This function creates a Keyhole Markup Language (KML) animation of horizontal movements that can be displayed in Google Earth. The animation shows when a transmitter was within the detection field of a receiver and when it moved between receivers or stations. Users can adjust the time slider to visualise individual time periods for display.
1 2 | GenerateAnimationKMLFile(sInputResidenceFile, sInputNonResidenceFile,
sInputPointsFile, sOutputFile, sReceiverColour)
|
sInputResidenceFile |
the location of a |
sInputNonResidenceFile |
the location of a |
sInputPointsFile |
the location of a points file (.csv) containing the latitude and longitude of all the |
sOutputFile |
a string detailing the location and name of the output file to be created |
sReceiverColour |
colour of the receivers in the output .kml |
the output is a .kml that can be viewed as an animation in Google Earth
Ross Dwyer, Matthew Watts, Hamish Campbell
GenerateDirectDistance
, GenerateCircuitousDistance
, RunResidenceExtraction
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | ## Not run:
###GenerateAnimationKMLFile example
# Note, users must download Google Earth in order to visualise the kml.
# Extract residence and nonresidence events from the archived crocodile data
# Load crocodile datset into VTrack archive
data(crocs)
Vcrocs <- ReadInputData(infile=crocs,
iHoursToAdd=10,
dateformat = NULL,
sVemcoFormat='1.0')
# Load Wenlock points file and generate circuitous distance matrix
data(PointsCircuitous_crocs)
CircuitousDM <- GenerateCircuitousDistance(PointsCircuitous_crocs)
# Extract transmitter #139 data from crocs dataset
T139 <- ExtractData(Vcrocs,sQueryTransmitterList = c("139"))
# Extract residence and nonresidence events from the archived crocodile data
# Events occur when >1 detections occurs at a receiver and
# detections are less than 43200 seconds (12hrs) apart
# The circuitous distance matrix is used for distance calculations
T139Res<- RunResidenceExtraction(T139,
"RECEIVERID",
2,
43200,
sDistanceMatrix=CircuitousDM)
# The residences event file
T139resid <- T139Res$residences
# The nonresidences event file
T139nonresid <- T139Res$nonresidences
# Set working directory (in this case a temporary directory)
setwd(tempdir())
# Write the files to the temporary directory
write.csv(T139resid,"T139_resid.csv",row.names=FALSE)
write.csv(T139nonresid,"T139_nonresid.csv",row.names=FALSE)
write.csv(PointsCircuitous_crocs,"PointsCircuitous_crocs.csv",row.names=FALSE)
# Now generate the .kml animation and save to the temporary directory
GenerateAnimationKMLFile("T139_resid.csv","T139_nonresid.csv","PointsCircuitous_crocs.csv",
"T139.KML","ff0000ff")
# This file can be found within the tempdir() directory on your computer.
# Double-click on the .kml file to open in Google Earth
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.