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

Possible to filter result types #119

Closed
amnesia7 opened this issue Oct 15, 2014 · 7 comments
Closed

Possible to filter result types #119

amnesia7 opened this issue Oct 15, 2014 · 7 comments

Comments

@amnesia7
Copy link
Contributor

Is it possible (or could it be possible) to include a list of types to the search api so that it only returns establishments and addresses (as an example) since at the moment it brings back everything (including post boxes and tram stops for example)?

@christophlingg
Copy link
Member

yes that's possible and on our todo list. however not high priority at the moment. but do we really index post boxes? can you give an example url, this would be a bug then.

@amnesia7
Copy link
Contributor Author

Ok, feel free to close this issue if it's already on your todo list.
I think I was probably mistaken about the post box because I can't find it so you can ignore that.
Thanks

@christophlingg
Copy link
Member

duplicate of #68

@amnesia7
Copy link
Contributor Author

@christophlingg sorry to comment on a closed issue but wasn't sure it was worth re-opening it.
I don't think it was a post box that I found that time, I think it was a bus stop that I wasn't sure should be listed or not:
http://photon.komoot.de/api/?q=London%20Eye,%20Belvedere%20Road,%20London,%20United%20Kingdom&limit=5

@christophlingg
Copy link
Member

our index contains basically everything that can be found in nominatim. searching for bus stops is a reasonable use case for me. would you expect something different?

@sdole
Copy link
Contributor

sdole commented Mar 23, 2015

@amnesia7 have you tried the tag filters? https://github.com/komoot/photon/blob/master/README.md#filter-results-bhy-tags-and-values
If you want specific items that you know osm tags for, you could search for just those. If you know specific tags, you wanted to exclude, you could exclude.

For the query you posted, you could modify like this to exclude bus stops:
http://photon.komoot.de/api/?q=London%20Eye,%20Belvedere%20Road,%20London,%20United%20Kingdom&limit=5&osm_tag=:!bus_stop

Does this help?

@amnesia7
Copy link
Contributor Author

@christophlingg yes, I can understand there may be a need to be able to search for so that's not an issue for me. I was just caught out by it when I couldn't find bus stops in the openstreetmap tags list but I've just had another look and realised that it is actually the value for the highway key rather than a key in its own right.
Thank you both.
@sdole I've just had a look at the query excluding the bus stops and its fine but I'm surprised it has London Road in Worcester higher up than several for Belvedere Road London.

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