poutnikl / Brouter-profiles

My profiles for Brouter offline routing on Android platform
76 stars 17 forks source link

Profile Hiking/Trekking near nature #12

Closed Thunichgud closed 5 years ago

Thunichgud commented 7 years ago

Hello, I like your profiles but I'm missing a special profile for my (and other peoples) purposes: I like hiking and trekking on ways in or near the nature. I'm missing a profile which prefers forest ways, field ways and small local roads and which avoids (if possible) large roads and main streets. The best results I get from the profile Trekking-MTB-medium.brf but it follows large roads and main streets, when they have footways and/or bicycleways at their side. This is annoying. Could you create a profile with priority steps like: HIGH: forest ways => field ways => small local roads => ........... => path=sidepath and/or is_sidepath=yes or similar ways => large roads => main roads. LOW Such a profile would be perfect. Best regards -Holger-

poutnikl commented 7 years ago

Try first to experiment with profile template tuning. For bike, choose the template from Ford crossing branch, it is newer. For trekking template, choose high values of Mtb factor(1-3) and eventually together with smallpaved factor (0-2)

For hiking template, there is offroad factor as analogy of Mtb factor.

If it does not satisfy you, it would help if you provide brouter-web links to location scenarios with examples of desired routes, in contrary to routes what you managed by profiles.

I am not aware of profiles ignoring cycleways or footways, but I can check. It may ne also matter of Osm node costs and way initial costs.

poutnikl commented 7 years ago

For Hiking, you may try also raising path_preference parameter.

Thunichgud commented 7 years ago

Sorry, I'm not able to customize the profiles. I don't understand them and I don't understand your description what to change in them. So I hoped you can modify the profile for stupids like me.

poutnikl commented 7 years ago

Do not underestimate yourself. As I am not aware of my profiles work as you describe, I need your cooperation.

Locate at Brouter web the start and destination, that manifests the profile behavior as you described. You may post the Permalink you can see at the screen right bottom..

I can then reproduce and analyze it, and eventually create the optimally tuned profile.

Thunichgud commented 7 years ago

I will give you three coordinates for an example route: Lat: 54.10701 Lon: 11.89214 Lat: 53.23017 Lon: 11.48748 Lat: 53.53209 Lon: 9.88017 In the first part of the route the result is rather good, but in the second part the route follows nearly all the time main roads. I checked these roads in JOSM and I saw, that there are footways/cicleways at the side of these main roads. BRouter uses these footways/cicleways which are marked in JOSM as sidepath=yes and/or path=sidepath. But these ways shouldn't be used - if possible (low priority). They are fast and short, but annoying.

Best regards


Poutnik notifications@github.com schrieb am Mi, 8.3.2017:

Betreff: Re: [poutnikl/Brouter-profiles] Profile Hiking/Trekking near nature (#12) An: "poutnikl/Brouter-profiles" Brouter-profiles@noreply.github.com CC: "Thunichgud" weto208-spam@yahoo.de, "Author" author@noreply.github.com Datum: Mittwoch, 8. März, 2017 15:14 Uhr

Do not underestimate yourself. As I am not aware of my profiles work as you describe, I need your cooperation. Locate at Brouter web the start and destination, that manifests the profile behavior as you described. You may post the Permalink you can see at the screen right bottom.. I can then reproduce and analyze it, and eventually create the optimally tuned profile.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

poutnikl commented 7 years ago

It was quite a long route. .. :-) I was testing the current development versions of Trekking-template ( 2.5.20 ), so its Trekking-MTB-medium may slightly differ from the released Trekking-MTB-medium.

The key issue that affects you is this :
Both Brouter standard and my profiles remove large part of penalization of main roads, if there is a "bike friendly hint". Either there is an explicit bicycle access flag/features, either there is a cycleroute. It makes a good sense, otherwise following cycleroutes could be disturbed, if a route segment follows otherwise a highly penalized road.

I have implemented a switch that turns this out, so the bike friendly hints are ignored. But even if not turned off, the MTB-medium settings seem do not make excessive prioritization of main roads.

poutnikl commented 7 years ago

Try to download and test these 3 profiles Trekking test is the Trekking-Dry according to the latest template. Trekking-MTB-Medium is what it seems to be, Trekking-MTB-Medium-noidbike is MTB medium with turned off prioritization of bike hints for major roads.

