server side SLD support

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Wed Apr 4 14:31:34 EDT 2007


Hi All,

  Few months ago there was a discussion on this list about 
options/impacts on enabling Mapserver map file to use an SLD file (local 
or http) as a styling mechanism instead of using classes on a layer.

The functionality is simple in principle : something like a keyword 
(STYLEDLAYERDESCRIPTOR) on the layer with a link to the sld file would 
allow Mapserver to create classes on this layer (this would be 
equivalent to the applySLD functionality available in Mapscript)

As a reminder here is a link to that discussion : 
http://www.nabble.com/server-side-SLD-support-tf2550774.html#a7109496

  At the end of this discussion, I think the main problem was deciding 
how to handle classes generated by the SLD tag when saving a map file 
through Mapscript : do we save the generated classes or do we save the 
SLD tag ? Pros and cons are :

1. do not include SLD when saving the map file (the generated classes
would be saved normally)

Pros:

   - implementation is straight forward
   - there are no side effects for existing applications and frameworks

Cons:

   - lose the original structure of the map file

2. include SLD when saving the map file (do not save the generated 
classes)

Pros:

   - maintain original structure of map file

Cons:

   - what to do with classes altered through mapscript


Here are some compromising points that were mentioned in this thread:

   - never mix classes and sld (either one or the other)
   - saving generated classes or the sld link could be an optional 
setting at the layer level (default could be saving the sld)
   - mapscript would not be exposed to set the sld (only get that value) 
since the applysld function can be used to generate classes on the layer
   - document the short comings for tools who manipulate layer classes


  As far as I understand, there is no solutions that does it all and if 
we want to go ahead on this, it has to be a compromise with a defined 
behavior.   Any more comments on this issue ?

Thnaks

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