[Mapserver-users] A STYLE with no COLOR is hardly a STYLE

Sean Gillies sgillies at frii.com
Fri Jul 2 14:56:36 EDT 2004


On Jul 2, 2004, at 10:29 AM, Ryan, Adam wrote:

>
> Dear List,
>
> I'm having a hard time with the concept of treating polygons as lines 
> when
> there is no COLOR parameter in a STYLE object.  This seriously limits 
> the
> great improvement that stacked STYLE objects provide by essentially
> forbidding a foreground color of a line-type STYLE.  Many STYLE 
> objects that
> render wonderfully in line-type LAYERs are simply not reproducible in
> polygon-type LAYERs.
>
> For example, if I want to use a 'railroad tie' style as an outline of a
> simple fill style in a polygon-type layer, I'd want to use a symbol 
> like
> this that works in line-type layers:
>
> SYMBOL
>   NAME "tie"
>   TYPE truetype
>   FONT "arial"
>   CHARACTER "|"
>   GAP 10
> END
>
> Problem is, with no COLOR parameter (which I can't use because it would
> cause the features to be filled by this symbol) all I can get is a 3 
> pixel
> wide outlined character if I use OUTLINECOLOR, or nothing at all.
>
> Is this correct or am I missing something here?
>
> The push toward STYLE objects is right on, so why not put a TYPE 
> parameter
> in the STYLE object?
>
> Adam Ryan

Adam,

You have a good point.  The current work-around is to

1) define a polygon-type layer for the fill
2) define a line-type layer for the polygon boundary using the very
    same data as the polygon fill layer.

That you can render polygons as lines is a poorly documented and
explained feature.

cheers,
Sean

--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies




More information about the mapserver-users mailing list