[Geoserver-users] Layer Ordering and Opacity Issues

Hi,
I am running GeoServer 1.7.2. The data is the OpenStreetMap and is save in a PostGIS database. The server is running CentOS. Its a basic setup.
In my map I need to display the park layer behind the road layer because I display roads on top of the parks. All of my layers are grouped in a WMS layer group and cached using the GeoWebCache plugin. The map can be found here → http://demo.opengeo.org/openstreetmap/

As you can see the parks layer gets washed out. The orginal color of the parks can be found here → http://demo.opengeo.org/openstreetmap/parks.html.
Is this a bug? Or is this a configuration issue on my part? Please let me know.

Ivan Willig
http://opengeo.org
Expert service straight from the developers

Hi Ivan,

I believe the order in Which you configure you’re BaseMapGroup is of influence. The first layer is rendered at the bottom, the second on top of that one.

Hope this helps

Regards Kris

From: Ivan Willig [mailto:iwillig@anonymised.com]
Sent: Wednesday, January 28, 2009 1:38 AM
To: geoserver-users@lists.sourceforge.net
Subject: [Geoserver-users] Layer Ordering and Opacity Issues

Hi,
I am running GeoServer 1.7.2. The data is the OpenStreetMap and is save in a PostGIS database. The server is running CentOS. Its a basic setup.
In my map I need to display the park layer behind the road layer because I display roads on top of the parks. All of my layers are grouped in a WMS layer group and cached using the GeoWebCache plugin. The map can be found here → http://demo.opengeo.org/openstreetmap/

As you can see the parks layer gets washed out. The orginal color of the parks can be found here → http://demo.opengeo.org/openstreetmap/parks.html.
Is this a bug? Or is this a configuration issue on my part? Please let me know.

Ivan Willig
http://opengeo.org
Expert service straight from the developers

Ivan Willig ha scritto:

Hi,
I am running GeoServer 1.7.2. The data is the OpenStreetMap and is save in a PostGIS database. The server is running CentOS. Its a basic setup.
In my map I need to display the park layer behind the road layer because I display roads on top of the parks. All of my layers are grouped in a WMS layer group and cached using the GeoWebCache plugin. The map can be found here -> http://demo.opengeo.org/openstreetmap/

As you can see the parks layer gets washed out. The orginal color of the parks can be found here ->

The color is being washed out because of a Z order or an opacity issue,
it's clear looking at the map that the green and the gray are mixing
togheter.

This can happen in two situations:
- the park layer is above the land (gray) layer, but its opacity is not
   100%. This happens only if you manually specified a fill-opacity
   other than 1 (1, full solid, being the default)
- the park layer is below the land one, and the land is not fully
   opaque, allowing the green to show through the gray.

To have parks (and lakes too) retain their colors have the park layer
sit on top of the land one, and have their fill opacity set to 1
(or just don't set it).

Also, as a general rule of thumb, try to avoid playing with opacity
unless you really need to see thru layers, a non solid color
takes way longer to render. In this specific case you have
everything tile cached, so it's not that much of an issue, besides
the fact that it'll take longer to seed of course.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.