Great! Thanks for the help.
rkgeorge
-----Original Message-----
From: geoserver-users-admin@lists.sourceforge.net
[mailto:geoserver-users-admin@lists.sourceforge.net] On Behalf Of Chris
Holmes
Sent: Friday, February 24, 2006 12:30 PM
To: Randy George
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] re: opaque="1"
I don't think you would really want to set opaque=1, and doing so
doesn't really have much to do with cascading. When we have raster
support I imagine we may make opaque=1 for those layers, but basically
it should be set when the majority of the image is covered, which is
generally not the case in vector data.
I think what you're looking for is the 'transparent' parameter for a
GetMap request. From the WMS 1.1.1 spec:
'When TRANSPARENT is set to TRUE and the FORMAT parameter contains a Picture
format (e.g., image/gif), then a WMS shall return (when permitted by the
requested
format) a result where all of the pixels not representing features or
data values in that
Layer are set to a transparent value. For example, a "roads" layer would
be transparent
wherever no road is shown. When TRANSPARENT is set to FALSE, those
pixels shall
be set to the value of BGCOLOR (Section 7.2.3.10).
When the Layer has been declared as "opaque" as in Section 7.1.4.6.3,
then significant
portions, or the entirety, of the map may not be able to made transparent.'
I think this is the general approach for overlaying WMS images on top of
one another, indeed doing that is exactly what the WMS spec was designed
for... I believe on the backend it's telling servers to do exactly what
you are suggesting. I think most WMS servers do accept that parameter.
best regards,
Chris
Randy George wrote:
Hi,
Another question.
Is it possible to set the WMS opaque="1" true in Geoserver?
I would think since the Geoserver datastores are vector this
could be done for image/png
It would be useful for overlaying disparate WMS sources. This is only
because there are so few WFS sites currently. So far I have not run across
any WMS that actually had an opaque="1" attribute.
I guess the WFS cascade supercedes this by letting a Geoserver WFS become
a
datastore in its own right. If I understand how this would work a
Geoserver
WFS could be set up with a featuretype, then a datastore could be added
that
uses this WFS featuretype, which in turn could then be styled and rendered
over WMS.
As far as interoperability, cascades are actually better, but I had a
client
wonder about adding multiple WMS layers together from multiple sources.
The
only way I could see to do this now, is to take say a USGS Atlas layer as
image/jpeg and using server side JAI convert background pixels to alpha 00
-
perhaps #FFFFFF pixels to #FFFFFF00 which are then exported as image/png
(a
potentially evil server side resource hog). This way at least disparate
WMS
layers could be overlaid.
However is there a better approach?
rkgeorge
--
Chris Holmes
The Open Planning Project
thoughts at: http://cholmes.wordpress.com