Read a GPX file. By default, it reads all possible GPX layers, and only returns shapes for layers that have any features.
read_GPX(
file,
layers = c("waypoints", "routes", "tracks", "route_points", "track_points"),
remove.empty.layers = TRUE,
as.sf = TRUE
)
a GPX filename (including directory)
vector of GPX layers. Possible options are "waypoints"
, "tracks"
, "routes"
, "track_points"
, "route_points"
. By dedault, all those layers are read.
should empty layers (i.e. with 0 features) be removed from the list?
not used anymore
a list of sf objects, one for each layer
Note that this function returns sf
objects, but still uses methods from sp and rgdal internally.