<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
h1
        {mso-style-priority:9;
        mso-style-link:"Überschrift 1 Zchn";
        margin-top:24.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
h2
        {mso-style-priority:9;
        mso-style-link:"Überschrift 2 Zchn";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
h3
        {mso-style-priority:9;
        mso-style-link:"Überschrift 3 Zchn";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
h4
        {mso-style-priority:9;
        mso-style-link:"Überschrift 4 Zchn";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;
        font-style:italic;}
h5
        {mso-style-priority:9;
        mso-style-link:"Überschrift 5 Zchn";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;
        font-weight:normal;}
h6
        {mso-style-priority:9;
        mso-style-link:"Überschrift 6 Zchn";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;
        font-weight:normal;
        font-style:italic;}
p.MsoHeading7, li.MsoHeading7, div.MsoHeading7
        {mso-style-priority:9;
        mso-style-link:"Überschrift 7 Zchn";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;
        font-style:italic;}
p.MsoHeading8, li.MsoHeading8, div.MsoHeading8
        {mso-style-priority:9;
        mso-style-link:"Überschrift 8 Zchn";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
p.MsoHeading9, li.MsoHeading9, div.MsoHeading9
        {mso-style-priority:9;
        mso-style-link:"Überschrift 9 Zchn";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;
        font-style:italic;}
p.MsoTitle, li.MsoTitle, div.MsoTitle
        {mso-style-priority:10;
        mso-style-link:"Titel Zchn";
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:15.0pt;
        margin-left:0cm;
        mso-add-space:auto;
        font-size:26.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        letter-spacing:.25pt;
        mso-fareast-language:EN-US;}
p.MsoTitleCxSpFirst, li.MsoTitleCxSpFirst, div.MsoTitleCxSpFirst
        {mso-style-priority:10;
        mso-style-link:"Titel Zchn";
        mso-style-type:export-only;
        margin:0cm;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        font-size:26.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        letter-spacing:.25pt;
        mso-fareast-language:EN-US;}
p.MsoTitleCxSpMiddle, li.MsoTitleCxSpMiddle, div.MsoTitleCxSpMiddle
        {mso-style-priority:10;
        mso-style-link:"Titel Zchn";
        mso-style-type:export-only;
        margin:0cm;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        font-size:26.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        letter-spacing:.25pt;
        mso-fareast-language:EN-US;}
p.MsoTitleCxSpLast, li.MsoTitleCxSpLast, div.MsoTitleCxSpLast
        {mso-style-priority:10;
        mso-style-link:"Titel Zchn";
        mso-style-type:export-only;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:15.0pt;
        margin-left:0cm;
        mso-add-space:auto;
        font-size:26.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        letter-spacing:.25pt;
        mso-fareast-language:EN-US;}
p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
        {mso-style-priority:11;
        mso-style-link:"Untertitel Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        letter-spacing:.75pt;
        mso-fareast-language:EN-US;
        font-style:italic;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
        {mso-style-priority:1;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
p.MsoIntenseQuote, li.MsoIntenseQuote, div.MsoIntenseQuote
        {mso-style-priority:30;
        mso-style-link:"Intensives Zitat Zchn";
        margin-top:10.0pt;
        margin-right:46.8pt;
        margin-bottom:14.0pt;
        margin-left:46.8pt;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;
        font-weight:bold;
        font-style:italic;}
span.MsoIntenseEmphasis
        {mso-style-priority:21;
        color:black;
        font-weight:bold;
        font-style:italic;}
span.berschrift1Zchn
        {mso-style-name:"Überschrift 1 Zchn";
        mso-style-priority:9;
        mso-style-link:"Überschrift 1";
        font-family:"Arial","sans-serif";
        color:black;
        font-weight:bold;}
span.berschrift2Zchn
        {mso-style-name:"Überschrift 2 Zchn";
        mso-style-priority:9;
        mso-style-link:"Überschrift 2";
        font-family:"Arial","sans-serif";
        color:black;
        font-weight:bold;}
span.TitelZchn
        {mso-style-name:"Titel Zchn";
        mso-style-priority:10;
        mso-style-link:Titel;
        font-family:"Arial","sans-serif";
        color:black;
        letter-spacing:.25pt;}
span.UntertitelZchn
        {mso-style-name:"Untertitel Zchn";
        mso-style-priority:11;
        mso-style-link:Untertitel;
        font-family:"Arial","sans-serif";
        color:black;
        letter-spacing:.75pt;
        font-style:italic;}
span.IntensivesZitatZchn
        {mso-style-name:"Intensives Zitat Zchn";
        mso-style-priority:30;
        mso-style-link:"Intensives Zitat";
        color:black;
        font-weight:bold;
        font-style:italic;}
span.berschrift3Zchn
        {mso-style-name:"Überschrift 3 Zchn";
        mso-style-priority:9;
        mso-style-link:"Überschrift 3";
        font-family:"Arial","sans-serif";
        color:black;
        font-weight:bold;}
span.berschrift4Zchn
        {mso-style-name:"Überschrift 4 Zchn";
        mso-style-priority:9;
        mso-style-link:"Überschrift 4";
        font-family:"Arial","sans-serif";
        color:black;
        font-weight:bold;
        font-style:italic;}
span.berschrift5Zchn
        {mso-style-name:"Überschrift 5 Zchn";
        mso-style-priority:9;
        mso-style-link:"Überschrift 5";
        font-family:"Arial","sans-serif";
        color:black;}
span.berschrift6Zchn
        {mso-style-name:"Überschrift 6 Zchn";
        mso-style-priority:9;
        mso-style-link:"Überschrift 6";
        font-family:"Arial","sans-serif";
        color:black;
        font-style:italic;}
span.berschrift7Zchn
        {mso-style-name:"Überschrift 7 Zchn";
        mso-style-priority:9;
        mso-style-link:"Überschrift 7";
        font-family:"Arial","sans-serif";
        color:black;
        font-style:italic;}
span.berschrift8Zchn
        {mso-style-name:"Überschrift 8 Zchn";
        mso-style-priority:9;
        mso-style-link:"Überschrift 8";
        font-family:"Arial","sans-serif";
        color:black;}
span.berschrift9Zchn
        {mso-style-name:"Überschrift 9 Zchn";
        mso-style-priority:9;
        mso-style-link:"Überschrift 9";
        font-family:"Arial","sans-serif";
        color:black;
        font-style:italic;}
span.E-MailFormatvorlage35
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:windowtext;}
span.E-MailFormatvorlage36
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:#003285;}
span.E-MailFormatvorlage37
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:#003285;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
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]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;color:#003285">Dear List Members</span><span style="font-size:11.0pt;color:windowtext">,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext">I have a problem with labeling polygon-features using expressions. I want to create different label-classes depending on the area of the geometries (cities, villages, etc.). In
 most cases, this works quite well but in some cases I get weird effects as some labels disappear on certain scale-levels or get placed on parts of the geometries that don’t really make sense.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext">Looking for a reason for that behavior, I found out that geometry-functions deliver very different values depending on the current scale level.</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">
</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext">For </span><span lang="EN-US" style="font-size:11.0pt;color:#003285">getting</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext"> some examples, I labeled one feature with the
 following expression:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext">'xmax: ' + to_string(format_number(x_max($geometry), 0)) +' m; ' + 'area: '+ to_string(format_number(to_real($area),0)) + ' m2'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#003285">results</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext">:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext">On scale 1:50,000: 'xmax</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">:</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext"> 4,479,481 m</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">;</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext">
 area</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">:</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext"> 232,526,142 m</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">2</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext">'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext">On scale 1:100,000: 'xmax</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">:</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext"> 4,479,481
</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">m; </span><span lang="EN-US" style="font-size:11.0pt;color:windowtext">area</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">:</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext">
 5,343,813</span><span lang="EN-US" style="font-size:11.0pt;color:#003285"> m2</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext">'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext">On scale 1:800,000: 'xmax</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">:</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext"> 4,479,431</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">
 m;</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext"> area</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">:</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext"> 4,885,325</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">
 m2</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext">'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#003285">I can send screenshots if needed.</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext">With ‘identify features’ tool, I get an area of 232,528,728 square meters, which suggests that $area at scale 1:50,000 is almost correct.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext">General info: I’m working with QGIS 2.14, geometries come from a PostGIS-server, geometries and project use CRS DHDN / Gauss-Kruger zone 4 (EPSG:31468), the features I want to
 label are multipart polygons (I get the same effects using non-multipart features).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext">Does anyone have an idea if I may have missed some settings that cause the mentioned effects? O</span><span lang="EN-US" style="font-size:11.0pt;color:#003285">r</span><span lang="EN-US" style="font-size:11.0pt;color:windowtext">
 may it be a bug in the geometry functions?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext">Thanks a lot for any help!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:windowtext">Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:windowtext;mso-fareast-language:DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext;mso-fareast-language:DE">Benjamin Fünfer-Königstein<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:windowtext;mso-fareast-language:DE">S-IP-AN-TG Techn.
</span><span style="color:windowtext;mso-fareast-language:DE">Geschäftsfelder<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>