Type: | Package |
Title: | GPS Track Point Information Extractor |
Version: | 1.0.0 |
Maintainer: | Wagner Martins dos Santos <wagnnerms97@gmail.com> |
Description: | Focused on extracting important data from track points such as speed, distance, elevation difference and azimuth.(PLAZA, J. et al., 2022) <doi:10.1016/j.applanim.2022.105643>. |
License: | GPL-3 |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
Imports: | nngeo, raster, sp, sf |
NeedsCompilation: | no |
Packaged: | 2023-06-12 22:00:47 UTC; wagne |
Author: | Wagner Martins dos Santos
|
Repository: | CRAN |
Date/Publication: | 2023-06-13 08:30:05 UTC |
GPS track point information extraction.
Description
Allows extracting and generating new information from track points data collected with GPS.
Usage
path_gps(
filename = NULL,
layer = "track_points",
time_zone = "Etc/GMT-0",
zone_correction = "Etc/GMT+3",
arq_type = c("shp", "gpx")
)
Arguments
filename |
string designating the file .gpx or .shp path in geographic coordinates |
layer |
string that designates the layer with the trackpoint data when arq_type = "gpx", in case arq_type = "shp" layer is ignored |
time_zone |
string designating the gps default time zone |
zone_correction |
string designating the time zone for correction |
arq_type |
string that designates whether the file is type "shp" or "gpx", "shp" default |
Value
returns a data frame with information about time, coordinates, elevation, distance, speed, elevation difference and azimuth (always calculated in relation to the later point)
Examples
path.file.ex <- base::system.file("extdata", "trajeto_teste.shp", package = "gps.track")
df.gps <-
path_gps(
filename = path.file.ex,
time_zone = "Etc/GMT-0",
zone_correction = "Etc/GMT+3",
arq_type = "shp"
)
Data.frame with coordinates of points to sf with coordinates of line
Description
Allows converting data.frame with coordinates of points into sf with coordinates of line.
Usage
point_to_line(
data = NULL,
col_long = "long",
col_lat = "lat",
crs_proj = "+proj=longlat +datum=WGS84"
)
Arguments
data |
Data frame containing coordinates of points to convert to lines |
col_long |
String containing the name of the column containing the longitude |
col_lat |
String containing the name of the column containing the latitude |
crs_proj |
String containing the proj4string |
Value
returns a sf object with coordinates of line.
Examples
path.file.ex <- base::system.file("extdata", "df_gps.csv", package = "gps.track")
df.gps <- read.table(path.file.ex,h=TRUE)
df.gps.line <-
point_to_line(
data = df.gps,
col_long = "long",
col_lat = "lat",
crs_proj = "+proj=longlat +datum=WGS84"
)