[mapserver-dev] GEOMTRANSFORM labelpnt location

Brent Fraser bfraser at geoanalytic.com
Fri May 27 13:55:57 EDT 2011


Håvard,

   Based on http://trac.osgeo.org/mapserver/ticket/3335, I think the 
intent is to have the point location as documented (center of the 
bounding rectangle), so it's a s/w bug.  And I've used v6.0 release to 
generate the attached png, showing an improved label bbox, but it still 
has some X-axis extent problem (see the "Treasure Mountain" label), 
although it looks more like a text placement problem.

Best Regards,
Brent Fraser


On 5/27/2011 3:33 AM, Havard Tveite wrote:
> Brent,
>
> This is a bug.  The question is if it is only documentation.
> I suggest you file a ticket.
>
> The labelpolygon seems to be a bit shifted, also a bug?
>
> Håvard
>
> On 5/26/2011 7:59 PM, Brent Fraser wrote:
>>   Should we change the documentation on STYLE -> GEOMTRANSFORM -> 
>> labelpnt:
>>
>>     * labelpnt generates a point with its center at the middle of the 
>> bounding rectangle of the text.
>>
>>
>> or is the position generated a bug (or am I using it incorrectly)? 
>> Have a look at the blue dot in the attached image.
>>
>>
>> CLASS # Mountain
>> NAME 'Mountain'
>> EXPRESSION ([CONCISCODE]=280)
>> STYLE # ------ Green Cross ------
>> SYMBOL 'CROSS1'
>> SIZE 8
>> WIDTH 0.5
>> COLOR 0 255 0
>> END
>> STYLE # ------ Yellow Circle ------
>> GEOMTRANSFORM (labelpoint([shape]))
>> SYMBOL 'CIRCLE'
>> SIZE 5
>> OUTLINECOLOR 255 255 0
>> END
>> LABEL
>> STYLE # ------ Red Box ------
>> GEOMTRANSFORM labelpoly
>> OUTLINECOLOR 255 0 0
>> END #
>> STYLE # ------ Blue Dot ------ position OK?
>> GEOMTRANSFORM labelpnt
>> SYMBOL 'CIRCLE'
>> SIZE 2
>> COLOR 0 0 255
>> END #
>> FONT "trebuc"
>> TYPE TRUETYPE
>> POSITION CC
>> ALIGN CENTER
>> WRAP ' '
>> SIZE 6
>> BUFFER 1
>> COLOR 0 0 0
>> ANGLE 0
>> PARTIALS FALSE
>> ANTIALIAS TRUE
>> #MINDISTANCE 250
>> #MINFEATURESIZE 10
>> END
>> END
>>
>>
>> -- 
>> Best Regards,
>> Brent Fraser
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: label_styles.png
Type: image/png
Size: 26582 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20110527/70a73377/label_styles-0001.png


More information about the mapserver-dev mailing list