How can I display a map using a data source like OpenStreetMap (OSM) where instead of displaying route from A to B, I display all roads in a region, then apply filters on attributes like road_class, surface, and road_access? The goal is to visualize the impact of the GraphHopper custom_model on the routes that are affected when “multiply_by”: “0.0” is used. I want to see what roads disappear from road_class X or Y.
When using the GraphHopper custom_model, I encountered the “max nodes 5,000,000” error. After some trial and error, I realized that the primary issue wasn’t my “multiply_by” applied on curvature, but rather the lack of filtering on attributes like surface, road_class, and road_access, which led to a high node count. Now, I’ve improved my custom_model by restricting many many nodes and now I want to be sure I don’t filter things I would actually like to keep.
Strictly speaking you don’t necessarily need the GraphHopper
You are right, but this would be a “debug” tool to improve my custom_model, which is a graphhopper thing.
If anyone arrives here after a web search, these are the solutions I found:
Easiest: use overpass-turbo on an area and filter the roads you want. You can use the wizard, or learn the OverpassQL language.
Most complete: implement a POST request towards the overpass API inside your app to display the wanted roads as a layer. You’ll want to use “osmtogeojson” lib to avoid headaches processing the answer from overpass API.