-
Notifications
You must be signed in to change notification settings - Fork 406
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
List countries a route traverses and add corresponding duration within #349
Comments
If we want to do this, then it would probably need to be a case where the border crossing feature gets extended so that rather then only ways that cross borders having country info stored, every way has country info added to the extended storage. This probably shouldn't require much extra time for processing as each way is checked anyway, the difference would be in terms of the amount of data being stored |
One byte per edge should be enough to cover the IDs we use (up to 236). |
Right. I'd be in favor of this functionality. But it'd be nicer if country info would always be returned, not only when a route crosses a border. Always meaning, if the option to list countries is set. |
And if we want to do this, please re-open and include a fix for #195. I really think API users should not need to implement client-side mappings from our arbitrary ID's to ISO country codes. However, let's not alter the storage itself, but rather add a mapping. |
@aoles sounds like a plan! |
@nilsnolde the text values for countries has been reopened and @takb is looking into it |
The current plan is to use the BordersGraphStorageBuilder.java and add two more shorts to every edge indicating, at a maximum of two, the countries it traverses. The countries will internally be represented by our integer country mapping consisting of max. 3 integers. This process of getting the edge countries will just be added to the normal borders preparation once a new graph is calculated and therefore be stored in the same external storage. At least one country will always be stored and can be accessed from within the ExtraInfoProcessor.java to be added as extra information to any request made. |
…to feature--#349-list-countries # Conflicts: # openrouteservice/src/main/java/heigit/ors/routing/graphhopper/extensions/storages/builders/BordersGraphStorageBuilder.java # openrouteservice/src/main/java/heigit/ors/routing/pathprocessors/ExtraInfoProcessor.java
…to feature--#349-list-countries # Conflicts: # openrouteservice/src/main/java/heigit/ors/routing/graphhopper/extensions/storages/builders/BordersGraphStorageBuilder.java
Added in Release 5.0.2 |
No description provided.
The text was updated successfully, but these errors were encountered: