Skip to content
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

feature suggestions #20

Open
ischlo opened this issue Feb 18, 2024 · 3 comments
Open

feature suggestions #20

ischlo opened this issue Feb 18, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@ischlo
Copy link

ischlo commented Feb 18, 2024

Hello Vincent,

This is not an issue, as I haven't had any serious ones using cppRouring, it's actually phenomenal how good it is. We are publishing a paper soon in which all the routing was done with it. In short, thank you for your work ! I have some feature suggestions and I would be happy to contribute to them if you can use an extra pair of hands. The first one is being able to rout by giving geographic coordinates of points, instead of node ids. This would be very handy, I currently made my own function for that using h3 indexing, and if the data gets very big I run a nearest feature search in a postgis database. I am sure it can be sped up in R with some cpp code specific to the package. Having a cppRouting function do it as fast as a database in R would be truly great.
The second feature I would be happy to use and contribute to is a 'network voronoi’ function that from a set of input nodes/coordinates returns a list of sets of nodes from the graph that are nearest to them. Let me know if these seem relevant.

Looking forward to your reply,
Best,
Ivann

@vlarmet
Copy link
Owner

vlarmet commented Feb 20, 2024

Hi,

Thank you for your very positive feedback !

1st feature
In my understanding, each spatial point should be assigned with the nearest network node, then run current algorithms. We should look at the RANN package, which is incredibly efficient (memory use and speed) : https://github.com/jefferislab/RANN.
Coordinates should be expressed in meters and not angles, just like coords optional argument in makegraph function.
I would be ok to include this feature.

2nd feature
Yes, it would be interesting !

For your information, I plan to work on the following (big) feature : the ability to convert any spatial dataset (shapefiles, osm.pbf, sf ...) into a routable network.

A suivre

@vlarmet vlarmet added the enhancement New feature or request label Feb 20, 2024
@ischlo
Copy link
Author

ischlo commented Feb 20, 2024

Hi Vincent,

Thank you for your reply, I wasn't aware of RANN and just gave it a try, it's very fast indeed and does exactly what I meant. Having a preprocessing part where provided projected geographic coordinates are linked to the network nodes before routing and the distance added in the result would be a great new functionality (I think dodgr does this as well). It would definitely make sense when using your package with spatial networks and wanting to rout between different kinds of locations without necessarily knowing the underlying nearest node ids (my current use case is computing isodistances from thousands of h3 grid cell centroids, and st_nearest_feature is a big bottleneck at this point as I mentioned). I am happy to give it a try and write a function using RANN and send it to you.
Regarding the Network Voronoi, I will likely need to do it as well and can keep you informed.

As for what you are developing, sounds like a huge task ! Not having to import big network shapefiles/pbfs into the environment would be ideal. Good luck !

Best,
Ivann

@finnwiz
Copy link

finnwiz commented Apr 21, 2024

Just seconding the commendation for this library. It's incredible! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants