mocnik-science / osm-python-tools

A library to access OpenStreetMap related services
GNU General Public License v3.0
441 stars 48 forks source link

Find Nominatim by way, relaiton id #40

Closed Medniy2000 closed 3 years ago

Medniy2000 commented 3 years ago

Hello, dear authors! Is it possible to get Nominatim by id? Like here https://nominatim.org/release-docs/latest/api/Lookup/ https://nominatim.openstreetmap.org/lookup?osm_ids=R11920243&format=json Сan you write an example? Thanks!

Medniy2000 commented 3 years ago

I see that is does not provided...(( Can someone change Nominatim? To something like.. image

mocnik-science commented 3 years ago

Dear @Medniy2000,

Thanks, this is a good idea. Please find the updated documentation here: https://github.com/mocnik-science/osm-python-tools/blob/master/docs/nominatim.md#lookup

In addition to what you have proposed, I have made the input to allow for more generic formats. You can insert 'node/42467507', 'node 42467507', 'n42467507', or 'N42467507' – they all result in the same query.

I hope that this solution is what you were looking for. If not, let me know.

Best!