Call for comments -RFC 39

Frank Warmerdam warmerdam at POBOX.COM
Thu Nov 15 12:56:02 EST 2007


Yewondwossen Assefa wrote:
>> 1) Do it at the layer level.  Basically if you want a WMS layer to 
>> support
>> two styles, create two different layer objects, and somehow declare style
>> names for them with a new keyword.  There is already a way of grouping
>> mapserver layers together to appear as a single WMS layer, right?
>>
>> One benefit of this approach is that it would also be possible to offer
>> different styling options that don't directly map to classification.  For
>> instance, you could have raster layers that use different scaling options
>> (not based on classification) represented as distinct styles via WMS.
>>
> 
>  I actually did not think of this approch. Yes there is a possibility to 
> group layers (for wms purpose) using I believe the group parameter. I am 
> not convinced though that it is reasonable to ask to duplicate layers in 
> the map file to be able to specify styles although I might be wrong.

Assefa,

Well, I can see that this does result in even more duplication.

>> 2) Do it at the STYLE level.  Actually declare style names in the styles
>> and have these selectable in a somewhat similar fashion to what you are
>> proposing.
>>
> 
>  In my opinion I think this approach is also good. I was inclined to 
> break it at the class level for a couple of reasons:
>  * the "Style" terminology used in the SLD is more or less equivalent to 
> one or several classes in MapServer. The SLD defines UserStyle and 
> NamedStyle as being equivalent and c
>  * MapServer currently generates a UserStyle including all the classes 
> that are are available in the layer. Having the break at the class level 
> would allow this to continue working without much changes
>  * Since we advertise 'styles' per layer, It seemed more logical to 
> allow this setting to "select"  classes instead of selecting styles.
> 
> Not sure what others think about this particular issue.

Yes, I see your point.

>> One concern I have with your approach, and with option "2" is that in a
>> multi-style layer, the default rendering will be a sort of mis-mash of
>> the styles since the default is that all classes are in effect.  Perhaps
>> if multiple styles are defined, the default (WMS and regular mode) would
>> be to use the first of the styles instead of all of them.
>>
> 
> The way I was thinking is that if someone is setting a wms server and 
> want to advertise several styles, he would setup a default 
> representation initially doing something like this in this mapfile:
> 
>   layer
>     classgroup "default"
>     class
>       group "default"
>     end
>     class
>       group "anotherstyle"
>     end
> 
> This would allow to have a default style available if STYLES is not 
> given (or draws the layer using MapServer in mode-map)

I believe I had misunderstood.  So the classgroup declaration just defines
which style group will be used by default if it is not overridden using
STYLE= or another override mechanism?  This makes sense, but perhaps need
to be made as clear as possible in eventual documentation.

I am supportive of this RFC.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-dev mailing list