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

Support for Nominatim lookup endpoint #1668

Open
kalsan opened this issue Nov 12, 2024 · 4 comments
Open

Support for Nominatim lookup endpoint #1668

kalsan opened this issue Nov 12, 2024 · 4 comments

Comments

@kalsan
Copy link

kalsan commented Nov 12, 2024

Thank you very much for providing this aweseome gem!

If I saw correctly, all Nominatim lookups go to the /search endpoint. While this covers most use cases, some are missing, such as looking up an osm_id, which is done through the /lookup endpoint. For example:

curl 'http://localhost:8080/lookup?osm_ids=R1702265&format=jsonv2&addressdetails=1'
[{"place_id":104828,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"relation","osm_id":1702265,"boundingbox":["47.3991502","47.4171175","8.5260623","8.5587967"],"lat":"47.4104211","lon":"8.5445851","display_name":"Oerlikon, Kreis 11, Zürich, Bezirk Zürich, Zürich, Schweiz/Suisse/Svizzera/Svizra","place_rank":20,"category":"boundary","type":"administrative","importance":0.14667666666666662,"address":{"suburb":"Oerlikon","city":"Zürich","county":"Bezirk Zürich","state":"Zürich","ISO3166-2-lvl4":"CH-ZH","country":"Schweiz/Suisse/Svizzera/Svizra","country_code":"ch"}}]

Would you be interested in supporting the lookup endpoint as well?

Best,
Kalsan

@alexreisner
Copy link
Owner

Yes you are correct, and yes I'm interested in adding support for OSM ID lookups. Thanks for noting this. It could be implemented similar to how some lookups detect a forward or reverse geocoding query and adjust the URL, using a base_query_url method. See the Here lookup, for example.

@kalsan
Copy link
Author

kalsan commented Nov 12, 2024

Thank you for your quick answer! Do you require assistance with this? I might be able to help next year, given that I'll have more time then than I do have now.

@alexreisner
Copy link
Owner

Yes, definitely open to a pull request. No rush.

@kalsan
Copy link
Author

kalsan commented Nov 12, 2024

Thank you :-) will contact you somewhere in winter/spring 2025 hopefully!

Have a nice day!

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

No branches or pull requests

2 participants