Width? (Re: Today's CVS, labels that follow street segments and antialias lines)

Steve Lime steve.lime at DNR.STATE.MN.US
Tue Mar 21 16:19:16 EST 2006


Strictly speaking SIZE controls the y dimension of a tile or a brush used for
a fill or line drawing. It has no meaning without a symbol that can be scaled
somehow. WIDTH refers to the width of simple lines- lines drawn without the
aid of a symbol definition (or with a TYPE SIMPLE definition like the one below).

It is these simple lines that can be antialiased... I chose this for mainly for 
consistency. We could make the typical 

SYMBOL 'circle'
SIZE '10' 
ANTIALIAS TRUE

produce an antialiased line easy enough, but using a square (TYPE VECTOR)
symbol instead of an ellipse would not result in antialiasing.

Steve

>>> Sean Gillies <sgillies at FRII.COM> 3/21/2006 3:00:10 PM >>>
Steve,

Line width used to be controlled by the "size" parameter. Has it  
changed to being controlled by "width"?

Sean

On Mar 21, 2006, at 1:13 PM, Steve Lime wrote:

> I believe you create a symbol like this:
>
> SYMBOL
>   TYPE SIMPLE
>   NAME 'dash_10_on_10_off'
>   STYLE '10 10'
> END
>
> STYLE
>   SYMBOL 'dash_10_on_10_off'
>   COLOR 170 153 34
>   WIDTH 5
>   ANTIALIAS TRUE
> END
>
> Steve
>
>>>> Stephen Woodbridge <woodbri at swoodbridge.com> 3/21/2006 1:55:14  
>>>> PM >>>
> Steve Lime wrote:
>> There haven't been any recent changes that I know of that would
>> cause problems along these lines.
>> =20
>> 1a) Benj's last patch was applied several weeks ago as mentioned in =
> comment #31 of bug 1620.
>> 1b) I'm running brand new CVS code here and MINDISTANCE is working  
>> as =
> usual
>> =20
>> 2) Paul's right, the most naive style would be:
>> =20
>>        STYLE
>>          COLOR 170 153 34
>>          WIDTH 5
>>          ANTIALIAS TRUE
>>        END
>
> OK, changing the mapfile to look like this, but reading the threads  
> on=20
> this I thought you could use SYMBOL "circle" with SIZE n also.
>
> How to I get dashed AA lines?
>
> Thanks,
>    -Steve W
>
>> 3) I'll work up a test case for you. What should work is setting 2 =
> styles: 1 for the fill and the second
>> for the outline. E.g.:
>> =20
>> STYLE COLOR 255 0 0 END
>> STYLE
>>    COLOR 170 153 34
>>    WIDTH 5
>>    ANTIALIAS TRUE
>> END
>> =20
>> Steve
>> =20
>> =20
>>>>> Paul Spencer <pspencer at DMSOLUTIONS.CA> 3/21/2006 12:39:50 PM >>>
>> =20
>> Steve,
>> =20
>> re 1) the latest cvs had working labels following lines (more or =20
>> less) when I last did it.  I didn't check mindistance though.  And  
>> =20
>> there are still some outstanding issues I think (unless this is  
>> the =20
>> un-committed patch?)
>> =20
>> re 2) you need to change SYMBOL "circle" to SYMBOL 0, SIZE 3 to  
>> WIDTH =
> =20
>> 3 and set TRANSPARENCY ALPHA at the LAYER level.
>> =20
>> re 3) I'd like to know the same thing.  I never got polygons  
>> working :(
>> =20
>> Cheers
>> =20
>> Paul
>> =20
>> =20
>> =20
>> On 21-Mar-06, at 1:21 PM, Stephen Woodbridge wrote:
>> =20
>> =20
>>> Hi all,
>>>
>>> I grabbed today CVS and I'm testing it with ka-map. I have a  
>>> couple =20
>>> questions/issues:
>>>
>>> 1) labels that follow street segments
>>>   a) Benj has a patch that need to get integrated when ever he is  
>>> =20
>>> ready
>>>      I didn't get it built into my test version yet.
>>>   b) MINDISTANCE on labels is not working
>>>
>>> 2) Fuzzy brushes / antialiasing does not seem to be working. I'm =20
>>> using png output and the mapfile fragment looks like:
>>>
>>>    CLASS
>>>      NAME "Interstate Highways"
>>>      EXPRESSION "1"
>>>      STYLE
>>>        SYMBOL "circle"
>>>        COLOR 170 153 34
>>>        SIZE 5
>>>        ANTIALIAS TRUE
>>>      END
>>>      STYLE
>>>        SYMBOL "circle"
>>>        COLOR 238 187 34
>>>        SIZE 3
>>>        ANTIALIAS TRUE
>>>      END
>>>    END
>>>
>>> 3) How should I define a polygon layer so I can fill the polygon =20
>>> and outline it with antialiased?
>>>
>>> Thanks,
>>>  -Steve W
>> =20
>> =20
>> +-----------------------------------------------------------------+
>> |Paul Spencer                           pspencer at dmsolutions.ca   |
>> +-----------------------------------------------------------------+
>> |Applications & Software Development                              |
>> |DM Solutions Group Inc                 http://www.dmsolutions.ca/| 
>> =20
>> +-----------------------------------------------------------------+
>> =20



More information about the mapserver-dev mailing list