Thunichgud commented 7 years ago

Hi, Poutnikl,

I tested the three test profiles and compared them with the previous versions. The best results I've got from the "Trekking test" which results are nearly identical to the older "Trekking dry". The differences between the two MTB profiles are very very small. "Trekking test" would be my favorite profile for hiking and trekking far away from car traffic but it seems that it avoids small forestways and small fieldways. It uses only hard-surfaced broader forest-/fieldways. And it seems that speed has a high priority. Because of that it uses often broader ways and roads, also when there are shorter smaller ways without car traffic. Speed has no priority for me. Can you fix this ? That would be nice.




Poutnik notifications@github.com schrieb am Fr, 10.3.2017:

Betreff: Re: [poutnikl/Brouter-profiles] Profile Hiking/Trekking near nature (#12) An: "poutnikl/Brouter-profiles" Brouter-profiles@noreply.github.com CC: "Thunichgud" weto208-spam@yahoo.de, "Author" author@noreply.github.com Datum: Freitag, 10. März, 2017 19:14 Uhr

Try to download and test these 3 profiles

Trekking test is the Trekking-Dry according to the latest template.

Trekking-MTB-Medium is what it seems to be,

Trekking-MTB-Medium-noidbike is MTB medium with turned off prioritization of bike hints for major roads.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

poutnikl commented 7 years ago

I apologize for not noticing the main "nature" request. For some reason, I have read it as "near future" :-)

The Trekking-Test SHOULD be near identical to the older Trekking-Dry, as it is its development version. It was provided as a reference. The trekking-Dry/Test is as it should be, tuned neutrally. What was to do was tuning the template for the biased, particular use.

The 2 MTB profiles are development versions of older MTB-medium, the noisbike version differs in removing the lower penalty for mainroads wit bike friendly hints. Generally, both Trekking MTB profiles DO prioritize tracks/paths/worse surfaces and penalize mainroads, so it is very strange you get better results with the Trekking-test, as the opposite should be true.

Did you try to chose a profile from the full profile set from Trekking-Poutnik repository ? Like MTB or MTB-light , until I create evetually some new ones ? Or the MTB profiles by Zosserbart ?

Staying at tuning of my profiles, it can be done by tuning these settings at Brouter web.

assign MTB_factor 0.0 // replace by values between 1.0 - 3.0 assign smallpaved_factor 0.0 // replace by values between -0.5 - -1.5

As you are the best person to decide what you like the best.

I have pre-created for you a version with values 1.5 and -0.75 as Trekking-tracks.
I suggest not to use it in city traffic, otherwise it may lead to funny results due avoiding roads. It can be further tuned if not balanced. As seen on Brouter-web, it could be good as first shoot.

It gives strong additional prority to tracks/paths, especially unpaved, and high additional penalty to roads, in smaller extent even paved mall roads/track. If these small roads/paved tracks are penalized too much, the smallpaved factor can be increases.

Note that there is not possible to distinguish the terrain context of tracks/path ( urban/field/wood area ). Theoretically it would be possible to determine it indirectly from access=agriculture/forestry, but usage of such tags is rare and not consistent.

See also Brouter-profiles wiki
MTB_factor and smallpaved_factor
Trekking MTB Profiles legend

pereorga commented 7 years ago

Hi,

I've arrived here looking for the same or a very similar thing: high preference for paths like http://4.bp.blogspot.com/-TeYg7BIyhxI/Tb28bjNCvQI/AAAAAAAACAQ/2aCL7w6MHJ0/s1600/DSCN3241.JPG and https://s0.wklcdn.com/image_22/672647/9191143/5455245.jpg - unpaved paths outside urban areas where a single person can pass in line. We call them "corriols" in Catalan.

I tried https://raw.githubusercontent.com/poutnikl/Trekking-Poutnik/develop/Trekking-tracks.brf and I think it's almost there for most cases, but it's still going through cities in others. I also found a case with a very unexpected result, try going from 41.40359970000001,2.1553129000000126 to 41.4470241,1.9728327000000263:

brouter_web_client

(Collserola mountains are skipped when trying to go to Sant Andreu de la Barca from Vila de Gràcia)

