Description Usage Arguments Value Examples
Generate a list of bounding boxes along the GPS recorded data
1 2 | get_boxes(LatList, LongList, timeseq, resolution = 5, offLong = 0.001,
offLat = 0.001)
|
LatList |
A vector of size n for latitudes collected from a GPS recording device |
LongList |
A vector of size n for longitudes collected from a GPS recording device |
timeseq |
A vector of size n for irregular time sequence of recorded GPS data in format |
resolution |
(Optional) Approximate value of distance within each bounding box in kilometers |
offLong |
(Optional) A positive value of bounding box longitudal margin in decimal degrees |
offLat |
(Optional) A positive value of bounding box latitudal margin in decimal degrees |
get_boxes
return a list of
A matrix of size 4 X p of bounding boxes coordinates; with rows of ("left","bottom","right","top")
A table of size n X 4 with columns of ("DateTime","Latitude","Longitude","boxcuts")
; boxcuts
column has p levels and shows the corresponding box for each coordinate
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 | LatList <- c(31.67514,31.675195,31.67525,
31.675304,31.675356,31.675408,31.675467,
31.675517,31.675569,31.675623)
LongList <- c(-106.326522,-106.326367,
-106.326211,-106.326058,-106.325901,
-106.325739,-106.325572,-106.32541,
-106.325247,-106.325092)
timeseq <- c("2019-04-29 15:20:51",
"2019-04-29 15:21:03","2019-04-29 15:21:06",
"2019-04-29 15:21:15","2019-04-29 15:21:17",
"2019-04-29 15:21:32","2019-04-29 15:21:34",
"2019-04-29 15:21:51","2019-04-29 15:22:09",
"2019-04-29 15:22:36")
timeseq <- as.POSIXct(timeseq)
offLong=0.001
offLat=0.002
#generates only one box and gives warning for the high resolution
get_boxes(LatList, LongList, timeseq, resolution=1000,offLong,offLat)
#generates only one box and gives warning for the small resolution
get_boxes(LatList, LongList, timeseq, resolution=0.001,offLong,offLat)
#generates two bounding boxes
get_boxes(LatList, LongList, timeseq, resolution=0.1,offLong,offLat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.