[mapserver-users] Square Edges Using labelpoly
Lime, Steve D (MNIT)
Steve.Lime at state.mn.us
Wed Oct 22 14:23:03 PDT 2014
Seems to be the combination of the fill and the outline that forces the rounded outline. Here's a test:
1) Outline, LINEJOIN MITER, LINECAP SQUARE: http://maps1.dnr.state.mn.us/cgi-bin/mapserv64?map=/usr/local/mapserver/apps/test/labelpoly/test1.map&mode=map
2) Fill and outline, LINEJOIN MITER, LINECAP SQUARE: http://maps1.dnr.state.mn.us/cgi-bin/mapserv64?map=/usr/local/mapserver/apps/test/labelpoly/test2.map&mode=map
Besides seemingly not respecting the LINEJOIN/LINECAP values, the label polygon doesn't include the baseline decent of the lower case y. Hmmm...
Sure seems like a bug...
However, you can work around it. Just use two styles. One to draw the outline and one to fill... (see mapfile below)
3) Two styles, outline uses LINEJOIN MITER, LINECAP SQUARE: http://maps1.dnr.state.mn.us/cgi-bin/mapserv64?map=/usr/local/mapserver/apps/test/labelpoly/test3.map&mode=map
Steve
------------ snip ------------
MAP
NAME 'test'
EXTENT 0 0 500 500
SIZE 500 500
FONTSET 'fonts.list'
SYMBOL
NAME 'circle'
TYPE ELLIPSE
POINTS 1 1 END
FILLED TRUE
END
LAYER
NAME 'label'
TYPE POINT
STATUS DEFAULT
FEATURE
POINTS 50 250 END
TEXT 'my label text'
END
LABELITEM 'text'
CLASS
LABEL
POSITION UR
TYPE TRUETYPE
FONT 'arial'
SIZE 40
COLOR 0 0 0
STYLE
GEOMTRANSFORM labelpoly
# COLOR 255 0 0
OUTLINECOLOR 255 0 0
WIDTH 10
LINEJOIN miter
LINECAP square
END # Style
STYLE
GEOMTRANSFORM labelpoly
COLOR 255 0 0
END # Style
END # Label
END
END
END
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Zach Chehayeb
Sent: Wednesday, October 22, 2014 1:38 PM
To: Håvard Tveite; mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Square Edges Using labelpoly
Håvard,
Thanks for your help. Unfortunately, the polygon did not change when specifying "LINEJOIN miter" (see below) and still has curved edges. Any other ideas?
STYLE
ANGLE 0
COLOR 149 149 149
GEOMTRANSFORM "labelpoly"
OFFSET 0 0
OUTLINECOLOR 149 149 149
WIDTH 22
LINEJOIN miter
END # STYLE
Regards,
Zach
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Håvard Tveite
Sent: Wednesday, October 22, 2014 12:17 AM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Square Edges Using labelpoly
LINEJOIN miter
in the STYLE element should work also for labelpoly see http://mapserver.org/mapfile/style.html
LABEL
STYLE
GEOMTRANSFORM labelpoly
OUTLINECOLOR 255 0 0
WIDTH 4
LINEJOIN miter
END # Style
...
END # Label
Håvard
On 2014-10-21 23:37, Zach Chehayeb wrote:
> Hi All,
>
> Does anyone know if it possible to create a labelpoly (as in GEOTRANSFORM labelpoly) with straight edges instead of curved edges?
>
> Regards,
>
> Zach
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
--
Håvard Tveite
Department of Mathematical Sciences and Technology, NMBU Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.nmbu.no/imt/ _______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list