Description Usage Arguments Details Value See Also Examples
View source: R/osm_cleaning_functions.R
Gets junction points from route networks, building on functions in the
stplanr
package: https://github.com/ropensci/stplanr/blob/master/R/rnet-clean.R
1 | osm_get_junctions(x, method = "stplanr", overline = FALSE)
|
x |
a SF data frame of OSM linestrings |
method |
which method to use? The default, "stplanr" uses the
|
overline |
should the route network be pre-processed with the overline function? |
This function finds all junction points in a road network, i.e. where two roads meet. It excludes road crossings e.g. bridges.
Returns an SF data frame of POINTS
Other OSM:
cluster_junction()
,
line_segment_sf()
,
nn_line()
,
nn_point()
,
osm_consolidate()
,
osm_main_roads()
1 2 3 4 5 6 7 8 9 10 11 | x = osm_main_roads(tc_data_osm)
class(x$geometry)
junctions = osm_get_junctions(x)
boundary_points = stplanr::rnet_get_nodes(x)
summary(duplicated(boundary_points))
junctions2 = osm_get_junctions(x, method = "duplicates")
length(junctions)
length(junctions2)
plot(x$geometry, col = "grey")
plot(junctions, add = TRUE)
plot(junctions2, add = TRUE, col = "red", cex = 0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.