-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow straight lines #68
Comments
Examples are gpsies.com and outdooractive.com, see also Discussion |
Hello, i search for a same function! |
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? |
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 👍 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, |
"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. |
Thank you @mjaschen for the setup. Basically it works good. I played around a bit and have the following feedback (not sure, whether any of this is related to the concrete instance, but I assume no...)
I know, that this is not the best exact technical description of what I did, but thats the things I found so far by klicking around a few minutes. |
Thanks for the feedback, but it's really too early for error reports, this is still in the middle of development and not ready to be used yet. |
I guess this is good enough for now, maybe buttons can be reorganized later. While I may have hoped for a more collaborative discussion design-wise, it is what it is, so I won't waste more time on it. Let me know once it makes sense to post new bugs I discovered after the recent beeline commits. |
This is not set in stone yet, it was just the most straightforward way, using an EasyButton example. I was going to comment on that and perhaps open a separate issue. |
Hurry to have this feature, it's what I need to track my MTB and trail rides. |
This one increases the visual gap between cursor and trailer+marker significantly during mouse movement when dragging vias or adding waypoints (for both my mobile and desktop setup). Even for slow movements I can observe gaps up to 150px. Performance becomes really laggy, i.e. redrawing of trailer+marker cannot keep up with the cursor movement anymore at all. Increasing window/canvas size makes it even worse. This has been fine before, and now sadly degrades the user experience quite a bit. TBH, that's not a compromise I'm willing to make. In addition, the change from SVG to canvas introduces a weird bug: When clicking next to the route within a distance of
|
Switching to canvas is a bit of a bold move that might have unexpected consequences, so far I have found and fixed two issues.
I haven't noticed anything like that, will see if I can reproduce and would be interesting to investigate. Generally I would expect Canvas to be faster than SVG. OpenLayers has switched everything from SVG and DOM to Canvas.
I have seen that during development, but not anymore. Will need to check again.
I would first want do check if there is anything going wrong or to be improved or if Canvas is really slower in some cases. I have looked at some plugins that add a tolerance for SVG by adding a wider, invisible line on top. But they all just duplicate the layer and its geometry, which might also have perfomance implications. |
I'm not making this stuff up, in fact I arrived at the commit via
maplibre-gl-js is using canvas too, and is even slower. BRouter-Web is about the only fast (as in "what works fast on your machine might be very slow on my machine") app left, I'd be wary of giving up that differentiating factor. I mean, I could just revert the change for my own installation, but I'm mentioning it here because it could affect more people. My general impression after reading lots of StackOverflow discussions is that canvas is supposed to be used if performance of thousands of single map objects matters (e.g. live view of a public transport network), but it can be slower for simple use cases (like displaying a map and a single track).
Something nice to know I found, but probably more related to Leaflet itself rather than our use of it: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Optimizing_canvas (Looking at Leaflet<slash>issues/7350, I'm not so sure canvas is very well optimized in Leaflet yet...) I also noticed in Leaflet's docs that the renderer can be changed for single paths too opposed to applying it to the whole map. Did not try this yet, though. Do you know why (If we have no other choice than to use canvas in the end, then perhaps it can be done in a way which has less impact, e.g. only on mobile, or only for beelines...) |
Just some minor feedback because it has been discussed: As a long-term OSM contributor I would not like to see contributions that are solely made to make some routing work. In the last years OSM increasingly gets worse in some aspects because of lowering hurdles for editing so that "everybody" can do it. Pushing people to contribute who are not really interested and don't care for the correctness of the data does not help OSM at all - rather the opposite: it creates more work for the experienced people to clean up behind those who are not willing to invest time in learning how to do it properly. I have briefly tested the ctrl-click implementation and apart from some minor problems (related to deleting nodes part of beeline segments which arguably are not even bugs) it is a very nice improvement that fixes my biggest problem in brouter-web, yay. The only problem that I can see that is not a bug is that the feature is too hidden which is a very bad thing (I strongly disagree with some "UX" folks on that - features need to be discoverable from the UI itself). One way to improve on that would be to change the supposed line and/or cursor when ctrl is held to indicate the changed behavior. Making the line non-dashed would make it pretty obvious IMHO. The user would still need to discover it somehow but such an indicator makes it way more easy to find compared to if nothing changes until you actually click. |
Thanks, I've tested https://brouter.damsy.net/v99.52.4-beeline/ for a while and it works good and useable on a Windows device for me. |
|
Just click on any given route segment (between two points). Example video: https://docs.google.com/uc?id=1gLOsoaGYboeyrX5UIP7s0o0cwhBusHiB |
It's shift+click now. |
I think this is ready for testing now (on the master branch). Given that this has been taking so long, I guess I will leave the UI as is, especially the toggle button, see follow-up issue #498 for later. Usage:
Mobile behaviour will change a bit:
|
Hi @nrenner |
@drdrknox The version on brouter-next.m11n.de is outdated. I've merged the changes and deployed the new version to bikerouter.de. |
@mjaschen |
I've also tested it, perfect job and great addition to the brouter functions! |
@0709wiwiwi this seems to be unrelated to the current issue - can you please open a new issue for that. |
OK Roger. I hope I did it correctly. (Not used to be active here) |
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
The text was updated successfully, but these errors were encountered: