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

Describe labeling placement rules #9484

Merged
merged 3 commits into from
Dec 21, 2024
Merged

Conversation

DelazJ
Copy link
Collaborator

@DelazJ DelazJ commented Dec 16, 2024

Fixes #9244

Goal:

Ticket(s): #

  • Backport to LTR documentation is requested

@DelazJ DelazJ added Labels Layer labels properties Properties backport release_3.40 On merge create a backported pull request to 3.40 labels Dec 16, 2024
* :guilabel:`Push labels away from features`:
prevents labels being placed too close to features from a different layer.
The minimum distance can be set in the unit of your choice,
as well as the rule's priority.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyalldawson I couldn't find what the rule priority is supposed to do here. Any help? Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DelazJ it's the same as https://docs.qgis.org/3.34/en/docs/user_manual/style_library/label_settings.html#priority -- in the situation where labeling conflicts arise, it's used to determine which label "wins" and gets its ideal placement.

So here a low priority would mean "try to do this, but compromise if other more important rules need to be respected", and a high priority would be "this rule is more important, compromise elsewhere if needed"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, Thanks. I thought it was something between the rules themselves.
Then why is this rule the only one with that setting? Someone may want "Prevent labels overlapping features" more than anything else. And afaics this isn't possible unless they use the "priority" setting in the target layer "Placement" tab. And if that works, can't we do the same for the layer we want to keep their labels away from others, i.e. simply adjust the priority in the layer placement tab? Why a specific slider?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why is this rule the only one with that setting?

It was only in scope of works for that rule, and would have required a lot of development for it to work with the others.

@DelazJ DelazJ merged commit b4eefd9 into qgis:master Dec 21, 2024
3 checks passed
@DelazJ DelazJ deleted the labelPlacementRules branch December 21, 2024 22:56
DelazJ added a commit that referenced this pull request Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_3.40 On merge create a backported pull request to 3.40 Labels Layer labels properties Properties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implementation of labeling engine rules (Request in QGIS)
2 participants