Spatitally fetching edges from the graph (e.g. within a specified bounding area)

Hello everyone,

I’m implementing a very experimental routing algorithm using GraphHopper. Part of the algorithm requires getting a list of edges from the graph and restricting this list for use later. The restriction phase requires some expensive computation so fetching ALL edges from the graph and pruning takes way too long (My graph has over 1 million edges!)

Is there some spatial index way of fetching edges from the graph? Ideally I would like a list of all edges that are entirely contained inside of a specified ellipse. Any help would be appreciated.

Thank you!

You could try the approach GraphEdgeIdFinder#findEdgesInShape, there might be some edge cases to look out for though, have a look at #1214.


This looks like what I want. Thanks!