abrensch / brouter

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

Brouter perfect for kayakers & canoers ...almost #202

Open codemewell opened 4 years ago

codemewell commented 4 years ago

Hi, first of all huge thanks to creators for making this amazing routing engine! 🥇 I found brouter by accident looking for river routing tools. After fiddling couple of minutes with river profile on web client I realized how good and blazing fast it is!

And it's almost perfect. However it has big gaps. In using brouter for kayakers & canoers there are 2 things more things to consider.

First. Lakes & reservoirs. First are connections with waterways - example below: route river - lake

...and end/start points on lakes/reservoirs. In this case, to enable to place from/to on a lake.

Second. Streams in waterways lookup data. Streams are also waterways periodically used by mountain kayakers.

I know it was a tools intended for bikers, but why not to satisfy kayakers needs by few more changes...? As I can see it has already evolved to more versatile tool.

Please consider these upgrades and I'm sure it will be used in kayaking as frequently as in biking.

Cheers! 👍 Big fun of your work

Phyks commented 4 years ago

Hi,

First. Lakes & reservoirs. First are connections with waterways - example below:

Lakes are surfaces, and routing over a surface is (very) difficult, so it's not likely BRouter can implement this soon (see #108). What BRouter can do, however (and is currently able to do) is routing over the edge of the lake.

The reason why it does not do so is probably that the required tags are ignored, either in the lookup or profile. If routing over the egde is fine, this boils down to second point.

Second. Streams in waterways lookup data. Streams are also waterways periodically used by mountain kayakers.

BRouter only imports a subset of OSM data, defined in the lookups.dat file (https://github.com/abrensch/brouter/blob/master/misc/profiles2/lookups.dat). So far, only a limited range of waterways is included https://github.com/abrensch/brouter/blob/master/misc/profiles2/lookups.dat#L372-L384.

I guess this should be extended with the other useful tagging such as water=lake or waterway=stream etc.

Second part is the profile which should be edited to use these variables. The current river profile is really basic and probably just here as a proof of concept, see https://github.com/abrensch/brouter/blob/master/misc/profiles2/river.brf#L16. It basically only makes use of waterway=canal and waterway=river and ignores everything else. It should probably be updated as well.

codemewell commented 4 years ago

If routing over the egde is fine, this boils down to second point.

Of course! Edge routing on lakes or reservoirs is good enough approach.

BRouter only imports a subset of OSM data, defined in the lookups.dat Second part is the profile which should be edited to use these variables.

Does it mean I can somehow make it work right now, after installing & config my own BRouter HTTP server instance?

Thanks for lightning-fast response!

Phyks commented 4 years ago

Does it mean I can somehow make it work right now, after installing & config my own BRouter HTTP server instance?

Indeed. This is two-side:

It would be really interesting to have a comparison of segments files size with the extra tags taken into account. If this does not result in a large increase, it's probably a good idea to submit a pull request to merge your edits. Then, everyone will be able to benefit from it, whether from the Android application or the brouter.de website etc.

Feel free to ask if you need any more help on getting started on this.

codemewell commented 4 years ago

So many thanks!

I carefully followed you instructions and this hint: https://github.com/abrensch/brouter/issues/200. Also for building segments I tried to strip out all other unnecessary nodes ie left only few waterway and water tags in lookup.dat, swapped trekking.brf for custom .brf, modify all.brf and softaccess.brf. And it worked!

Almost... ;)

First of all. Works as expected on single-polygon lakes. But unfortunately multipolygon lakes are ignored. Example:

Zrzut ekranu 2019-10-29 o 14 23 15

Is it possible to somehow force to look at outer way in this case? What file do I need to configure?

Second. Even if river way intercepts single-polygon lake, but it has no relation with it, brouter doesn't find any connection between them. Example:

way - lake no connection

interesting to have a comparison of segments files size with the extra tags taken into account.

Well, I'm not sure if I hove done it properly, but for Geofabrik Europe Osm, generated segments for lakes, reservoirs and rivers are 276,3 MB.

Phyks commented 4 years ago

First of all. Works as expected on single-polygon lakes. But unfortunately multipolygon lakes are ignored. Example:

This is a known issue, it might not be very difficult to support outer/inner ways of multipolygons as separate ways. This is discussed in #82 and it's mostly lacking someone with some free time to look at it :/

Second. Even if river way intercepts single-polygon lake, but it has no relation with it, brouter doesn't find any connection between them.

This should work. This is likely either the river tags are not taken into account in the profile or the river is not imported by the lookups

poutnikl commented 4 years ago

Just a sidenote:

Look for river-poutnik profile in my Brouter-profiles repository. While it will not help with areas and polygons, some ideas may be useful, intended as improvement of original river profile for a user with a small motor yacht.

Also note the LocusMap Android application route planner allows to combine route segment from multiple methods. Like BRouter generated segments along water ways of OSM + straight manual segments across the polygons.

voschix commented 4 years ago

If we had the possibility to manually draw arbitrary route segments, this would possibly help, I suppose. This would also help on-land routing for cyclists, for example, in case of known map bugs (I typically would try to identify the problem, fix it in OSM, but I still cannot route "through" the error, because I have to wait for the map update)

bagage commented 4 years ago

Yes @voschix, drawing arbiratrary route segments is a big request (https://github.com/nrenner/brouter-web/issues/68) and @nrenner already provided key pointers there.

It will be done one day, but as this is a free-time project we cannot predict when exactly. Any volunteers are welcome to jump in :).