Open codemewell opened 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.
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!
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:
First, you should build your own segments files (OSM data in a BRouter-custom format) by enhancing the lookups.dat
with the extra tags which are required. See https://github.com/abrensch/brouter/blob/master/misc/readmes/profile_developers_guide.txt#L5 for documentation about the lookups.dat
file and https://github.com/abrensch/brouter/blob/master/misc/readmes/mapcreation.md for documentation on how to create your own segments files (you can use a Geofabrik extract instead of the full planet file if you want). You can then use https://github.com/abrensch/brouter/blob/master/README.md#brouter-on-windowslinuxmac-os to setup your own HTTP server for testing.
Once the segments files have the required features, you can edit the profile to use them. In your case, this is https://github.com/abrensch/brouter/blob/master/misc/profiles2/river.brf and a documentation on profile writing is available at https://github.com/abrensch/brouter/blob/master/misc/readmes/profile_developers_guide.txt.
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.
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:
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:
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.
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
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.
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)
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 :).
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](https://user-images.githubusercontent.com/17128190/67659937-e45bb180-f95d-11e9-97a2-74c3751832a4.png)
...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