Routing: A way to link to a router for Chinese Postman routing?

Thank you very much for the tool. I hadn’t needed it before, but now I would like to complete Mapillary in my area in a structured way and was happy to find it.

Unfortunately, I am unable to achieve my goal, which is undoubtedly due to my lack of understanding of the tool and its individual functions.

I start by searching for the location of my choice in the bottom left corner of the dialog box. In my case, for example, the small district of “Überlingen-Nußdorf.”
Then I click on “Find Areas” and select the blue area. I also select a buffer of 50 m for the selected area so that the edges are not so sharp and all the roads in the town are included. Then I click on “Fetch Roads” to load the roads.
First Problem: “Fetch Roads” takes ages to load, it depends for the same area but it’s between 20-30 seconds average. My selected area is 0.92km² and 130 road segments.
image
Most of the time there is a error in the console: Unchecked runtime.lastError: The message port closed before a response was received.

When it finally works by chance (I just repeat clicking the button very often until I finally get a result), then I select my starting point and invariably receive a warning:

Warning: Unable to connect all required roads even if optional roads are included. Press OK to continue with the largest road group, or choose Windy Rural format and enable 'Allow navigation past boundary' with sufficient buffer distance so optional roads can connect the network.

By default, “Windy Rural (Benavent)” is already selected, so I cannot follow the tip in the message because it is already activated.
As far as I understand the message, not all paths in the area are connected to each other. So far, so logical. So I try to activate the setting “Allow navigation past boundary” and select a generous 500m. This should allow every path in the area to be reached from outside. But even then, the error message appears. Even if I specify 5000m or even 50000m, the message does not change.
Also annoying: with each new attempt, I have to select the starting point again.

When I click on “Generate Route” there is the following error in the browser window:
image
And thousands of Error exporting largest component: InternalError: too much recursion - strongConnect https://route.crafter.seen.one/js/utils.js:367 in the console.

So I keep reducing the area, and now it’s only 0.39 km². Now it works after calculating 2-3 times. But what immediately puzzles me is: Why does the route suddenly stop at the border of the area? I
did select “Allow navigation past boundary” before:

Anyway, I’ll continue and select “Skip route sections with street-level coverage*” because I only want to drive along roads that don’t have any Mapillary images yet. The two threshold values aren’t explained in the frontend, so I’ll leave them as they are.
I repeat all the steps and get exactly the same route, even though Mapillary already has coverage in the area. I see in the top right corner that it says “Covered: 0 segments.” Strange, because I can see the coverage:


I play around with the threshold values (explained in the GitHub readme ;) ) but getting no other results as shown above. So now I’m sitting here wondering, how is this tool supposed to be used?

2 Likes

Thanks for trying it! There is a lot for me to improve with the UI and documentation.

Do you get an alert box with an error message when you click Fetch Roads? Sometimes when I Fetch Roads and the Overpass server is overloaded, it will return 504 gateway timeout but yours seems to be a different kind of issue. Is it still happening now?

Looking at the Nußdorf example for why you are still getting the warning ‘Allow navigation past boundary’, I see the default navigation filter is including these service roads Way: 222558753 | OpenStreetMap and Way: 600872559 | OpenStreetMap. These roads are marked as one-way, the roads beyond are tagged service=driveway which is excluded by the filter. It makes the routing impossible to exit the one-way roads. Pressing the Ok button means it will try to generate the route covering as many roads by excluding impossible ones.

I’m not sure if you want to drive through highway=service, adding it to the navigation filter means they will all be excluded and not cause the warning.

Navigation Filter
[highway][area!~"yes"][highway!~"bridleway|bus_guideway|construction|corridor|cycleway|elevator|footway|motorway|motorway_junction|motorway_link|escalator|proposed|platform|raceway|rest_area|path|steps|service"][access!~"customers|no|private"][public_transport!~"platform"][fee!~"yes"][toll!~"yes"]

The app will let you know what a large area is which I set at 5 km² but it actually is the number of roads that affects the generation time. It will work on Überlingen but will appear to freeze for several seconds while it is generating.

I don’t recommend doing 5000m! You are asking to load in an extra 5000m radius of roads and it will currently get overwhelmed.

Yes I can see how the clearing start location can be annoying. I did this because when the starting location is selected, it determines the nearest suitable starting location after fetching roads. I can look to change the behaviour so it happens during generate route and setting the starting location can be done at any time.

‘Allow navigation past boundary’ might be better worded to something like ‘Allow navigation outside boundary to reach otherwise inaccessible roads within boundary’ but I need to improve the UI to fit all of this text.

If you have already fetched roads and you enable ‘Skip route sections with street-level coverage*’ and the Mapillary layer, you will need to press Fetch Roads again. I really should put this in the readme!

Hope this at least clears things up a bit…

1 Like

Thank you for your detailed feedback! I’ll try again right away :slight_smile:
Today, I’m getting the one you mentioned for both functions (Find Areas and Fetch Roads), this time with a pop-up and a 504 error. Yesterday, there was no pop-up, and the progress circle in the button just kept spinning endlessly without any feedback.


The server seems to be a bit overwhelmed today, but I’ve made significant progress. Once it’s working I got a route, thank you very much!

Thanks for pointing that out. I’ve corrected the streets; the access road to a shopping center shouldn’t be a driveway :slight_smile:
All in all, I now understand the process much better, thanks to you!

One thing that could probably be improved: No matter how you set the buffer or the area, there will always be roads that are just outside the area and are then cut off. Perhaps a tolerance could be specified here so that these are still taken into account or at least so that no dead ends are created. Do you know what I mean?

In general, it might be worth to have an option to say “no dead ends” so that the left path (black arrow) is not selected, but the right path (blue arrow) is.

I exported the route and uploaded it to bikerouter.de to further optimize it, close the cut-off segments, and remove dead ends. But overall, it’s very helpful! I’ll continue to play around with it over the next few days and get back to you if I notice anything else.

1 Like

You can de-select ‘Trim roads to polygon boundary’ to let roads finish even if it goes outside of the boundary instead of a hard cut.

Not sure if it would work, there are a lot of dead-end type roads like cul-de-sacs where most would want to keep. Looking at your example, the blue arrow is highway=service and service=alley while the black arrow is just highway=service. In this case, I need to make an update to support union statements to only allow highway=service if it also contains service=alley. Does this more closely match what you are looking for?