On Mon, Sep 19, 2011 at 2:38 PM, Arne Schilling <as@anonymised.com> wrote:
Hi,
thank you. Of course it should not compromise other applications.
Alternatively I could try to use an SLD, which is an optional WMS parameter.
Probably you already had the discussion. It seems that none of the optional
parameters are actually forwarded to a remote WMS.
Indeed none of them is. Nope, don't remember having this discussion,
WMS cascading is pretty new, relative few people used it so far
Since a GeoTools routine is used in this context
(org.geotools.coverage.grid.io.AbstractGridCoverage2DReader), I am puzzled
and don’t even know how to hack this, let alone a usable implementation of
SLD forwarding. In the current doc I read that styling remote layers is not
possible (as of yet).
Styling remote layers is going to be rather messy.
WMS has a concept of named styles, and each layer can be associated
to different named styles: that's the basic level, using these named styles.
Unfortunately a style in GeoServer is a SLD instead, so we have a mismatch
in our configuration subsytem that can be solved only by changing it, allowing
both named and SLD styles.
Then we could have cascading try to send down a SLD to the remote server.
This gets even messier, first off we don't know if the remote server accepts
SLD, and what version it accepts, SLD 1.0 or SLD 1.1
To aggravate the situation we have 3 different ways to send down the SLD,
SLD_BODY, which works only if the SLD is really small, &sld=url, which
assumes the remote WMS server can call back GeoServer on a url (which
is not something one can assume in general due to firewalls) or GetMap
POST, which only a few servers support.
Again, not easy to figure out which of the above is supported and will work.
If you are cascading more than one layer, which is something the current
code optimizes for by making a single request, the above requires all
the layers to be specified in SLD (library mode), whether we want to specify
the SLD just for one or for all.
So, cascading SLD gets really messy, really quick.
I believe that having a whiltelist of params to cascade in the wms store
configuration would be the way to go, along with code to preserve the params
(instead of ignoring them) and changes to the geotools code to accept these
vendor params is actually going to be easier.
But it will still be quite a bit of work, someone that knows his way in both
geotools and geoserver will still require a few days of work to make it working
and test it.
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------