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

Introduce RangeFilter and the corresponding operator "<=x<=" #275

Merged
merged 3 commits into from
Sep 27, 2021

Conversation

KaiVolland
Copy link
Contributor

@KaiVolland KaiVolland commented Sep 27, 2021

This adds support for a between filter range filter which allows to check if a numeric property value is between to other values (within a range). e.g.:

// Filter all cities with a population between 5.000 and 25.000:
const filter = ['<=x<=', 'population', 5000, 25000];

targets geostyler/geostyler#87

It also fixes the samples.

@chrismayer
Copy link
Contributor

Just for general interest: Should something like '<=x<' et al also be introduced?

@KaiVolland
Copy link
Contributor Author

KaiVolland commented Sep 27, 2021

Just for general interest: Should something like '<=x<' et al also be introduced?

@chrismayer
Good question. Actually i don't think we should make this to complex. But maybe it would be better to make the range values inclusive. I think SLD handles it like that …
But id like to have a nicer operator then '<=x<=' 🤔

@KaiVolland
Copy link
Contributor Author

Just for general interest: Should something like '<=x<' et al also be introduced?

@chrismayer
Good question. Actually i don't think we should make this to complex. But maybe it would be better to make the range values inclusive. I think SLD handles it like that …
But id like to have a nicer operator then '<=x<='

The mathematical correct symbol for ranges are brackets, which will completly conflict with the filter syntax. And as the geostyler-style won't be written by hand in most cases the '<=x<=' should be ok for now.

@KaiVolland KaiVolland changed the title Introduce BetweenFilter and the corresponding operator "<x<" Introduce RangeFilter and the corresponding operator "<=x<=" Sep 27, 2021
@KaiVolland KaiVolland merged commit c5e0ad6 into geostyler:master Sep 27, 2021
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