outline colors for lines ?

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Tue Nov 27 22:24:37 EST 2007


Rich,

Lines with outlines are drawn either using a SYMBOL that is a pixmap 
that is dragged along the line. Or you can use two or more STYLEs in a 
single CLASS like:

STYLE
  COLOR 255 0 0
  WIDTH 5
END
STYLE
  COLOR 0 0 255
  WIDTH 3
END

Which would draw a 5 pixel wide red line and then overlay that with a 3 
pixel wide blue line giving the appearance of blue line with a one pixel 
outline in red.

-Steve W

rich.fromm wrote:
> First of all, thank you for all of the prompt and helpful assistance I've
> gotten so far.  I hope I'm not asking too many questions here.
> 
> Now on to my current quandry:  Is there any simple way of drawing lines with
> outlines?
> 
> The mapfile docs:
> 
>   http://mapserver.gis.umn.edu/docs/reference/mapfile/style
> 
> are indeed very clear in saying for OUTLINECOLOR that:
> 
>   Line symbols do not support outline colors.
> 
> Although since there seem to be other examples of where those docs are
> mapserver 4.x centric, I thought it might be worth asking with respect to
> 5.0.0.  But I don't see any evidence of it in the 4.10.x to 5.0.x migration
> guide:
> 
>  
> http://trac.osgeo.org/mapserver/browser/tags/rel-5-0-0/mapserver/MIGRATION_GUIDE.TXT
> 
> And I tried just adding an OUTLINECOLOR along with the existing COLOR in the
> STYLE section for a line, and that didn't work.
> 
> Currently the approach that I'm taking is as follows.  For a line of width
> of
> m pixels plus an outline of n pixels, I first draw a line of width m+(2*n)
> with the COLOR of the outline, and then I draw a line of width m with the
> COLOR of the main line atop that.  This was based on suggestions here:
> 
>   http://mapserver.gis.umn.edu/docs/howto/cartosymbols/
> 
> While that works, it seems a little hacky, and I wonder if it has
> performance
> issues since ultimately each line has to be completely rendered twice.  So I
> was wondering if there was a better way.
> 



More information about the mapserver-users mailing list