MapServer / MapServer-import

3 stars 2 forks source link

[WMS Server] enable metadata to turn off SLD functionality #1395

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: tomkralidis Date: 2005/06/23 - 18:01

For WMS Server, I have had numerous requests/desires from stakeholders to have
SLD functionality turned OFF.  This is because some activities do not want their
maps restyled by an arbitrary user SLD for whatever reason (lying with maps).  I
think this is a valid issue.

I think an "sld_enabled" directive in the WEB/METADATA object would do the trick:

"sld_enabled" "0"

OR

"sld_enabled" "1"

If 1, then SLD is enabled.  If 0, then SLD is turned off.  If not specified in
mapfile, then SLD is enabled.
tbonfort commented 12 years ago

Author: tomkralidis Date: 2008/09/23 - 02:02 I'll take this one. Basic approach:

Comments?

tbonfort commented 12 years ago

Author: tomkralidis Date: 2008/12/03 - 18:38

Any comments on the approach suggested? i.e. should the value be 0|1 or true|false

Default would be SLD-enabled.

The code would check for sld_enabled being "0" to turn off SLD in !GetCapabilities.

For !GetMap and !GetFeatureInfo, should we return exception, or return as usual, with the change that the response would be as if SLD was not applied in the request?

Please advise.

tbonfort commented 12 years ago

Author: assefa Date: 2008/12/03 - 22:00 maps don't lie :)

It is I think a valid request. I had the same request from some one few months back where he wanted to have some layers flagged as not supporting the SLD. I think I left code inside mapogcsl.c (inside #ifdef (SLD_NOT_SUPPORTED) to show him how it would be done).

Couple of comments:

tbonfort commented 12 years ago

Author: dmorissette Date: 2008/12/03 - 22:08 I agree with adding this, at least at the map level. Not sure if it's worth the overhead to add it at the layer level as well... your call.

I think that should disable GetStyle as well... not sure about disabling GetLegendGraphic since this one is also useful to build a legend even in non-SLD contexts.

tbonfort commented 12 years ago

Author: assefa Date: 2008/12/03 - 22:19 One comment I forgot to make:

for GetLegendGraphic, I meant ignoring the SLD or SLD_BODY parameter is passed (or return an expetion of that is waht is decided for the other wms operations)

tbonfort commented 12 years ago

Author: dmorissette Date: 2008/12/03 - 22:37 worksforme

tbonfort commented 12 years ago

Author: tomkralidis Date: 2008/12/04 - 02:53

More observations / thoughts:

WMS 1.1.1 (01-068r3) specifies the following requests as SLD WMS only:

I interpret this as follows: if SLD is disabled, then these requests are not supported, and the SLD or SLD_BODY are ignored per comment:5

So then the question is what do we really want here:

Wonder what folks think here. I think option 2 would be sufficient. In any case, this won't be enabled unless explicitly set in the mapfile, so current functionality would not be affected.

tbonfort commented 12 years ago

Author: assefa Date: 2008/12/05 - 01:26 Tom, option2 should be enough I think.

tbonfort commented 12 years ago

Author: tomkralidis Date: 2009/02/26 - 01:04 Pushing to 6.0

tbonfort commented 12 years ago

Author: tomkralidis Date: 2009/03/09 - 22:00 Implemented: