3

I have a layer (streets) where I want to remove duplicate labels and then set a display interval for the labels. This is relatively easy in ArcMap because removing duplicates is based on the label text, not the geometry. I set the remove duplicates radius to the same same label repeat distance (although in most cases I could get away with omitting the repeat distance) and I'm good to go. In QGIS it's not so easy.

I am using QGIS3 and labeling major highways for my region. Assume a roughly rectangular region slightly higher than wide, with major north-south and east-west arteries bisecting at roughly the centroid of the region. I have tried every combination of settings I can come up with and the best I get is the label for the east-west artery displaying twice west of center (with less than 4" between the labels) and once east of center, and the north-west artery is labeled twice south of center (with less than 4" between the labels) and there are no labels at all north of center. (My Composer layout is 36" wide x 42" high, with the region filling most of that area).

My setting for label Placement is to set Repeat to 4" and for label Rendering I have checked Merge connected lines to avoid duplicate labels.

I found this solution (Removing duplicate point labels in QGIS) but it is for an earlier version of QGIS which uses Python 2.7. If possible I would prefer a solution through the interface but I'm not averse to using a little Python, but not being conversant with QGIS3's Python object model I'd be spending an inordinate amount of time with this; I've already spent a lot of time trying to make these labels work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.