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

search with viewbox bounded only #1311

Closed
Arnaud49 opened this issue Feb 21, 2019 · 4 comments
Closed

search with viewbox bounded only #1311

Arnaud49 opened this issue Feb 21, 2019 · 4 comments

Comments

@Arnaud49
Copy link

Hello !

I can't figure how to do a search only on a bounded viewbox ? without any query ?
I want all establishment in this area.

How can I do ?

https://nominatim.openstreetmap.org/search?format=json&limit=20&viewbox=2.393867340087891,48.84358571785511,2.3904705047607426,48.84472294197522&bounded=1&q=

I know there is something :
https://nominatim.openstreetmap.org/search?format=json&limit=20&viewbox=2.393867340087891,48.84358571785511,2.3904705047607426,48.84472294197522&bounded=1&q=[restaurant]

@mtmail
Copy link
Collaborator

mtmail commented Feb 21, 2019

I want all establishment in this area.

Nominatim requires a query (place name or address).

You can use https://wiki.openstreetmap.org/wiki/Overpass_API for a list of all map features in an area. Though even there you probably want to filter a bit, otherwise you end up with every tree, lamp post and traffic light.

@Arnaud49
Copy link
Author

Thank you but i'm using my own nominatim database. How can I filter to retrieve only place, establishment, etc ... ? I don't want the tree or anything useless for me :p

@Arnaud49
Copy link
Author

I can retrieve results if I specified amenity=restaurant for exemple :
https://nominatim.openstreetmap.org/search?format=json&limit=20&viewbox=2.3295736312866215,48.87467945221622,2.368454933166504,48.8547480868576&bounded=1&amenity=restaurant

but I want all amenity, and I can't do amenity=all

@lonvia
Copy link
Member

lonvia commented Feb 22, 2019

As @mtmail said, you are using the wrong tool. Nominatim is not designed for this kind of job. It is a search engine. Overpass is what you are looking for.

@lonvia lonvia closed this as completed Feb 22, 2019
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

3 participants