Closed bagage closed 2 years ago
Examples are gpsies.com and outdooractive.com, see also Discussion BRouter, routing problem, manuell selection way (bridge /ferry) - manuelle Routenauswahl für Teilabschnitt (Brücke / Fähre)–Google Groups (German)
Hello, i search for a same function! gpsies.com has such a function: in the sidebar with a checkbox "follow roads". Is this by routing always checked, follow ways, and unchecked on during routing makes direkt lines, and continue routing on ways checked the checkbox. Is it possible to install it in brouter-web?
IMHO this is a very important feature! Please consider an implemantation, if possible! Thanks!
Some more requests in the Group:
Probably related server issue: abrensch/brouter#145.
Seems like the most popular feature request right now, adding it to the "next" milestone.
Just not to route a segment sounds easy at first, but we request the whole route from the server when exporting. So I guess the server would need to support straight line segments, and we would need to pass the additional info which segments are straight lines. Don't know if Android apps would benefit from a server implementation as well, @poutnikl mentioned Locus supporting "straight line routing" for individual segments, but not when recalculating the whole route (if I understand correctly).
I think there currently isn't a way to store additional info on route segments, probably not a big deal, but I guess I personally would want to evaluate switching the routing plugin (#261) first, before putting more work into it.
@nrenner an alternative would be that brouter-web ask brouter engine each segments individually, and rebuild the result from it? It wouldn't work great when exporting to gpx/tcx file, but for rendering only it should be OK?
The client itself already does only ever request individual segments, even when recalculating the whole route on profile change. Skipping the server request for straight segments will probably make sense there.
But we still need a solution for the export formats. I'm not saying that it's hard, just wanted to mention that it's probably a bit more effort and making things a bit more complicated than one might expect at first.
And yes, we should already have all information in the client to build the whole route, so this raises the question again, if we really need to call the server for exporting.
One concern is, if concatenating segments from individual requests is actually producing the same result as requesting the whole route at once. @abrensch said he made it to be consistent a while ago, so I don't see a problem here. But this isn't a given and the whole route behaving the same as the individual segments also has some drawbacks, as far as I can see:
The question is where and how to do the formatting, see also previous discussions in #226 and abrensch/brouter#91:
@abrensch we briefly talked about straight line segments at SotM, and I take it that it wouldn't be a big effort to support those in the server? The other question is, do you think it makes sense to have this in the server or would you prefer if we handled it in the client only?
Bonjour serai t'il possible d'avoir une fonction pour tirer une ligne droite dans un tracé lorsqu'il ni a pas de voirie sur la carte.je prépare mes circuits de randonnée sur l'ordinateur et je l'exporte en KML pour l'utiliser sur le smartphone mais je suis souvent bloquer par ce problème. un exemple en pièce jointe.
Oui @pipiiri c'est exactement ce à quoi ce ticket fait référence. Ça demande du boulot dans l'application qui n'a pas encore eu lieu mais j'espère qu'un jour ça sera implementé. En attendant, n'hésitez pas à rajouter un :+1: sur le premier poste, afin qu'on puisse analyser la priorité des tickets. Merci !
Understood straight lines are a wanted feature but it means in think in most cases that the openstreetmap data does not have the paths that the user wants to take.
Looking at it from a system view, the preferred solution is to update the map so it is working in the future and others can also benefit. It is good not only to use openstreetmap but also to contribute.
So how about:
Point 2 has some privacy implications so a checkbox to untick this functionality?
I had the same issue today with a ferry which BRouter was ignoring on my road. I ended up breaking the route into multiple parts and having multiple GPX. Lead me to another idea, would it be simpler to handle multiple routes in the BRouter interface (multiple start / end pairs of points) instead of changing BRouter to handle straight lines?
@Phyks Something similar to LocusMap app route segments in its planner, where each segment is calculated independently in a serie of route calculations, where some segments may be straight segments.
I hope to get started working on it this week.
I recently noticed a similar feature on https://cycle.travel/, not sure for how long it has been there already: You can now click on a via point and select "Go any way / paved / direct to next".
The UI is a bit hard to spot on first glance, but has an advantageous property compared to a dedicated "draw a straight line" tool: It allows to change sections of the route inline, not only append straight lines while drawing. Still, I find their pop-up context menu for vias gets in the way too often, I prefer BRouter's approach (delete on click) which is much faster to use. So how about this (unless you already have a better UI in mind):
Idea A)
This approach is probably efficient to use, but still a bit hard to discover in the first place (you have to experiment or notice the popup help) and not ideal on mobile.
Idea B)
This approach is slightly easier to discover and works well on mobile. It needs two additional clicks for a single straight line (still only two extra clicks in total for multiple straight lines), but since adding straight lines is probably much less common than adding vias, it should be okay. Nevertheless, it adds one more tool button, of which there are already too many. With so many steps it might also be difficult for users to know they have to click on the route too after toggling the new mode (they might think it auto-applies on the section they last "looked at / thought about").
Personally, I'd probably prefer A) for its efficiency and simplicity, but I can see other people might like B) too.
I believe that this is called, at least in some places, route "As the crow flies".
I've been using brouterweb for a few days now and I really like it so far - great job, thx :-)
Me too, can only confirm the wish for this feature. It would be very helpful indeed, not only in the case of inaccuracies or errors in the map, but also if you have to change from one path to another cross-country (bike or hike). For such cases it currently seems not to be possible to create a usable routing. Or is there any other work-around, beside splitting to different routes?
i also would appreciate some support for this feature!
although i usually try to improve the OSM road data just as well to share knowledge about my running routes in the woods with others, there are often cases, where you simply can not draw the most practical chosen way on a correct public map (e.g. it slightly ignores some offical regulations, crosses private grounds/fields, etc.). it would be really helpful, if brouter-web would support workaround capabilities for this class of very common real world circumstances as well.
Hello, Thanks for this great tool. On behalf of many users out there, I would like to highlight two topics concerning route planning and creation. These are the possibility (priority 1) to draw straight lines independently from the map and (priority 2) to show POIs which are of interest for your own route planning and which should later optionally be saved together with the track. (POIs around the current track) Thanks for your work and for the best planning tool on the web. Peter
"Add straight line" : we had this usefull feature in gpsies.com (which is ceased now sadly).
Sometimes just a few meters are missing, i.e. to get away from a fast, dangerous street.
To create crossings at OSM where none are visible as a workaround isn't a right way to use OSM.
I was testing the bouter-web right now and this would be an important feature for me.
Very important feature. I see that this is the next milestone. So thanks a lot and looking forward to that!!
Perhaps good to know that some would like to use it not only for connecting routes on land, but also for river routes (e.g. SUP, kayak). Currently, lakes are not available there. And it also happens that one would like to shortly cross land to get from one river (or lake) to another.
Today I had the idea to do a cheap hack on the server side by (mis?)-using nogo-areas for that purpose
Nogo-Areas with waypoints inside are not really well defined yet.
Up to now, they where just ignored.
So we could define: a nogo-area with 2 adjacent waypoints in it triggers a bee-line between them.
I coded that patch and deployed it at the server instance:
It's not yet perfect, e.g. the content of the data-tab for the bee-line is undefined.
Do you think that's an acceptable solution?
reragrs, Arndt
Hm, I'm currently working on doing this in the client without involving the server.
I have long wanted to move track formatting to the client, so we don't need to re-request the whole route for downloading and roundtrip client information like name and waypoints just for formatting. And I take this issue as a reason to finally do that, in order to avoid a senseless server call for beeline segments that just tells the router to do nothing and echo back the coordinates we already have.
See branch 68-sl-formatting and task list in first comment.
Do you think that's an acceptable solution?
A very clever idea! I think it can serve as a perfect temporary workaround until the final solution is ready as described by @nrenner.
Many thanks for this patch @abrensch!
How should the user interface work for this?
@rkflx has already shared some thoughts in a comment above.
There is a first early implementation in the branch 68-sl-routing (yarn install
needed). For that, clicking on the segment (or rather the drag handle, which is harder to get on the dotted line) switches between routing and a straight line, and pressing the ctrl
key while clicking to append draws a straight line.
Awesome, thank you so much @nrenner! Simple patch on the surface, lots of work in the background ;)
I tested it for a bit, I think the interaction pattern works really well and is quite intuitive once discovered. Ctrl-click to append is a nice addition too. Some more observations (many of which you're probably already aware of):
UX:
Bugs / unfinished implementation:
This feature is someting I've been waiting so long as it resolves so many situations where the OSM data isn't 100% accurate and ways aren't connected correctly. 100% thumbs up for this feature!
and pressing the ctrl key while clicking to append draws a straight line.
ctrl-click on macOS has the same effect as right-clicking, i. e. opening the context menu.
I guess we need either an alternative modifier key for this feature or a different method to append beelines to a route (as ctrl-click is missing not only on macOS but on all mobile devices as well).
ctrl-click on macOS has the same effect as right-clicking, i. e. opening the context menu.
Is this universal, or something which can be overridden? (In some web apps, the browser's context menu is already replaced by a custom one.)
Anyway, maybe Shift
would be a good alternative and work even better due to already being modifier for some shortcuts. Gave this a quick spin (replaced ctrlKey
with shiftKey
), worked fine for me and the Shift-Drag-Zoom feature still functioned as before.
I'd rather not get into adding a separate mode switcher button (in the sense of replacing Shift
entirely with it), since moving the mouse back and forth between route and sidebar kind of defeats the purpose of quick and easy route drawing.
ctrl-click is missing not only on macOS but on all mobile devices as well
@mjaschen Would a behaviour as described in my previous comment (UX-4 and UX-5, edited UX-1) work for you on mobile?
There is another point I'd like to bring up. Looking at reactions in mailings list, issue trackers and forums to this feature, there is a common theme: Users are craving for the feature because they want to route around missing or broken OSM data.
Obviously this is only a workaround, and the much more sustainable solution (with a turnaround time of only a couple of hours for fast-updating instances) would be to actually fix the underlying data. I fear that by introducing the beeline feature, we remove an incentive to get involved in fixing the map.
This could be counteracted by encouraging users to contribute fixes or at least add notes to locations needing fixes:
Of course not everybody will make the jump, but at least we should lower the hurdle as much as possible. After all, why not contribute something back in exchange for a free of charge service.
Thoughts?
Is this universal, or something which can be overridden?
Yes, that behavior is universal and has a long history. Actually ctrl-click is the canonical action on macOS while right-click is just an alternative (source), despite everyone is using right-click nowadays.
Would a behaviour as described in my previous comment (UX-4 and UX-5, edited UX-1) work for you on mobile?
I think UX-4 could work well as long as the behavior is described/documented somewhere (non-modal popup on first use?).
UX-5 would feel odd while using: Imagine start drawing a route, change the last segment to beeline and then notice that the draw mode entirely changed suddenly. I think that would be confusing at least.
Regarding UX-1: Documentation of BRouter-Web in general is needed. I could imagine a modal dialog showing a short introduction (opens via navbar link) with the most important documentation/hint and tricks and a link to a separate in-depth documentation site (with multi-language support).
After all, why not contribute something back in exchange for a free of charge service. Thoughts?
Yes, that'd be great! We definitely should collect ideas (in a separate issue).
UX-5 would feel odd while using: Imagine start drawing a route, change the last segment to beeline and then notice that the draw mode entirely changed suddenly. I think that would be confusing at least.
Well, this is more or less intentional, though it might surprise users: If you only want to add a single beeline segment, drawing a regular route and changing it after the fact to a beeline is not that much additional work. The auto-append feature is more about the use case of drawing a multi-segment beeline, where toggling every single segment would be too much effort. Of course both use cases conflict if only the most recent segment should become a single beeline segment.
Still, I agree this is not ideal yet and we should iterate more on this particular aspect of the design. More ideas:
Use a multi-tap gesture to simulate pressing Ctrl
, e.g. hold down one (or two?) finger(s), and tap with another finger to add a beeline via (should work because adding is only triggered on tap-up). Disadvantage: Very hard to discover.
Show an ad-hoc inline adaptive UI somewhere on the screen, which indicates the current mode and allows to change mode:
Show a popup every time after adding a via, asking which segment type to choose. I would definitely not recommend this, since this will become massively annoying for the vast majority of cases (i.e. auto-routed segments).
Do not provide a Ctrl
-append-like behaviour on mobile, as multi-segment beelines should be less common and a single beeline is quick to toggle after the fact. Simple to implement for now, but requires more taps for some use cases.
I think I'd favour solution 2. (with 4. in second place) for now due to its additional advantages, maybe even on desktop if done in a non-obtrusive way (but this needs testing with an actual prototype).
Regarding UI/documentation terminology, here is what others are using (with "beeline" in my remarks above mainly referring to what is currently being used in the code):
Apparently there is no common or agreed upon wording for this feature.
"Disable/Enable (Auto?/Smart?-)Routing" sounds more like a global option to me, the most "direct" route could also mean "shortest route over ways" and even beelines could "Follow ways" by chance, making the latter ambiguous. "Toggle Beeline" or "Toggle Straight Line" seem to work better regarding a specific segment and in describing what will be seen on the map.
I'd say let's go with "Toggle Straight Line", since it is used by OsmAnd too, and easy to picture for non-native speakers, unless anyone has a better suggestion?
I'd say let's go with "Toggle Straight Line"
+1
Apparently there is no common or agreed upon wording for this feature.
That was my impression, too. Thanks for the summary.
@mgoyanes wrote:
I believe that this is called, at least in some places, route "As the crow flies".
As a non-native speaker "As the crow flies" always sounds to me like a description in search for a word.
I like "beeline", as it's a short, single word. Therefore I use it in code for now, but I don't mind using a different term in the UI.
Although I'm not sure about "beeline". I thought I heard it before, but maybe that was because I had looked it up in the past. leo.org suggests "beeline" as a translation for the German "Luftlinie" ("air line" translated literally). But there is a discussion suggesting that beeline is only used in conjunction with the idiom "to make a beeline for". The british dictionary linked on leo.org for additional information seems to agree with that and only has a definition for the idiom, while the american has it as a stand-alone noun.
Wikipedia defines Bee line it as "an idiom for the shortest route or a straight line between two points", Wiktionary as "A very direct or quick path or trip.", but the usage example is again the term "to make / strike a beeline for / to something". Beeline is also a navigation company, ironically they use the term "Compass mode" (because the device/app just points directly to destination during ride).
There also was a suggestion "querfeldein" for German, the translation is "cross-country", which might also be an option.
Apparently there is no common or agreed upon wording for this feature.
Not sure about "cross-country". Oxford Learner's Dictionary defines it like this:
- across fields or open country rather than on roads or a track ("cross-country running", "We rode cross-country").
- from one part of a country to the other, especially not using main roads or routes ("cross-country train journeys")
- involving two or more countries ("The report contains the findings of a cross-country comparison of crime statistics.")
...which would not be a good description for a paved inner-city back-alley shortcut, and too similar to the activity-related terms "cross-country skiing/running/riding" ("XC bike").
Also, the wording should go well with usage in tooltips:
Click to toggle straight line
is far more succinct than
Click to toggle "As the crow flies"-routing
.
If "Beeline" is the name of a bike/navigation related company, this might be a reason to stay away from it, just to avoid any potential confusion or even legal problems.
Thanks again @nrenner and all of contributors/users/testers on this issue!
If anyone is willing to test it without setting up a dev environment, demo is accessible on:
Very nice but how do you draw a strait line? I don't see a icon for it?
Cf https://github.com/nrenner/brouter-web/issues/68#issuecomment-821324601:
both ways work brilliant. Also the idea of 2. clicking on an already existing route to switch between follow-way and straight is quite good.
Thanks. Working now but the length is not calculated? https://tinyurl.com/w5668szk
I try to follow the dry river bed.
Very nice but how do you draw a strait line? I don't see a icon for it?
Thanks for the feedback. It's part of the consideration whether we should have an icon/button for this or not.
Working now but the length is not calculated? https://tinyurl.com/w5668szk
Yes, that's missing. Statistics are provided by the server for the routed part, straight lines are done in the client. This is only a very early implementation, a lot is not working yet (or subject to change), including the hash URL for sharing.
Ok, but looks promising :+1:
Thanks for the feedback. It's part of the consideration whether we should have an icon/button for this or not.
I think an icon/button would be a nice addition to have. I'm using Mac and I'm having trouble with the ctr+click command. I'm unable to draw a strait line.
With Android a button would be great too.
Gesendet von Yahoo Mail auf Android
Am Sa., Apr. 24, 2021 at 17:56 schrieb @.***>:
Thanks for the feedback. It's part of the consideration whether we should have an icon/button for this or not.
I think an icon/button would be a nice addition to have. I'm using Mac and I'm having trouble with the ctr+click command. I'm unable to draw a strait line.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
I wonder why there is a need to "draw a straight line" right away. Normally, I'd assume the workflow goes like this (an impression which stems from reading many of the wishes wrt. to beelines over the years):
In some less common cases you might know you want to draw a beeline directly, so we should support that, but it's probably not something which should get first priority when allocating UI space and the user's limited attention.
Isn't the primary and default function of BRouter routing over medium to long distances? If we want to optimize for creating routes from a large number of short-distance beelines from the start and disable routing completely, this would change the whole UI paradigm, many of the existing or future analysis features (e.g. surface statistics) would stop working, the QR-code feature would break down in its current form and routing-related UI (profile switcher, profile settings, ...) would need to get demoted. We should be very clear regarding what to optimize for.
Currently the features to discover beelines (tooltips, style change on hover or select, potential drawing mode indicator radio icons) are not implemented yet, so naturally the question of how to activate beelines comes up with testers. This is generally expected at this stage, in particular if the (not ideally worded) hypothetical task in usability testing would read "Draw a straight line, and tell me if you want a button!" instead of the more useful task "Create a route from here to here, visiting \<unroutable area>, and tell me how it worked out for you!". We should also be careful not to mix up problem ("I cannot discover the feature") and expected solution ("I want a button") when analysing feedback, because more often than not the root cause is somewhere else entirely and "just another button or config option" only adds to the pile of issues.
There is no explicit tool in the toolbar for deleting arbitrary vias, there is no tool to set new vias mid-route, there is no tool to activate a special mode to move vias, and most of the no-go UI is added only on demand. Yet users cope just fine, and it sets us apart from the sometimes quite bloated and therefore hard to use UIs of the competition. BRouter-Web is simple, and at the same time efficient to use. This is a strength, not a weakness. (Assuming a URL/GPX workflow, with other options to share routes to people/devices not (yet?) being implemented.)
In summary:
Sorry if this is a bit long. I hope to increase awareness for a more user-centered design process with usability engineering best practices here, which I think we could profit from (don't get me started on the new elevation graph...). Wikipedia on Usability is a good starting point for anyone interested in digging deeper.
Now looked at most of the entries listed in https://en.wikipedia.org/wiki/Comparison_of_bicycle_route_planning_websites (see updated comment for those providing beelines). No clear winner wrt. beeline naming, but more mentions of "Straight line". Review did not result in any innovative breakthrough wrt. beeline UI, though.
Still, I noticed one more peculiarity with the occasionally used mode switcher radio buttons: Often there is no way to toggle beelines for existing segments, but there is a workaround: Toggle routing mode and move via a bit. Then the via's next and previous segments will be rerouted with the new routing mode. Obviously this affects not only the intended segment, but it also destroys the segment intended to be left alone, so you have to apply another workaround beforehand by adding more sacrificial vias as safety guides, which can be removed again later on. This also means that for every regular via move you have to check the selected routing mode, or else you might be in for a surprise. Hard do discover, and slow and annoying to use at the same time.
Therefore we should make sure the mode switcher (the permanent radio button, not the temporary and explicitly pressed Shift modifier) only applies to appending, but never affects rerouting triggered by moved vias. (Comments above edited accordingly.)
After all, why not contribute something back in exchange for a free of charge service.
Yes, that'd be great! We definitely should collect ideas (in a separate issue).
I opened a separate issue on how to encourage OpenStreetMap contributions: #403
Make draw modifier configurable and switch to Alt
Sorry to interject, but: Alt+Click is often used by X11 desktops (or rather window managers) to drag/resize windows from anywhere, there the event won't even be delivered to the app. Also, it triggers the menubar in Firefox when the beeline action is aborted before clicking. In addition, common practise in desktop applications is to use Alt only for accelerators (i.e. those underlined characters on UI elements), but not for shortcuts or modifiers (except in combination with other modifiers, which we also do not want here). Therefore I would recommend against using Alt for beelines.
Shift-Click collides with Leaflet Shift-Drag for zooming when still moving the mouse a bit while clicking
In theory this problem already exists for adding waypoints vs. dragging the map. Admittedly, zooming is worse than dragging. Nevertheless, nice catch, and one more reason to always test in a diverse set of user contexts.
Options if Shift should be kept:
Other options:
To me, option 3. seems the most favourable. It could even be delivered later as an optimization (with either option 2. or no countermeasure at all in the meantime), so the beeline feature could be shipped and marketed with Shift from the start.
- Add a minimum drag distance before zooming happens.
That's what I also had in mind and implemented now.
- Add a minimum drag distance before zooming happens.
That's what I also had in mind and implemented now.
Thanks, that was quick. No issues found so far when trying it out.
As for the rest: Did not test everything from the comment above thoroughly, but many of the most obvious bugs are squashed, nice!
Two more nice-to-have details I noticed (also appended above):
Since the visualization (and click/tap-target for non-keyboard users) of the beeline append mode is still not that well-defined, here are a couple more thoughts (nothing final yet, though):
Just to add 2 cents:
I as well am craving hard for that feature. Regarding the concern of @rkflx , that
by introducing the beeline feature, we remove an incentive to get involved in fixing the map.
I think that the opposite would apply here. Often you will base your planning on an existing gpx which someone has recorded previously. From such tracks, chances are, that you will see some ways exist, which are not on the map. By re-routing over existing ways, you will never get to that specific place to actually have a look at the situation to do a proper mapping, unless you note the location separately and try to scout it manually. On long trips (e.g. a several 100k bike packing trip) this might not be a priority, so you need the possibility to improve the map as you go. With a beeline, you still can have your bike computer or smartphone route you over those beelines, keeping you on the desired track. This I think this would even encourage a contribution to OSM rather than miss the opportunity.
For the UX, I personally like the approach komoot does: you have an option in the context of a waypoint to disable "using ways" which leads to beelines from and to that specific waypoint. I find this more intuitive than a manual approach where you first have to select a button to "draw a straight line". I think by having the option in the context of a waypoint it is in the right place. However I also like the Idea that you can modify the routing behaviour as you draw a new node initially when building the route by holding a modifier key such as Ctrl. But then still I'd like to find the option in the context of a waypoint once a route already has been drawn.
Would it be possible to draw some straight lines? It is mostly useful when you know that a route is there but not present on OSM right know; instead of making a detour you just want to have a straight line. I don't know how much effort it would require but it would be definitely help, ie I mainly would use it to map actually missing ways.
edit (nrenner): task list