[prev in list] [next in list] [prev in thread] [next in thread]
List: qgis-user
Subject: Re: [Qgis-user] problem with cartographic label placement
From: Andrew Harfoot via QGIS-User <qgis-user () lists ! osgeo ! org>
Date: 2023-01-23 11:31:26
Message-ID: d6eee2a2-a45d-8552-4a3a-9efdf19bd5c0 () geodata ! soton ! ac ! uk
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi Uwe,
I've not attempted to deal with this issue before, but it occurred to me
that you might be able to use two labelled layers (duplicates) one
locked to each position, using the labelling priority weighting to apply
the ranking. the only issue is that in sparse data areas both labels
might be drawn, so you may need to ensure that there is sufficient
overlap between the two positions to prevent this.
Cheers,
Andy
On 19/01/2023 13:14, Uwe via QGIS-User wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
>
> Hello Andreas and list,
>
> I am sure I'm not the first one to encounter the problem described
> below. So I would like to ask again. Maybe someone has an idea?
>
> thanks a lot, the solution from Andreas is working.
>
> But the result is not as desired. I was hoping to be able to define a
> ranking of placement alternatives. That is (in case of ‘B,R‘): place
> all the labels at the bottom and only if there is a conflict (overlap)
> with something else place a label at right.
>
> But what I get is: most oft he labels are placed right, even without
> overlap problems (although I put ‘R‘ at the second place of the list).
> And only a few labels are placed at bottom.
>
> However, the overlap problem is solved.
>
> Is there something I could improve?
>
> Thank you and best regards, Uwe
>
> *Von:* Andreas Neumann <andreas@qgis.org>
> *Gesendet:* Donnerstag, 12. Januar 2023 22:18
> *An:* gisfisch@t-online.de
> *Cc:* qgis-user <qgis-user@lists.osgeo.org>
> *Betreff:* Re: [Qgis-user] problem with cartographic label placement
>
> Hi Uwe,
>
> I just tried it. 'B,BR' worked for me. Just don't use quotes before
> and after the separator.
>
> Greetings,
>
> Andreas
>
> On Thu, 12 Jan 2023 at 22:02, Uwe via QGIS-User
> <qgis-user@lists.osgeo.org> wrote:
>
> Hello list,
>
> for cartographic label placement, according to the help docs it
> should be possible to define position priorities in a ranking.
>
> But when I open the editor and enter a comma separated list like:
>
> ‘B‘ , ‘BR‘
>
> I get an error message. Entering just one value it works. But that
> doesn't make sense because I need at least two values to let the
> label move when it collides with a feature.
>
> What can be wrong with my input? I use 3.28.
>
> Thanks a lot for help.
>
> Uwe
>
> _______________________________________________
> QGIS-User mailing list
> QGIS-User@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2 \
> Fmailman%2Flistinfo%2Fqgis-user&data=05%7C01%7Cajph%40geodata.soton.ac.uk%7C7525097e \
> 62754e2b0c9808dafa1f1616%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C63809730867090 \
> 5094%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJ \
> XVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=f91qzwHtiXrG4jyidtaQkfeK1kD1MKNpZH8SSxZ9ZT8%3D&reserved=0>
>
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2 \
> Fmailman%2Flistinfo%2Fqgis-user&data=05%7C01%7Cajph%40geodata.soton.ac.uk%7C7525097e \
> 62754e2b0c9808dafa1f1616%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C63809730867091 \
> 5048%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJ \
> XVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Wu6%2Fh%2F3mcCLNt4fgXGfqA8uFzAObeRfK%2BR%2FFHldwr3s%3D&reserved=0>
>
>
>
> --
>
>
> --
> Andreas Neumann
>
> QGIS.ORG
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fqgis.org%2F&data=0 \
> 5%7C01%7Cajph%40geodata.soton.ac.uk%7C7525097e62754e2b0c9808dafa1f1616%7C4a5378f929f \
> 44d3ebe89669d03ada9d8%7C0%7C0%7C638097308670925016%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiM \
> C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FDpGBxJCZtkl2dRxkIhEONOvbZDbW5EsbrQf%2B9AZAvM%3D&reserved=0> \
> board member (treasurer)
>
>
> _______________________________________________
> QGIS-User mailing list
> QGIS-User@lists.osgeo.org
> List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user
--
Andy Harfoot
Skype: gdi_ajph
Teams:ajph@soton.ac.uk
GeoData Institute
University of Southampton
Southampton
SO17 1BJ
www.geodata.soton.ac.uk
[Attachment #5 (text/html)]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="moz-cite-prefix">Hi Uwe,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I've not attempted to deal with this
issue before, but it occurred to me that you might be able to use
two labelled layers (duplicates) one locked to each position,
using the labelling priority weighting to apply the ranking. the
only issue is that in sparse data areas both labels might be
drawn, so you may need to ensure that there is sufficient overlap
between the two positions to prevent this.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Cheers,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Andy<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 19/01/2023 13:14, Uwe via QGIS-User
wrote:<br>
</div>
<blockquote type="cite" cite="mid:001901d92c07$e820b0b0$b8621210$@t-online.de">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
{font-family:"Palatino Linotype";
panose-1:2 4 5 2 5 5 5 3 3 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}span.E-MailFormatvorlage18
{mso-style-type:personal-reply;
font-family:"Palatino Linotype",serif;
color:#1F497D;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div style="padding-bottom: 10px; padding-top: 5px;">
<div style="padding:12px; border:1px solid #8D3970;
background-color:#F7F9FA; color:#8D3970; font-size:14px;
line-height:22px; font-family: Calibri, Arial, Helvetica,
sans-serif;">
<strong>CAUTION:</strong> This e-mail originated outside the
University of Southampton.
</div>
</div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US">Hello
Andreas and list,<o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US">I
am sure I'm not the first one to encounter the problem
described below. So I would like to ask again. Maybe
someone has an idea?<o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US">thanks
a lot, the solution from Andreas is working.<o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US">But
the result is not as desired. I was hoping to be able to
define a ranking of placement alternatives. That is (in
case of ‘B,R‘): place all the labels at the bottom and
only if there is a conflict (overlap) with something else
place a label at right.<o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US">But
what I get is: most oft he labels are placed right, even
without overlap problems (although I put ‘R‘ at the second
place of the list). And only a few labels are placed at
bottom. <o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US">However,
the overlap problem is solved.<o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US">Is
there something I could improve?<o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US">Thank
you and best regards, Uwe<o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:12.0pt;font-family:"Palatino
Linotype",serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Von:</b> Andreas Neumann
<a class="moz-txt-link-rfc2396E" \
href="mailto:andreas@qgis.org"><andreas@qgis.org></a> <br> <b>Gesendet:</b> \
Donnerstag, 12. Januar 2023 22:18<br>
<b>An:</b> <a class="moz-txt-link-abbreviated" \
href="mailto:gisfisch@t-online.de">gisfisch@t-online.de</a><br>
<b>Cc:</b> qgis-user <a class="moz-txt-link-rfc2396E" \
href="mailto:qgis-user@lists.osgeo.org"><qgis-user@lists.osgeo.org></a><br> \
<b>Betreff:</b> Re: [Qgis-user] problem with cartographic label \
placement<o:p></o:p></p> </div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi Uwe,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I just tried it. 'B,BR' worked for
me. Just don't use quotes before and after the
separator.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Greetings,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Andreas<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, 12 Jan 2023 at 22:02, Uwe via
QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org" \
moz-do-not-send="true" \
class="moz-txt-link-freetext">qgis-user@lists.osgeo.org</a>> \
wrote:<o:p></o:p></p> </div>
<blockquote style="border:none;border-left:solid #CCCCCC
1.0pt;padding:0cm 0cm 0cm
6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino Linotype",serif">Hello \
list,</span><o:p></o:p></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino \
Linotype",serif"> </span><o:p></o:p></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino Linotype",serif">for \
cartographic label placement, according to the help docs it should be possible to \
define
position priorities in a ranking.</span><o:p></o:p></p>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino Linotype",serif">But when I \
open the editor and enter a comma separated list like:</span><o:p></o:p></p>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino \
Linotype",serif"> </span><o:p></o:p></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino Linotype",serif">‘B‘ , \
‘BR‘</span><o:p></o:p></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino \
Linotype",serif"> </span><o:p></o:p></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino Linotype",serif">I get an \
error message. Entering just one value it works. But that doesn't make sense because \
I need at least two values to let the label move
when it collides with a feature.</span><o:p></o:p></p>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino \
Linotype",serif">What
can be wrong with my input? I use 3.28.</span><o:p></o:p></p>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino \
Linotype",serif"> </span><o:p></o:p></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino Linotype",serif">Thanks a \
lot for help.</span><o:p></o:p></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino \
Linotype",serif"> </span><o:p></o:p></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span \
style="font-size:12.0pt;font-family:"Palatino \
Linotype",serif">Uwe</span><o:p></o:p></p> </div>
</div>
<p class="MsoNormal">_______________________________________________<br>
QGIS-User mailing list<br>
<a href="mailto:QGIS-User@lists.osgeo.org" target="_blank" \
moz-do-not-send="true" \
class="moz-txt-link-freetext">QGIS-User@lists.osgeo.org</a><br> List info: <a \
href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.or \
g%2Fmailman%2Flistinfo%2Fqgis-user&data=05%7C01%7Cajph%40geodata.soton.ac.uk%7C752 \
5097e62754e2b0c9808dafa1f1616%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C63809730867 \
0905094%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLC \
JXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=f91qzwHtiXrG4jyidtaQkfeK1kD1MKNpZH8SSxZ9ZT8%3D&reserved=0" \
originalsrc="https://lists.osgeo.org/mailman/listinfo/qgis-user" \
shash="duvnEZSLpngw7g2dv/oNZ7+K063GncaUS5RpAH8u7U+AgU9qna7m+DgJ4pI8uqlg6L9+jmv8f/pX/Wp \
uBHkko8nOYcZ6GewEISFzNNm+YrBhxZ5DHMeApUkRJ4d6QAD8ne52W9ihrCL5cEkibLGdNcDxIaGcSaNx8zOkABEtVo4=" \
target="_blank" moz-do-not-send="true">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a \
href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.or \
g%2Fmailman%2Flistinfo%2Fqgis-user&data=05%7C01%7Cajph%40geodata.soton.ac.uk%7C752 \
5097e62754e2b0c9808dafa1f1616%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C63809730867 \
0915048%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLC \
JXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Wu6%2Fh%2F3mcCLNt4fgXGfqA8uFzAObeRfK%2BR%2FFHldwr3s%3D&reserved=0" \
originalsrc="https://lists.osgeo.org/mailman/listinfo/qgis-user" \
shash="zixdmth9cnFqicH8QuIbpZOzNQJKoYj8bA7jjs3FNZjSTlxHRoDmgBYVq8TUD3diH+O6vDa7l3MWZYr \
kkOlMN+Owp1BPxGl1JaOLItlY1KTeWPpMWqcEhErVB6vgoCherNiuNvHyusxoqLr9fFRyAbKS4p48AXkUZ3vkZzEbol4=" \
target="_blank" moz-do-not-send="true">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><br>
--<br>
Andreas Neumann<o:p></o:p></p>
</div>
<p class="MsoNormal"><a \
href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fqgis.org%2F& \
;data=05%7C01%7Cajph%40geodata.soton.ac.uk%7C7525097e62754e2b0c9808dafa1f1616%7C4a5378 \
f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638097308670925016%7CUnknown%7CTWFpbGZsb3d8eyJWIj \
oiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FDpGBxJCZtkl2dRxkIhEONOvbZDbW5EsbrQf%2B9AZAvM%3D&reserved=0" \
originalsrc="http://qgis.org/" \
shash="FcqlGP7YszShs6dO9twu6mq/ERjVEibynPKnhN0oGp0UiY87tI+1GG3YypVZ6MLrbkuu/2H87fzvsZg \
2YFV1SyLRBKQanFDBSmuA1guThxOU4PUO+Evx83RiCvEEcSuq2PCVfbNemFQU4CZnSiOUYUX1i161iuO6J2N5y5iTUxM=" \
target="_blank" moz-do-not-send="true">QGIS.ORG</a> board member \
(treasurer)<o:p></o:p></p> </div>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" \
wrap="">_______________________________________________ QGIS-User mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a> List info: <a \
class="moz-txt-link-freetext" \
href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" \
href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
</blockquote>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Andy Harfoot
Skype: gdi_ajph
Teams: <a class="moz-txt-link-abbreviated" \
href="mailto:ajph@soton.ac.uk">ajph@soton.ac.uk</a>
GeoData Institute
University of Southampton
Southampton
SO17 1BJ
<a class="moz-txt-link-abbreviated" \
href="http://www.geodata.soton.ac.uk">www.geodata.soton.ac.uk</a></pre> </body>
</html>
_______________________________________________
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic