komoot / photon

an open source geocoder for openstreetmap data
Apache License 2.0
1.83k stars 278 forks source link

Reverse search could support osm tag filters #703

Closed karussell closed 11 months ago

karussell commented 1 year ago

Would be nice if osm tag filters are supported for reverse search too: https://photon.komoot.io/reverse/?lat=46.99483&lon=9.075354&osm_tag=amenity:pharmacy

lonvia commented 1 year ago

That wouldn't be a reverse search anymore unless you are looking for a function "get me where I'm but only return a result if I happen to be in a pharmacy'. I suspect you are looking for a function "get me all pharmacies close to this location"?

karussell commented 1 year ago

I suspect you are looking for a function "get me all pharmacies close to this location"?

Yes

mtmail commented 1 year ago

@kw005 That has nothing to do with the issue "Reverse search could support osm tag filters". Open a new issue, or better discussion if you're reporting a different use case.

kw005 commented 1 year ago

@mtmail : Yeah, I saw that. Just deleted it ;)

lonvia commented 1 year ago

In theory we have the query_string_filter parameter for reverse which got sneaked in in #254. It should be able to do arbitrary filtering including the one you want. However, this was never documented and I very much prefer to let it die quietly and implement the tag filters from search instead.

I also wasn't aware that reverse already has a limit parameter. Together with the limit parameter, the filters make perfect sense.

ybert commented 12 months ago

I think this feature is very helpfull. My use case is : "based on latitude and longitude provided by the user I want to return the city of the point".

For example if I try https://photon.komoot.io/reverse?lat=45.731790000&lon=6.032480000&limit=1 I get a result without city and state. But if I run https://photon.komoot.io/reverse?lat=45.731790000&lon=6.032480000&limit=1&query_string_filter=osm_key:place I get these informations.

Any other way to always have city and state ?

lonvia commented 11 months ago

Implemented in #742.