Call for comments -RFC 39

Yewondwossen Assefa yassefa at DMSOLUTIONS.CA
Thu Nov 15 11:56:22 EST 2007


Frank Warmerdam wrote:
> Yewondwossen Assefa wrote:
>> Hi all,
>>
>>  I have put together an RFC outlining changes that could be done to be 
>> able to support Named styles in WMS/SLD. I would appreciate your 
>> comments on it:
>>
>>   http://mapserver.gis.umn.edu/development/rfc/ms-rfc-39
> 
> Assefa,
> 
> I've read it over and it seems reasonable, but I'm not clear on whether
> CLASSes are the right level to break out styles.  I can imagine two
> alternatives:
> 
> 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.

> 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.

> -- 
> 
> 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 don't have an iron in this fire, so I don't feel strongly about this.
> I'm just trying to throw up a few options based on mild unease with the
> presented solution.
> 

  Thanks for the comments.


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-dev mailing list