<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=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas","serif";
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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 bgcolor=white lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Brent,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Ok, we had been using an earlier version of the mapserver documentation we had downloaded which had the text below.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The latest version now describes the discussed functionally more closely.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>We had been looking at using the previous functionally to draw and rotate a symbol around the label text. Not what we are thinking but this could be used for something like displaying the wind speed and symbol rotated for the wind direction using a symbol around the outside.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>To do this it sounds like a new GEOMTRANSFORM type.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Ian<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>STYLE The start of a STYLE object.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Label specific mechanisms of the STYLE object are the GEOMTRANSFORM options:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>GEOMTRANSFORM [labelpnt|labelpoly] Creates geometries that can be used for styling the label.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&#8226; labelpnt generates a point with its center at the middle of the bounding rectangle of the text.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&#8226; labelpoly generates the bounding rectangle for the text, with 1 pixel of padding added in all directions.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The resulting geometries can be styled using the mechanisms available in the STYLE object.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>New in version 6.0.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> Brent Fraser [mailto:bfraser@geoanalytic.com] <br><b>Sent:</b> Sunday, December 11, 2011 1:52 PM<br><b>To:</b> Ian Walberg<br><b>Cc:</b> mapserver-users@lists.osgeo.org<br><b>Subject:</b> Re: [mapserver-users] GEOMTRANSFORM LABELPNT example<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Ian,<br><br>&nbsp; No, there is no ability to do that, unless you use POSITION CC.&nbsp; There had been some discussion several months ago to add functions to the GEOMTRANSFORM resulting in RFC 72 (<a href="http://www.mapserver.org/development/rfc/ms-rfc-72.html">http://www.mapserver.org/development/rfc/ms-rfc-72.html</a>)<br><br>I think something like <br><br>GEOMTRANSFORM (getCentroid(labelpoly))<br><br>would be a good addition, but I don't have a specific use-case.&nbsp; What were you planning to do the center of the label polygon?<br><br><o:p></o:p></p><pre>Best Regards,<o:p></o:p></pre><pre>Brent Fraser<o:p></o:p></pre><p class=MsoNormal><br>On 12/11/2011 2:18 PM, Ian Walberg wrote: <o:p></o:p></p><pre>So is it expected that labelpnt generates a point with its center at the middle of the bounding rectangle of the text?<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Thanks<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Ian<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>-----Original Message-----<o:p></o:p></pre><pre>From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a> [<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Brent Fraser<o:p></o:p></pre><pre>Sent: Sunday, December 11, 2011 1:02 PM<o:p></o:p></pre><pre>To: thomas bonfort<o:p></o:p></pre><pre>Cc: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><o:p></o:p></pre><pre>Subject: Re: [mapserver-users] GEOMTRANSFORM LABELPNT example<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Thomas,<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>&nbsp; I tracked it down to the LABELCACHE setting.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>LABELCACHE ON&nbsp; gives the expected results LABELCACHE OFF&nbsp; gives my old blue-dot-on-the-left results.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>See attached PDFs.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Best Regards,<o:p></o:p></pre><pre>Brent Fraser<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>On 12/11/2011 1:05 PM, thomas bonfort wrote:<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>There might have been a bug in the initial implementation. trying it <o:p></o:p></pre><pre>out with current trunk gives me the expected result, unless I'm <o:p></o:p></pre><pre>missing something.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>On Sun, Dec 11, 2011 at 20:44, Brent Fraser<a href="mailto:bfraser@geoanalytic.com">&lt;bfraser@geoanalytic.com&gt;</a>&nbsp; wrote:<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Thomas,<o:p></o:p></pre><pre>&nbsp; See comments below.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Best Regards,<o:p></o:p></pre><pre>Brent Fraser<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>On 12/11/2011 12:26 PM, thomas bonfort wrote:<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>I think this is all expected behavior, although the documentation <o:p></o:p></pre><pre>may be incorrect.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>LABELPNT draws a marker on the geographic position the label is <o:p></o:p></pre><pre>attached to. This corresponds to the center of the label text only <o:p></o:p></pre><pre>if the label is in position CC.<o:p></o:p></pre></blockquote><pre>I think that is what is intended but my original test case (using CC <o:p></o:p></pre><pre>) resulted in the LABELPNT rendered on the left side of the <o:p></o:p></pre><pre>labelpoly, see <a href="http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20110526/47c9bc8c/labelpnt-0001.png">http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20110526/47c9bc8c/labelpnt-0001.png</a>.<o:p></o:p></pre><pre>&nbsp;&nbsp; I had expected it to be coincident with the yellow circle and green cross.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>To draw a label at the center of the label text, another <o:p></o:p></pre><pre>geomtransform would have to be implemented, named e.g. LABELBBOXCENTROID.<o:p></o:p></pre></blockquote><pre>or maybe<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>GEOMTRANSFORM (centroid([LABELPOLY]))<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>regards,<o:p></o:p></pre><pre>thomas<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>On Sun, Dec 11, 2011 at 19:34, Brent Fraser<a href="mailto:bfraser@geoanalytic.com">&lt;bfraser@geoanalytic.com&gt;</a><o:p></o:p></pre><pre>&nbsp; wrote:<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Hey Jeff,<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>&nbsp; I've been looking into this too (not finished yet).&nbsp; I'm using <o:p></o:p></pre><pre>v6.0.1 and can reproduce my original results (blue dot to the left) <o:p></o:p></pre><pre>AND Ian's (grey dot coincident with white dot).&nbsp; Very strange.&nbsp; My <o:p></o:p></pre><pre>shapefile dataset gets reprojected from geographic to UTM, so that <o:p></o:p></pre><pre>may be causing the difference.<o:p></o:p></pre><pre>&nbsp; I need to look into that...<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Best Regards,<o:p></o:p></pre><pre>Brent Fraser<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>On 12/11/2011 10:57 AM, Jeff McKenna wrote:<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>On 11-12-11 11:20 AM, Ian Walberg wrote:<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Here is the map file we are using ms4w 3.0.3.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>We thought the larger grey circle should be drawn in the center <o:p></o:p></pre><pre>of the label text.<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>What have we done wrong?<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre></blockquote><pre>I have done some testing on this on Windows, with MapServer trunk <o:p></o:p></pre><pre>(6.1-dev), here are my findings:<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>- I used Brent's original example styles (from<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><a href="http://osgeo-org.1803224.n2.nabble.com/GEOMTRANSFORM-labelpnt-location-td6408065.html">http://osgeo-org.1803224.n2.nabble.com/GEOMTRANSFORM-labelpnt-location-td6408065.html</a>)<o:p></o:p></pre><pre>with Ian's FEATURE layer --&gt;&nbsp;&nbsp;&nbsp; Brent's &quot;Blue Dot&quot; LABELPNT with POSITION<o:p></o:p></pre><pre>CC is<o:p></o:p></pre><pre>now correctly placed in the center of the label text (so it seems <o:p></o:p></pre><pre>this has been fixed in the code, but I can't find the ticket that <o:p></o:p></pre><pre>says that)<o:p></o:p></pre><pre>- If I change to POSITION LR (as in Ian's example layer) then I <o:p></o:p></pre><pre>get Ian's issue (LABELPNT is placed at the geometry location, not <o:p></o:p></pre><pre>in the center of the label text<o:p></o:p></pre><pre>- but this is now an issue of understanding the developer's logic <o:p></o:p></pre><pre>(from that thread SteveL says &quot;Let me ponder this and get back to <o:p></o:p></pre><pre>you. I think it makes sense to use the label point geotransform <o:p></o:p></pre><pre>only with position CC so that it matches actual shape location.&quot;)<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>That's all I know at this point (ha pun).<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>-jeff<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre></blockquote><pre>_______________________________________________<o:p></o:p></pre><pre>mapserver-users mailing list<o:p></o:p></pre><pre><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><o:p></o:p></pre><pre><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></pre></blockquote></blockquote><pre><o:p>&nbsp;</o:p></pre><p class=MsoNormal><br><br><br><o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>mapserver-users mailing list<o:p></o:p></pre><pre><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><o:p></o:p></pre><pre><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></pre></blockquote></blockquote></div></body></html>