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

Add support for additional operators for Overpass Wizard-like queries #849

Open
govvin opened this issue Dec 22, 2024 · 3 comments
Open

Comments

@govvin
Copy link

govvin commented Dec 22, 2024

Currently, this doesn't work in the Omnibox: op: historic=* and tourism=* and tourism!=hotel in "Dumaguete City" , which could've return results for tourism-related features in Dumaguete, excluding hotels.

Of course, one may opt to first move the bbox to Dumaguete and run the same query, but the "not equal" to operators are not yet supported.

  • != or <> are not currently supported
  • the "in ", when added to an Overpass Query, specifies a request to return results from said location.

Probably this query is not something casual users may use often, but supporting "in" is close to the search experience some users may be familiar when using Google, or Bing. See screenshots below.

On the other hand, maybe "attractions" as a preset is nice to have, since we use a variety of tags for this type of POIs in OSM, and could make it more convenient for users to look for this type of information.

image
Google: "tourism in Dumaguete City"


image
Bing: "tourism in Dumaguete City"

@Dlurak
Copy link
Collaborator

Dlurak commented Dec 22, 2024

Good ideas, I've just implemented the !=.
Do you mean number comparisons by < and >? So something like height > 50?
Overpass itself sadly doesn't offer such an operator directly and we would need to do it with regex.

The geographic limiter (in Dumaguette City) as it is offered by overpass turbo and the real query-wizard, also isn't directly a feature of the overpass api itself, we would need to use a geocoder to get the osm id of the object. For the normal search we use photon but I would suggest to use nominatim for this scenario.

What do you think?
@zbycz how about using nominatim(usage policy)?

@govvin
Copy link
Author

govvin commented Dec 26, 2024

Thank you for the quick fix!

While I don't have any practical use for < or > for now, I wouldn't mind being able to find, say ["tourism"~"musem|gallery|artwork|attraction|information"].

On the other hand, majority of users probably won't know how do that, so I like how the FacilMap UI makes this convenient for their users:
image

A custom query button is available for more advanced users, familiar with Overpass.

@zbycz
Copy link
Owner

zbycz commented Dec 26, 2024

@Dlurak - using nominatim is OK. We used it in past for our main search, but it is not allowed to use it for autocomplete – #55. Without autocomplete, go ahead :)

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