[Geoserver-users] Using and styling rasters from WMS

Hi all!

I am trying to do the following:

In my LayerGroup, I need to include a hillshade. I can get it from a WMS and
publish it as a layer in Geoserver. When adding the layer to the Layergroup,
it will get the default 'raster' SLD as style. When using the Layergroup (or
trying to) I get the following error:

...
<ServiceException>
      The requested Style can not be used with this layer. The style
specifies an attribute of geom and the layer is: vino_2m
</ServiceException></ServiceExceptionReport>

Looks weird to me, the default 'raster' SLD-style does not specify 'geom' or
anythin else, just the opacity is set.

In fact, the only thing I want to do with the WMS-provided layer is to put
it in the right place in the Layergroup and set its opacity. If this can be
done in any other way, please feel free to suggest.

Best regards,

Jakob

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-and-styling-rasters-from-WMS-tp5056929.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Thu, May 30, 2013 at 12:47 PM, Jakob Ventin <jventin@anonymised.com> wrote:

In fact, the only thing I want to do with the WMS-provided layer is to put
it in the right place in the Layergroup and set its opacity. If this can be
done in any other way, please feel free to suggest.

Layers cascaded from another WMS cannot be styled, in any way, they are
displayed as is.
The original plan was to wait for funding and implement the selection among
the named
styles the cascaded server exposes (a WMS server can allow the choice among
a list
of styles) or detect that the remote server can do dynamic styling using
SLD_BODY,
and cascade the style which has been locally assigned.

None of the two received any funding so far, so the code does not apply any
sort of
styling.

The idea of applying the local raster style on the returned image has never
been on the table,
but I see it can have uses, at least limited to opacity control (the other
features are either useless,
e.g. colormap, or difficult to get right, e.g. channel selection, as we
don't control the band structure
returned by the remote server, which could legitimately stop returning an
alpha band or switch
from RGB to paletted and vice versa, there are no promises of stability of
the band structure in the WMS
contract).

However... don't see how to do that while at the same time not preventing
the selection of a remote style
or the cascade of a style via SLD_BODY. Maybe limited to cascaded wms
layers the GUI could
propose a "opacity" configuration for the layer. Regardless, it needs
someone to code this new feature.

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------