Scale-dependant symbols (using maxsize/minsize)?

Guillaume Sueur guillaume.sueur at NEOGEO-ONLINE.NET
Fri Dec 7 01:17:36 PST 2007


Sure, I think a comment there could help. If any of our beloved
mapserver developpers read me this leads me to a question :
why is the symbolscale defined on the LAYER level and not on the CLASS
level which would permit to play both with more than one scale range and
define more precisely a complex behaviour of a symbol using several
classes ?

Thanks

Guillaume

Mike Leahy a écrit :
> Guillaume,
> 
> That's exactly what I was missing.  Thanks for the help.
> 
> As an aside, I would suggest that mapfile reference include a note next
> to the definitions for MAXSIZE/MINSIZE that tells readers that they need
> to also define SYMBOLSCALE in the layer...at least in my case that would
> have solved my confusion.
> 
> Alternatively, is it appropriate for me to add a comment on the STYLE
> page of the mapfile reference about this?
> 
> Regards,
> Mike
> 
> Guillaume Sueur wrote:
>> Hi Mike,
>>
>> I think you should use the SYMBOLSCALE item in the layer definition. It
>> sets the scale on which the symbol will by drawn at full size, i.e the
>> size defined into the CLASS section. Above it will appear automatically
>> smaller, and beyond il will appear bigger. Of course you can have some
>> issues when the ratio between the current scale and the SYMBOLSCALE is
>> not square, mostly for lines if you use more than one symbol (for roads
>> for instance).
>> But most of the times it does the job pretty well !
>>
>> Good tests !
>>
>> Guillaume
>>
>> Mike Leahy a écrit :
>>> Hello List,
>>>
>>> I know this is a topic that comes up often, but I have a rivers layer that
>>> has hierarchical attributes assigned.  I'd like to set this up in a mapfile
>>> where the size of the symbols used to draw the lines reflect the level that
>>> each river is in the hierarchy.  I'd like when the map is at full extent
>>> that only the largest rivers are displayed, but with a small symbol...as the
>>> map is zoomed in, progressively smaller rivers should start to appear, while
>>> the symbols for the larger rivers increase in width.
>>>
>>> I know I can accomplish this by making a series of layers with
>>> classes/styles that apply to specific scales.  However, I'm trying to
>>> understand the MAXSIZE/MINSIZE attributes that can be set for Style objects.
>>>  Is there any way I can use this to simplify my mapfile (i.e., so I can have
>>> one layer with scale-dependant styles/classes)?  I've tried using these
>>> attributes, but so far it only seems like MINSIZE really has any effect on
>>> the symbol size - I must be missing some other step to make this work...
>>>
>>> I should note that I'm using this map in a Chameleon setup...I don't know if
>>> that has any bearing on how the MINSIZE/MAXSIZE attributes are used.
>>>
>>> Does anyone have any suggestions, or maybe know of some documentation that
>>> explains how to use this?
>>>
>>> Regards,
>>> Mike
>>>
>>
> 

--



More information about the MapServer-users mailing list