-
Notifications
You must be signed in to change notification settings - Fork 388
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
Use standardized official country codes #195
Comments
Afaik there is a reason why we use our own, @rabidllama can you elaborate? |
the main reason was to do with storage space on the graph. It shouldn't be a big thing to change to use country codes, but it would increase the storage (currently it uses I believe 6 bytes, and using a two character country code to store would be 12 bytes per edge). Generally I think that the storage is much more optimised for numerics as then you can do bit shifting to shorten the amount of space needed (which currently hasn't been implemented). The numbers used are a bit arbitary and so yes, country codes would make it easier to understand and identify, but we need to consider whether we store the country codes on the graph itself or if we have a hybrid solution where the codes are mapped to numerical values. |
Thanks for explaining, considering this closed, we have plenty of other things to dig into |
I am reopening this now as we have resources to look into it. @takb the api should still work with numbers when finished, but also allow the country codes. |
That's awesome news, thanks @takb for picking up on this! Are you going to implement ISO 3166-1 alpha-2 country codes, or some other standard? |
I was thinking alpha-2 and maybe alpha-3 additionally |
+1 for both |
The code changes won't break anything, but also won't work until you also load the updated CSV file from the gitlab repo openrouteservice-infrastructure/core-deployment. The updated CSV file won't work unless PR 390 is pulled. |
Will close this when it is put into the master branch |
It would streamline certain workflows if the APIs could be queried using standardized country codes, such as ISO 3166-1 alpha-2 instead of the ORS-specific(?) numeric ids listed in https://github.com/GIScience/openrouteservice-docs#country-list.
This doesn't need to be a breaking change because ISO_3166-1 codes can be easily distinguished from the current numeric ids, so the API could allow either.
Note that ISO 3166-1 country codes are already used by Pelias gecoder.
The text was updated successfully, but these errors were encountered: