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

[expression] Add @map_z_range_{lower,upper} pair of variables reflecting the map's z range values #56679

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

nirvn
Copy link
Contributor

@nirvn nirvn commented Mar 4, 2024

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.

@github-actions github-actions bot added this to the 3.38.0 milestone Mar 4, 2024
Copy link
Collaborator

@nyalldawson nyalldawson left a 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

@nirvn nirvn added the Feature label Mar 4, 2024
@nirvn nirvn enabled auto-merge (rebase) March 4, 2024 04:21
Copy link

github-actions bot commented Mar 4, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 489306e)

@nirvn nirvn force-pushed the mapsettings_zrange_context branch from 05638c4 to 489306e Compare March 4, 2024 04:56
@nirvn nirvn merged commit 41368b2 into qgis:master Mar 4, 2024
29 checks passed
Comment on lines 528 to 529
// IMPORTANT: ANY CHANGES HERE ALSO NEED TO BE MADE TO QgsLayoutItemMap::createExpressionContext()
// (rationale is described in QgsLayoutItemMap::createExpressionContext() )
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@zacharlie zacharlie added the Changelog Items that are queued to appear in the visual changelog - remove after harvesting label Jun 18, 2024
@qgis-bot
Copy link
Collaborator

@nirvn

This pull request has been tagged for the changelog.

  • The description will be harvested so please provide a "nearly-ready" text for the final changelog
  • If possible, add a nice illustration of the feature. Only the first one in the description will be harvested (GIF accepted as well)
  • If you can, it's better to give credits to your sponsor, see below for different formats.

You can edit the description.

Format available for credits
  • Funded by NAME
  • Funded by URL
  • Funded by NAME URL
  • Sponsored by NAME
  • Sponsored by URL
  • Sponsored by NAME URL

Thank you!

@zacharlie zacharlie added ChangelogHarvested This PR description has been harvested in the Changelog already. and removed Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChangelogHarvested This PR description has been harvested in the Changelog already. Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants