Skip to content
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

Closed
TimMcCauley opened this issue Nov 5, 2018 · 8 comments
Closed

Comments

@TimMcCauley
Copy link
Contributor

No description provided.

@rabidllama
Copy link
Contributor

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

@aoles
Copy link
Member

aoles commented Dec 17, 2018

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).

@nilsnolde
Copy link
Contributor

nilsnolde commented Dec 17, 2018

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.

@nilsnolde
Copy link
Contributor

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.

@TimMcCauley
Copy link
Contributor Author

@aoles sounds like a plan!
@sfendrich feel free to take this one on as a first task :-)

@rabidllama
Copy link
Contributor

rabidllama commented Jan 7, 2019

@nilsnolde the text values for countries has been reopened and @takb is looking into it

@rabidllama rabidllama added this to the 5.2 milestone Mar 4, 2019
@MichaelsJP
Copy link
Member

MichaelsJP commented May 7, 2019

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.

MichaelsJP pushed a commit that referenced this issue May 8, 2019
MichaelsJP pushed a commit that referenced this issue May 8, 2019
MichaelsJP pushed a commit that referenced this issue May 9, 2019
MichaelsJP pushed a commit that referenced this issue May 10, 2019
MichaelsJP pushed a commit that referenced this issue May 10, 2019
MichaelsJP pushed a commit that referenced this issue May 10, 2019
MichaelsJP pushed a commit that referenced this issue May 10, 2019
MichaelsJP pushed a commit that referenced this issue May 20, 2019
MichaelsJP pushed a commit that referenced this issue May 20, 2019
MichaelsJP pushed a commit that referenced this issue May 20, 2019
MichaelsJP pushed a commit that referenced this issue May 20, 2019
…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
MichaelsJP pushed a commit that referenced this issue May 20, 2019
…to feature--#349-list-countries

# Conflicts:
#	openrouteservice/src/main/java/heigit/ors/routing/graphhopper/extensions/storages/builders/BordersGraphStorageBuilder.java
MichaelsJP pushed a commit that referenced this issue May 20, 2019
MichaelsJP pushed a commit that referenced this issue May 20, 2019
MichaelsJP pushed a commit that referenced this issue May 20, 2019
MichaelsJP pushed a commit that referenced this issue May 20, 2019
@rabidllama
Copy link
Contributor

Added in Release 5.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants