Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Ok, here's our problem. We have a mapping application at http://explorer.geowessex.com which uses OpenLayers and GeoServer for delivering the data. The data is potentially endless and we have very little control on what goes in. The data is served from an Oracle Database and published to GeoServer and also (in instances where it is necessary) cached off in GeoWebCache. The problem is trying to work out the correct image format to deliver the 256x256 tiles for these vector layers. We recently switched to PNG8 as this delivers tiles four times smaller than PNGs with what we thought was very little impact. Sadly we recently spotted that if we set the option Transparent to True in our GetMap request we lose any translucency that there should be on the layer, and since we are tiling layers over the top of each other, we need that option!

Here are two examples;

With 'transparent' set to false we can see the pink lines underneath the pink polygon looking thing, but the background is not transparent, so when put on a map it covers all the mapping behind it. Not good.

http://wms.geowessex.com/geoserver/wms?LAYERS=dev%3AALL_STYLE_TEST_TABLE4720,gis:ROUTE&CACHE=false&TRANSPARENT=false&FORMAT=image%2Fpng8&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=-264166.03050625,6594375.6422375,-254382.0908875,6604159.5818563&WIDTH=256&HEIGHT=256&format_options=antialias:none

With 'transparent' set to True we cannot see the pink under the pink polygon looking thing, but the background is transparent, so when put on the map you can see other layers. Better, but still not good.

http://wms.geowessex.com/geoserver/wms?LAYERS=gis:ROUTE,dev%3AALL_STYLE_TEST_TABLE4720&CACHE=false&TRANSPARENT=true&FORMAT=image%2Fpng8&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=-264166.03050625,6594375.6422375,-254382.0908875,6604159.5818563&WIDTH=256&HEIGHT=256&format_options=antialias:none

Of course, one way to solve this problem is to switch all vector data to PNGs, which work perfectly, like this

http://wms.geowessex.com/geoserver/wms?LAYERS=gis:ROUTE,dev%3AALL_STYLE_TEST_TABLE4720&CACHE=false&TRANSPARENT=true&FORMAT=image%2Fpng&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=-264166.03050625,6594375.6422375,-254382.0908875,6604159.5818563&WIDTH=256&HEIGHT=256&format_options=antialias:none

But as you will see if you look at the size of the response, this tile on it's own is 256.6KB, where as the PNG8s were 64.4KB. There is every possibility that someone might actually want 10 layers turned on at once, with each layer maybe needing about 30 tiles each depending on the users screen size you can see the amount of data that needs to be sent starts hitting many, many Megabytes a time and over the course of one session the user might have clocked a total download running into hundreds of megabytes. This is really bad and we cannot find a solution that both provides smallish tiles sizes and the ability to be transparent and translucent at the same time. Does anyone have any ideas on this? What do other mapping systems use? FYI I have looked at the all purpose GeoServer bible 'GeoServer on Steroids' as well as a number of other similar PDFs to very little avail. None seem to hit the same problem we do and I can't work out what we are doing differently! Also FYI we will be switching our OS Basemaps/Aerial Photography and other Raster datasets to JPEG soon which will save a lot of bandwidth/frustration, but we can't do the same with vectors :(

Essay finsihed, cheers for reading and any thoughts, wisdom, links to similar GeoServer powered mapping applications and comments are much appreciated and will be rewarded with appropriate upvotes ;)

share|improve this question
    
What is the server specs for the geoserver? image pyramid layers might help to: smathermather.wordpress.com/category/gis/geoserver-gis –  Mapperz May 28 '12 at 14:34
    
Runs on Windows Server 2008 64bit, 4GB RAM (hoping to get this doubled soon), 2.4GHz Intel Xeon Processor. GeoServer 2.1.3, JVM Version 1.6.0_29 (Java HotSpot(TM) Client VM). I'll have a look at that link when I am bakc in work tommorow :) –  Rob Quincey May 28 '12 at 15:21
add comment

1 Answer

up vote 4 down vote accepted

Support for translucency in PNG8 has been added in 2.2.x: http://geo-solutions.blogspot.it/2012/05/developers-corner-geoserver-stunning.html

share|improve this answer
    
Ace! I'd actually read this article but I assumed I was already on 2.2.x. I was wrong! Thanks for this, and all the other GeoServer help you have unwittingly given me from the mass of other forum posts, answers and presentations I've found of yours all over the interweb, I wish I could upvote you twice :) –  Rob Quincey Jun 7 '12 at 7:49
    
Do you happen to know any timescales for when 2.2.x will become a stable release? –  Rob Quincey Jun 18 '12 at 7:46
1  
We're going to release a RC within a week (hopefully), then it's just a matter of how many bug reports we get and thus how many RCs we have to put out –  Andrea Aime Jun 19 '12 at 6:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.