-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function that returns junction points #14
Comments
Do you mean something like this? library(sfnetworks)
library(sf)
library(tidygraph)
net = as_sfnetwork(roxel) %>%
mutate(degree = centrality_degree()) %>%
mutate(is_junction = degree > 2)
net %>%
filter(is_junction) %>%
st_as_sf()
|
I think so, and it's simpler than I expected. Do you want to create an ad-hoc function that wraps centrality degree and filter for degree > 2? If not, then we can simply close the issue. |
I think this would be a good example of a function that belongs in our extension to the 'Quering node types' set of functions that tidygraph has: https://tidygraph.data-imaginist.com/reference/node_types.html That is, a function However, I think we should only add it if there is some widely used definition in the literature of what a junction really is. I am not sure if there is! |
Close for now, and may be reopened if we find a common definition of a junction. Agree @agila5 > |
Is your feature request related to a problem? Please describe.
I think we should include a function that returns junction points of a street network. As far as I know, there is no clear definition of junction point but I think that a reasonable definition (for OSM data) is the following: a function point is a point that is repeated three or more times in the city network.
Describe the solution you'd like
We should create a function that, given an object of class sfnetwork, returns an sf object with a POINT geometry with the coordinates of the junction points.
Describe alternatives you've considered
This is a reprex of the problem with a possible solution:
Created on 2020-02-17 by the reprex package (v0.3.0)
I've already discussed this problem with @Robinlovelace here: ropensci/stplanr#357 (and maybe we can also adopt the same approach of that reprex to close that issue but I would just wait for sfnetwork) and I think this is the first step for #12.
The text was updated successfully, but these errors were encountered: