-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[expression] Add @map_z_range_{lower,upper} pair of variables reflecting the map's z range values #56679
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only other consideration is whether we'd also want something like "@map_z_range_includes_lower" to also expose this
…ing the map's z range values
05638c4
to
489306e
Compare
// IMPORTANT: ANY CHANGES HERE ALSO NEED TO BE MADE TO QgsLayoutItemMap::createExpressionContext() | ||
// (rationale is described in QgsLayoutItemMap::createExpressionContext() ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nirvn should then not be some changes in QgsLayoutItemMap::createExpressionContext()
also? Or this block should have been moved instead of copied?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DelazJ , that was taken care of by @nyalldawson in a different PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. Great! Sorry for the noise.
This pull request has been tagged for the changelog.
You can edit the description. Format available for credits
Thank you! |
Description
@nyalldawson , your work massively improving Z range filtering support is inspiring 😉 this PR adds a pair of @map_z_range_{lower,upper} variables to reflect the map canvas' z range value, which allows us to do stuff like:
Screencast.from.2024-03-04.11-59-13.webm
It is not a substitute to proper Z range filtering of vector layers (lacks a dedicated UI, optimizations, etc.) but it does allow us to do some interesting experiments using rule-based rendering using pre-existing z(geom) z_min(geom) and z_max(geom) functions.