Geoserver allows to proxy WMS GetMap and GetFeatureInfo Requests to other WMS-Servers. Overall this works reliably and great.

However, I'm having trouble with a new service I'm integrating. No matter what I do, resulting PNG's always have a white background instead of transparent. The exact same Request pointed directly at the MapXtreme WMS Service works as it should, meaning the resulting PNG is transparent.

Everything is configured as it should, as far as I know. Moreover, it is configured exactly the same as an other working WMS (I don't know which technology is used there).

The thing that stood out for me in the log file was the BgColor parmeter:

2018-03-22 09:22:51,878 INFO [geoserver.wms] - 
Request: getServiceInfo
2018-03-22 09:22:51,880 DEBUG [geoserver.ows] - Getting layers and styles from LAYERS and STYLES
2018-03-22 09:22:51,880 DEBUG [geoserver.ows] - establishing null style for myws:mylayer
2018-03-22 09:22:51,881 DEBUG [geoserver.wms] - setting up map
2018-03-22 09:22:51,881 DEBUG [wms.map] - setting up 256x256 image
2018-03-22 09:22:52,326 INFO [geoserver.wms] - 
Request: getMap
    Angle = 0.0
    BaseUrl = http://my.wms.server:80/
    Bbox = SRSEnvelope[2717396.2137828125 : 2722683.5524514774, 1248403.6496270949 : 1255733.3898753526]
    BgColor = java.awt.Color[r=255,g=255,b=255]

What did I miss, why am I not getting transparent PNG's?


WMS Parameters are the following, sent to both services. One is transparent, one isn't:

VERSION: 1.1.1
FORMAT: image/png
LAYERS: my_layer
SRS: EPSG:2056
WIDTH: 256
BBOX: 2718121,1248957,2723408,1256286

URL encoded as: SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=my_layer&SRS=EPSG%3A2056&WIDTH=256&HEIGHT=256&BBOX=2718121%2C1248957%2C2723408%2C1256286


My colleague found out, MapXtreme produces RGB PNGs with NoData values instead of RGBA. Geoserver can not work with these, thus producing a PNG with a white background. There are some issues in GeoWebCache related to this. We are currently working to get this fixed in Geoserver. The other, easier option would be to configure MapXtreme WMS to produce the right output format for PNG. If this is at all possible, and if so, how?

  • can you add the request you make to geoserver and the request it is making to MapXtreme (just the parameters is fine). Also what SLD have you applied to the WMS layer? – Ian Turton Mar 22 '18 at 10:40
  • I don't have access right now, but format=image/png and transparent=true is set. The style parameter is empty in both cases, since Geoserver can not use Styles with Cascaded WMS Layers (stated in the docs). Does this help, or shall I lookup the actual parameters tomorrow? – Bruno Schäpper Mar 22 '18 at 13:43
  • the actual params will help, I'd forgotten about the styling being fixed – Ian Turton Mar 22 '18 at 14:01
  • @IanTurton I added the request parameters – Bruno Schäpper Mar 23 '18 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.