I think it would be great if Openstreetmap tags such as landuse=forest and natural=scrub could be used.

poutnikl commented 7 years ago

Technical note: If a particular location or route is evaluated, it is an advantage to provide the Brouter-web permalink(bottom right corner) , even if just with the standard profile as here. I can then just upload the custom profiles to evaluate the route.

BRouter routing is not aware of area tagging. BRouter exposes via RD5 files and lookups.dat file to profiles just selected tag subset for OSM ways and OSM nodes. Profiles cannot evaluate OSM areas. Profiles can evaluate only OSM way tags relevant for routing + OSM node tags along these OSM ways.

Therefore, a profile sees a path/track/road, sees its tags relevant to its quaity, but does not see its context. It has no idea if it is a path in a city park, a path as a shortcut through fiields, a forest path or a mountain trail, unless there are explicit tag hints about it.

Trekking-tracks profile was not intended as a Mountain MTB profile. It is still meant for traveling, even if with MTB-like preferences for used ways. Be aware that all these profiles evaluate elevation changes as extra way lengths and they always go for the shortest equivalent length. The route across the mnts gives additional 400-500m up and down. what can give up to extra 60 effective kms. The particular value highly depends on Brouter profile and the slope profiles.

The Zossebart's MTB profiles and my MTB-like profiles derived from Trekking-Poutnik template. decreases elevation penalties a lot, but they are still there. Note that even Native MTB profiles of Zossebart do not suggest the route across the Collserola Mtns, but goes around similarly as other profiles.

You may not notice the path_preference parameter, already present in the template, and therefore in Trekking-tracks as well. Playing with it gives you more or less what you want.

Here is the link to BRouter-web with the route provided by the standard Trekking profile. I created for you the profile Trekking-hilly-paths.brf with the below parameters. Upload it is the bottom left custom profile field and you may experiment with the profile tuning.

Be aware the profile may act crazy in particular scenarios. The question is, if it is crazy enough, or too much. It may eventually kill you. I wash my hands and all consequences fall on your head.

assign cycleroutes_pref 0.2 assign MTB_factor 2.0 assign smallpaved_factor -1.0 assign isbike_for_mainroads 0 assign path_preference 20.0

In the end, as I have said above, I do not recommend to use similar profiles within cities, but rather recommend a hybrid profile approach. As the route they could suggest in a city may be more weird than a route that other profiles would suggest out of a city.

pereorga commented 7 years ago

Thanks a lot for the explanation. I get it now. Hopefully BRouter will be able to take into account OSM area tags in the future.

For now, I think Trekking-hilly-paths.brf is working great. I will be testing it in the coming weeks.

Regards

poutnikl commented 7 years ago

Great. I think it may need some tweeking by tuning the above parameters. You can di so BRouter-web on terrain you know personally to get the routes you know you would choose.

Note that I have just fixed a regression introduced earlier, that sometimes may trigger the BRouter runtime error "Error: error re-tracking track". I updated Trekking-hilly-paths.brf to address that.

poutnikl commented 7 years ago

Regarding the area tags : I doubt the BRouter or other routing service will implement their evaluation in routing context. But even if they did, I think better is the manual visual way with viapoints or nogo areas.

poutnikl commented 7 years ago

Note also the chosen nonpath_penalty= 20.0 is very aggressive settings, overcoming default penalties of mountains paths, due rough terrain and hilly nature. For less extreme scenarios in flat regions, even values 3-5 may give good enough results.

poutnikl commented 7 years ago

In BRouter, it is not possible to analyse the wider context of OSM ways, aside of the OSM way/node tags. Namely belonging to or being placed in the OSM multigonal area is information not available in Brouter RD5 files nor to Brouter profiles.

I have addressed possible partial solutions indirectly by the above mentioned special profiles Trekking-tracks and Trekking-hilly-paths.

poutnikl commented 7 years ago

There is a way how to address various preferences of ways in wider map context:

Using OSM tags class:bicycle, resp class.bicycle,mtb. It is a subjective tags, and as any such a tag it is rather conversational and questioned.

Valid values are -3..+3. +/-3 should be use very exceptionally for extraordinary horrible or amusing ways, and 0 should be avoided as giving no info.

The streetbike profile of @utack already uses this tag, and I am going to implement it as well in my profiles.