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

possibly nicer pmtiles filter syntax? #13

Open
cboettig opened this issue Jan 4, 2025 · 0 comments
Open

possibly nicer pmtiles filter syntax? #13

cboettig opened this issue Jan 4, 2025 · 0 comments

Comments

@cboettig
Copy link
Member

cboettig commented Jan 4, 2025

Really minor thing, but we have been using this syntax for filtering the pmtiles in maplibre

["all", ["match", ["get", column], values, TRUE, FALSE]]

I believe this syntax is equivalent but a bit easier to read and possibly a bit faster to evaluate:

["in", ["get", column], ["literal", values]]

Note the use of ["literal", values] tells maplibre that values is vector (array)-valued without confusing the engine (since it is also using arrays of strings to build these function arguments!)

of course ideally our python (or R) wrappers would handle this stuff for us :-).

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

1 participant