-
Notifications
You must be signed in to change notification settings - Fork 54
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
Routing configuration should be reworked to avoid parameter order hardcoding #37
Comments
Agreed, the format should be more flexible. ATM I think the most likely (least effort to implement & therefore get done) approach will be to add an extra property along the lines of:
To switch the order to be lon, lat. Thus this would keep any backwards compatibly as the default would be TRUE to use lat, lon. Ultimately a more flexible tokenizer approach would be nice and/or a smarter way to select sub-items (e.g. being able to list/select the routing profile type [cycle/car/foot/etc...] - without having to specify the whole object class common properties each time), but unlikely to get done in the near future. |
The values in the xml files get passed to sprintf, iirc. I've gotten away with using
for example to make it swith the lat/lon order from what it expects. |
Addressed with #39 Add since you can also change the default ordering via the "printf positional arguments" technique '%n$' for the Nth argument - there is no need for an additional parameter reordering methods. |
The routing module, thanks to the XML configuration module, can use other/custom routing API. However, the coordinates are hardcoded in this order: latitude,longitude. This prevents from using APIs that take as arguments coordinates in longitude,latitude format, which is the case for example of brouter.
I did not try to propose some code as a pull request as I failed to rebuild viking-gps from debian sources (something related to linking a static lib and a dynamic one, with an advice to rebuild with -fPIC... I'm not competent to deal with it !) with minor modification (simply tried to change lat,lon by lon,lat).
however, I was able to use brouter by using the following routing.xml file
and by reordering lon/lat by using a MITM "attack".
brouter with the hiking-beta profile is very efficient for creating tracks for hiking, trail running, mountain cycling... It'ld be great to add support for it !
thanks !
The text was updated successfully, but these errors were encountered: