abrensch / brouter

configurable OSM offline router with elevation awareness, Java + Android
MIT License
473 stars 113 forks source link

Perfect Custom profile for After-Routing #147

Open mebels opened 5 years ago

mebels commented 5 years ago

Hi, I only route after my bicycle-tours or motorbike-tours.
Sometimes it is not possible to route my driven route. I have already tried some custom profiles. Everyone has a weakness somewhere. Either I can route everywhere, but then the preferred routes are not taken on longer routes (zigzagging) or certain routes can not be routed. A problem here are temporary construction sites, or private roads with time-limited transit times, or one-way streets (where I drive briefly on the sidewalk), or two-lane roads on the opposite lane (sidewalk, because there is a side road branch), and much more. Here not mentioned, the possible cross-country routes. It's not always all paths in OSM drawn. Yes, I draw too.
I search for a perfect custom profile for After-Routing. Ignore the OSM rules, but keep the perfect route on longer routes. Walking, Bicycle, Motorcycle.

poutnikl commented 5 years ago

The world is not perfect. The most adoptive solution is the hybrid routing algorithm BRouter scripting + common sense braining :-)

Scripts are not perfect, even if they work on that, especially Jacobs street/city script. :-)

If they are to take into account all circumstances, they would be too complex.

Other limitation is BRouter does not work with all OSM info And OSM info Is not perfect either.

Phyks commented 5 years ago

@mebels If I understand correctly, what you are looking for is actually probably more like map matching (matching a GPX trace to the real road network) rather than routing (getting directions from one point to another), although the two of them are quite related.

Typically, one could think feeding a GPX trace as waypoints to BRouter and asking for routing would provide a nice and clean output, but this is usually not the case, as the GPS data can be very noisy (and this would result in incredibly irrealistic zigzagging effects in BRouter output). Having correct map matching requires to have probabilities on top of your waypoints position.

Mapbox has a Map Matching API relying on OSRM (based on the paper listed in https://github.com/Project-OSRM/osrm-backend/blob/82b5648c97edf1d2edec7aecebc35aa8a8033c82/include/engine/routing_algorithms/map_matching.hpp#L23).

I never got time to have a deeper look at the way Map Matching algorithm is actually working within OSRM. This could eventually be something doable in BRouter, I don't know.

mebels commented 3 years ago

Hello, when a "line" is not saved in OSM, there is a problem by routing. And it is not simple to draw the line when other this delete and open a discussion. I hav no time for that. I will only route "my" really route on "my" tour, for me, only.

I will give you simple examples. only examples, not my routes.

That is not "my" route: brouter-20200718-001

That is "my" route, but is an error (there is no line in OSM): brouter-20200718-002

That is not "my" route: brouter-20200718-003

That is "my" route: brouter-20200718-004

The last is a trick and not the really problem. My really problem is the first and second. In the internet is a routing toll on a website with login. This tool can temporary route cross-country. But this tool have ugly conditions (General Terms and Conditions Act) to route and save and use the routes. And it's login, and it's complicated, and it's not easy.

In the moment i have code a GPX viewer with a slider with moving point on the route and let me get the position string on every point. Then i can with this information delete the detour entrys range in the GPX file with a text editor. The result is a direct line between two points without detour. But that is expensive and not easy.

Is there a way to route not complete routes with cross-country, but in routes for little distances?

polyscias commented 3 years ago

Good you give these examples, what is really needed is that the openstreetdata is updated so brouter actually knows it can route over these routes, so perfect the openstreetmapdata. That will not only benefit you but also others, so that is be far the preferred solution. brouter gets the update of the openstreetdata daily, so you even can use the new route the next day.

For the first "problem" near Rüdnitz, this is how that train crossing looks like currently in openstreetmap:

Screenshot_20200729_083517-1

In am not familiar there but I see a "barrier=gate" and the imagery does not indicate you can cross there, so no indication that you can cross there. Imagary is not perfect and maybe you can legally pass the gate but for that you have to know the local situation or go there. If you can legally cross, the openstreetmap data should be updated.

I see there is no openstreet mebels account (yet) but when you really do not want to update openstreetmap yourself, you can make a Note indicating what should be done and others will pick it up.

nrenner commented 3 years ago

Is there a way to route not complete routes with cross-country, but in routes for little distances?

Not yet, see nrenner/brouter-web#68.

mebels commented 3 years ago

Oh, if problems were always this easy to solve...

github. github cracked all the passwords collected by the guy from "Have I Been Pwned". My password was there. Now I have to enter a verification code every time I log in, every time. I did not agree to have github crack my password. My password is safe as long as no one cracks it.

OSM. I recall two(!) situations where a road was renewed The OSM mappers had completely removed the road. "On the ground" could be legally driven over the construction site. A discussion with the mappers resulted in: nothing!

I drive long distances. Sometimes several on consecutive days. Now it is 00:55 and I have free time again, actually for sleeping, but I answer here. Today was a tour, the alarm clock rang at 06:00. If tomorrow was a tour, again at 06:00. No time! And if there are no tours, then work. No time! Either I route on the same evening immediately, or forget it. This is reality, my experience. I am missing some routes, also because routing was not possible with my "real" route.

Not only I need this function of temporary no-way routing.

poutnikl commented 3 years ago

A workaround would be creating routes in the route planner of LocusMap application. Each route segment can be generated by different BRouter profile, including just straight lines connecting 2 points.

If you stumble upon non routable road, you can temporary switch planning from BRouter to straight line and then return back.

You can then follow the saved generated route, including the nonroutable parts, implying you have set route recalculation off.

mebels commented 3 years ago

No App! My mobile device is so old, i can't create an account on google play, and forgett alternatives! Is search a solution on web, and for after routing, and for cross ... and forgett gpsies.com, there conditions are not so fine.