-
Notifications
You must be signed in to change notification settings - Fork 523
In Nominatim provider, use city, then town, then village, then hamlet #773
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
Conversation
Nyholm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good. I like it.
|
Just to extend the hierarchy, the locality can be returned as |
|
@SrihariThalla Do you have an example of a Nominatim URL returning an |
|
Here are the links, @SebastienTainon :
The preferred order would be like you said:
|
|
@SrihariThalla I've updated the PR with tht modifications you are suggesting. Could you check that it's ok for you? 😄 |
Nyholm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you both.
Im just waiting for confirmation from @SrihariThalla and I'll be happy to merge this
|
@SebastienTainon could you rebase on master so I can merge? |
fb30d5d to
8d89bb3
Compare
|
I've rebased and squashed @Nyholm :) |
|
Can you also fix (the new) style CI stuff? |
8d89bb3 to
775a114
Compare
|
It was related to #789 but no problem, I've fixed it too ;) |
|
Sorry, I lost track of this :-/ All Nominatim changes look good 👍 |
Nyholm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent. Thank you!
When using Nominatim provider, the API can return several kinds of responses for "city" for the same kind of query.
For example:
75004, France
https://nominatim.openstreetmap.org/search?q=75004,France&format=xml&addressdetails=1&limit=5
=> we receive the city in a "city" field
98000, Monaco
https://nominatim.openstreetmap.org/search?q=98000%2C+Monaco&format=xml&addressdetails=1&limit=5
=> we receive the city field in a "town" field
Here is the wiki for Nominatim structure: http://wiki.openstreetmap.org/wiki/Nominatim
My proposition is that if the "city" field is absent from the response, we use the "town" field instead to define the city of the response.