Description Usage Arguments Value Examples
View source: R/matchGPXtoNearbyOSM.R
Calculates the closest distance between a feature (e.g. OSM lines) and a feature list (points of tracks). Depending on the distance's threshold, either the closest point on the OSM linestring is chosen or the point of the track is taken if no OSM feature is close enough. The function returns a track matched to the OSM features. The track is returned in crs EPSG:4326.
1 | bringFeatureToOSM(track, osm_features, threshold)
|
track |
List of trajectory |
osm_features |
List of OpenStreetMap features |
threshold |
Distance threshold in meters.s |
Closest distance between x
and y
.
1 2 3 4 5 6 7 | ## Not run:
track = readGPXFile("./inst/extdata/track_run.gpx")
bbox <- st_bbox(track)
osm_features = readOSMFiles(bbox, c("tertiary, secondary, sidewalk, footway"))
osm_track = bringFeatureToOSM(track, osm_features, 10)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.