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

Merge connected lines and Line orentation dependant position error #28628

Closed
qgib opened this issue Dec 14, 2018 · 3 comments
Closed

Merge connected lines and Line orentation dependant position error #28628

qgib opened this issue Dec 14, 2018 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers Labeling Related to QGIS map labeling

Comments

@qgib
Copy link
Contributor

qgib commented Dec 14, 2018

Author Name: Phillip Shelton (Phillip Shelton)
Original Redmine Issue: 20809
Affected QGIS version: 3.4.2
Redmine category:labelling


Hi,

I model road traffic and I have found the Line orientation dependant position under Placement under labels, to be a very useful feature.
It allows me to present the direcitonal traffic volumes on the same side of the line object as they occur on the roads I am modelling.

I am also a fan of the Merge connected lines to avoid duplicate labels as it reduces the number of labels and can reduce "clutter" when producing maps.

However, when used together, they sometimes get it wrong. The Merge connected lines to avoid duplicate labels can cause the line orientation dependant position to get it wrong.

I am using a spatialite layer. it also happens for the mapinfo export of the same layer. It seems to get the same links wrong every time for a given QGIS version but possably a different link in different versions (V3.0.0, V3.2.3, V3.4.1 and V3.5.0)

The attribute I have used for the figures is ass_volume, but it happens for any of the attributes. Different attributes seem to have different chances of getting it wrong.

Thank you for looking into this.


@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Labeling Related to QGIS map labeling labels May 25, 2019
@nyalldawson
Copy link
Collaborator

I investigated this, but am having trouble seeing the issue. In my tests it all looks ok, and I can't reproduce using your dataset. Please retest on master.

@nyalldawson nyalldawson added the Feedback Waiting on the submitter for answers label May 30, 2019
@gioman
Copy link
Contributor

gioman commented Dec 21, 2019

Closing for lack of feedback.

@gioman gioman closed this as completed Dec 21, 2019
@pjshelton
Copy link

Hi, sorry for being silent for so long.
labeltest.zip

attached is a smaller project that shows what I was trying to show you.

The problem is that the merge algorithm is too aggressive for my use case.

Features (fid in 3,8,20,22) all get labeled with the value 85 when the labeling value is (round(Ass_Volume/5, 0)*5). Then the merge connected algorithm merges all of them. And tends to put the 85 on feature with fid=8.

This still happens with 3.15.0_Master, Code revision 3af038f.

However, in my head, the feature with fid=8 is not part of the set, and should be labelled separately because it is for the other side of the road. even though it has the same value for its label as the other three features.

Is there anyway to add knowledge about which side of the line a label is expected to be placed (when the line dependent checkbox has also been ticked) to the merge connected algorithm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers Labeling Related to QGIS map labeling
Projects
None yet
Development

No branches or pull requests

4 participants