Open bagage opened 6 years ago
full client-side GPX generation on the other hand would first require voice hint information passed in the GeoJSON (see also nrenner/brouter-web#42) and duplicating (and keeping in sync) the server implementation from OsmTrack.formatAsGpx, including multiple turn instruction formats depending on the current profile setting
a compromise could be using XHR to get the track, extend/modify the XML on the client (route, nogos, name) and e.g. use a data URL as download link
Download option either as separate GPX-route entry that has nogos but no track, or as a dialog with checkboxes to choose what to export (track, route, nogos), similar to GraphHopper Maps
nogo-areas as wpt
with radius in name
, using a special naming convention, see readme.txt and BRouter: Via-Points and NoGo-Areas
Hi,
I experienced a related issue lately. I used waypoints to define "stops" along a route and wanted to import the GPX track in OSMand, but actually the waypoints are only used internally in BRouter and never exposed in the GPX.
:+1: for this, I could write something to export waypoints in the GPX file. @nrenner and @bagage, you are probably more knowledgeable about GPX format than me, what would be the best way to handle this in your opinion?
Thanks!
I used waypoints to define "stops" along a route and wanted to import the GPX track in OSMand
I think this is a separate issue.
For the original request
It'd like to be able to drop a gpx over brouter-web and that it computes the route between waypoints.
we would generate a GPX rte
with rtept
s.
As I understand, what you would probably want instead are wpt
entries under the gpx
element, and only for the "stops", not for all route/via points.
Before implementing, I would like to discuss whether we should rather add such additional GPX content in the client after the download (given that it's technically feasible).
I would indeed want to have a list of points stored as <wpt>
entries in the GPX file (as per the title of the issue :). These would show up as step points in Osmand for instance.
The question now is indeed about where this should happen. A simple solution which would work for me would be to have the BRouter server emit wpt
objects for each and every lat/lon which has been passed to it (therefore for every enforced waypoint). This would be super simple to implement I think.
This being said, it might be worth having this added in the client interface (e.g. brouter-web) instead. This would have the major advantage of being able to mark waypoints as waypoint (just for the routing) or "steps" ("stops") and therefore be emitted in the GPX file. This would also help mark the waypoints with a proper name / label instead of just having a GPS coordinate.
I don't have any strong opinion on this. Having it built into brouter-server
seems easier and would benefit any app built on top of BRouter. Having it in brouter-web
would probably help make it more customizable.
Still not sure myself about the client or server question, but I guess the most straightforward and consistent way would be to add it to the server. That it is available to other uses on the server is also a good argument.
Special, marked waypoints might also benefit nrenner/brouter-web#173. Simply having all route waypoints as wpt
would be a good start.
But wouldn't want to add wpt
waypoints by default, there should be an option in the export dialog in the client to enable it.
The overall goal would be to have several options for GPX at least:
Special, marked waypoints might also benefit nrenner/brouter-web#173. Simply having all route waypoints as wpt would be a good start. But wouldn't want to add wpt waypoints by default, there should be an option in the export dialog in the client to enable it.
:+1: for this. A good start might be to have a exportWaypoint
GET parameter in the server code which would export the wpt
if passed.
I am currently working on a drag&drop support feature for brouter-web. It'd like to be able to drop a gpx over brouter-web and that it computes the route between waypoints. It seems to me that the most logical/standard way of doing it would be by writing these waypoints as
<wpt lon=.. lat=.. />
in the GPX file generated by brouter. Obviously some features like nogo areas won't be present in the GPX, but we can either they write then via some XML extension or ignore them since they won't be standard anyway.