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: Query wizard like overpass searches #715

Merged
merged 6 commits into from
Oct 30, 2024
Merged

Conversation

Dlurak
Copy link
Collaborator

@Dlurak Dlurak commented Oct 29, 2024

Description

In #708 @govvin asked this:

How do I combine this, for example: historic=* and tourism=* to find any feature having both tags?

About the overpass search option.

This lead to the idea of a overpass turbo query wizard like search.
This pull request introduces a limited version of that. Currently it only supports these:

  • and to combine multiple things
  • or to combine multiple things
  • key=value for the actual key comparison, it is build in a way that other operators like != are relatively easy to add
  • () to group things combined via and/or

Example searches

(amenity=cafe or amenity=restaurant) and internet_access=yes
museum=art and fee=no
amenity=restaurant and diet:vegetarian=yes

ToDo

  • Better Labels
  • Let the tokenizer throw when there is an unexpected charachter
  • Allow for a * token to match anything
  • Add tests

Copy link

vercel bot commented Oct 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
osmapp ✅ Ready (Inspect) Visit Preview Oct 29, 2024 9:54pm

@Dlurak Dlurak marked this pull request as ready for review October 29, 2024 21:52
@Dlurak
Copy link
Collaborator Author

Dlurak commented Oct 29, 2024

This now has all features I imagined for the beginning, @govvin, as you were also interested in the search it would be nice when you can also try it out here and drop your opinion on it :)

@govvin
Copy link

govvin commented Oct 30, 2024

Thank you @Dlurak for making quick work on this! 😍

At higher zoom levels, it's difficult to to see the displayed results. I suppose this isn't directly related to this new feature, but more on how results are displayed on screen.

image

Perhaps, at higher zoom levels, the centroids of the features can be displayed as pins (or cluster of pins), and when zoomed in, it can be displayed as what the feature is.

I recall there's an option to return just centroids from Overpass, but maybe not always desirable when polygons are expected.

@jvaclavik
Copy link
Collaborator

jvaclavik commented Oct 30, 2024

Wooow! Well done. 👏
I love it @Dlurak

@Dlurak Dlurak merged commit 410cb71 into zbycz:master Oct 30, 2024
2 checks passed
@Dlurak
Copy link
Collaborator Author

Dlurak commented Oct 30, 2024

Perhaps, at higher zoom levels, the centroids of the features can be displayed as pins (or cluster of pins), and when zoomed in, it can be displayed as what the feature is.

That's exactly what the issue #710 is about

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

Successfully merging this pull request may close these issues.

3 participants