Hi Ian,
Yes, ISO 19115 states following about GetCapabilities and resulting WMS layer style clause:
Style
|
Required to have name/title elements, if only one style it is default
|
Optional
|
But it’s not about resulting style info (as it’s Optional anyways), it’s rather how Geoserver handles default and/or non-existing layer requests under the hood.
Regards,
Maksim Sestic
From: Ian Turton [mailto:ijturton@anonymised.com]
Sent: Friday, June 21, 2013 15:02
To: Maksim Sestic
Cc: Jonathan Moules; geoserver-users
Subject: Re: [Geoserver-users] LayerGroup default style
You can’t ask for styles that are not listed in the capabilities document against that layer.
Ian
On 21 June 2013 13:47, Maksim Sestic <max@anonymised.com> wrote:
Hi Jonathan,
To the end-user of the WMS, a LayerGroup is actually single layer, so in theory they should be able to specify a style when requesting it. However, I’ve just tested it and the style is completely ignored.
Strictly speaking this seems contrary to what the WMS spec says should happen.
My thoughts exactly.
Regards,
Maksim Sestic
From: Jonathan Moules [mailto:jonathanmoules@anonymised.com]
Sent: Friday, June 21, 2013 13:59
To: Maksim Sestic
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] LayerGroup default style
Hi Maksim
With regards to LayerGroup style – I guess it should have one in case Geoserver publishes it as a Single layer (?)… although a “shallow” one since setting SLD at root level should override containing layer styles.
That is something that I was scratching my head about reading the spec. It clearly says:
“Comma-separated list of one rendering style per requested layer.”
To the end-user of the WMS, a LayerGroup is actually single layer, so in theory they should be able to specify a style when requesting it. However, I’ve just tested it and the style is completely ignored.
Strictly speaking this seems contrary to what the WMS spec says should happen.
But for bonus fun, as you’ve discovered, if the style you specify doesn’t exist, GeoServer will give you an exception. So LayerGroups seem to be the worst of both worlds:
To me the solution is actually for LayerGroups to completely ignore the style parameter, even if the given value is invalid. They’re already breaking the spec, why not go one step further. 
Of course, the solution for you is to fill in anything you want as the style, just make sure it exists. “line” “point” etc as the undeleatable GeoServer defaults would be good choices to use.
Regards,
Jonathan
On 21 June 2013 11:21, Maksim Sestic <max@anonymised.com> wrote:
Hi Jonathan,
Yes, I agree, MapGuide is missing a point with “styles=default”. Alas, this happens on both open source and commercial MG platforms I’m dealing with. This actually has to do with FDO provider for WMS (http://fdo.osgeo.org/) under the hood. I’m currently trying to figure out whether it’s possible to override such beahviour using additional WMS parameters, but it’s less likely.
With regards to LayerGroup style – I guess it should have one in case Geoserver publishes it as a Single layer (?)… although a “shallow” one since setting SLD at root level should override containing layer styles.
Regards,
Maksim Sestic
From: Jonathan Moules [mailto:jonathanmoules@anonymised.com]
Sent: Friday, June 21, 2013 11:39
To: Maksim Sestic
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] LayerGroup default style
Hi Maksim,
Several thoughts:
- MapGuide Server’s behaviour seems odd. The WMS spec is very clear: if you ask for a style that doesn’t exist then an exception shall be raised. So filling in “default” seems odd as there is no guarantee that a “default” will exist. Blank is the logical choice - the spec is clear:
“A client may request the default Style using a null value (as in “STYLES=”).”
So even though it’s a “may” not a “shall”, MapGuide Server seems to be doing it wrong.
-
Can’t you use the “SLD” parameter to point to a “default” SLD of your own choosing?
-
I don’t think a LayerGroup can have a single style, although for scenarios like this I imagine it should be possible to, but then, how do you create a single SLD that encompasses all of the different components?
Regards,
Jonathan
On 17 June 2013 16:25, Maksim Sestic <max@anonymised.com> wrote:
Is it possible to name LayerGroup’s “global” style somehow? There are
applications (e.g. MapGuide Server) that require style name, and if not
explicitly specified they query for “default” (thus “style=default” in URL
params). Once GeoServer receives a query for LayerGroup’s style named
“default” it throws “ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: No such style: default” exception.
With kindest regards,
Maksim Sestic
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/LayerGroup-default-style-tp5060628.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.
This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
Ian Turton