<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Ian,<br>
<br>
No, there is no ability to do that, unless you use POSITION CC.
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.
What were you planning to do the center of the label polygon?<br>
<pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
<br>
On 12/11/2011 2:18 PM, Ian Walberg wrote:
<blockquote
cite="mid:D12323219CEDB24AA8FAE53FF3F59FB403197289@be28.exg3.exghost.com"
type="cite">
<pre wrap="">So is it expected that labelpnt generates a point with its center at the middle of the bounding rectangle of the text?
Thanks
Ian
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a> [<a class="moz-txt-link-freetext" href="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Brent Fraser
Sent: Sunday, December 11, 2011 1:02 PM
To: thomas bonfort
Cc: <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
Subject: Re: [mapserver-users] GEOMTRANSFORM LABELPNT example
Thomas,
I tracked it down to the LABELCACHE setting.
LABELCACHE ON gives the expected results LABELCACHE OFF gives my old blue-dot-on-the-left results.
See attached PDFs.
Best Regards,
Brent Fraser
On 12/11/2011 1:05 PM, thomas bonfort wrote:
</pre>
<blockquote type="cite">
<pre wrap="">There might have been a bug in the initial implementation. trying it
out with current trunk gives me the expected result, unless I'm
missing something.
On Sun, Dec 11, 2011 at 20:44, Brent Fraser<a class="moz-txt-link-rfc2396E" href="mailto:bfraser@geoanalytic.com"><bfraser@geoanalytic.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Thomas,
See comments below.
Best Regards,
Brent Fraser
On 12/11/2011 12:26 PM, thomas bonfort wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I think this is all expected behavior, although the documentation
may be incorrect.
LABELPNT draws a marker on the geographic position the label is
attached to. This corresponds to the center of the label text only
if the label is in position CC.
</pre>
</blockquote>
<pre wrap="">I think that is what is intended but my original test case (using CC
) resulted in the LABELPNT rendered on the left side of the
labelpoly, see <a class="moz-txt-link-freetext" 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>.
I had expected it to be coincident with the yellow circle and green cross.
</pre>
<blockquote type="cite">
<pre wrap="">To draw a label at the center of the label text, another
geomtransform would have to be implemented, named e.g. LABELBBOXCENTROID.
</pre>
</blockquote>
<pre wrap="">or maybe
GEOMTRANSFORM (centroid([LABELPOLY]))
</pre>
<blockquote type="cite">
<pre wrap="">regards,
thomas
On Sun, Dec 11, 2011 at 19:34, Brent Fraser<a class="moz-txt-link-rfc2396E" href="mailto:bfraser@geoanalytic.com"><bfraser@geoanalytic.com></a>
wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hey Jeff,
I've been looking into this too (not finished yet). I'm using
v6.0.1 and can reproduce my original results (blue dot to the left)
AND Ian's (grey dot coincident with white dot). Very strange. My
shapefile dataset gets reprojected from geographic to UTM, so that
may be causing the difference.
I need to look into that...
Best Regards,
Brent Fraser
On 12/11/2011 10:57 AM, Jeff McKenna wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On 11-12-11 11:20 AM, Ian Walberg wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Here is the map file we are using ms4w 3.0.3.
We thought the larger grey circle should be drawn in the center
of the label text.
What have we done wrong?
</pre>
</blockquote>
<pre wrap="">I have done some testing on this on Windows, with MapServer trunk
(6.1-dev), here are my findings:
- I used Brent's original example styles (from
<a class="moz-txt-link-freetext" 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>)
with Ian's FEATURE layer --> Brent's "Blue Dot" LABELPNT with POSITION
CC is
now correctly placed in the center of the label text (so it seems
this has been fixed in the code, but I can't find the ticket that
says that)
- If I change to POSITION LR (as in Ian's example layer) then I
get Ian's issue (LABELPNT is placed at the geometry location, not
in the center of the label text
- but this is now an issue of understanding the developer's logic
(from that thread SteveL says "Let me ponder this and get back to
you. I think it makes sense to use the label point geotransform
only with position CC so that it matches actual shape location.")
That's all I know at this point (ha pun).
-jeff
</pre>
</blockquote>
<pre wrap="">_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
</blockquote>
</blockquote>
</blockquote>
</body>
</html>