2

anyone here has used watermarking in geoserver? I have successfully set watermark to my WMS layer, but in my OpenLayers 3 project, I use 'Tiled': true WMS setting and my GeoWebCache doesn't display any watermark.

I have same problem in the layer preview mode of GeoWebCache. Does watermarking work only with "true" (=singletile) WMS?

I would like to use watermark for example for center of every rendered tile (or center of every fifth tile,..). Is there option to render watermark with GWC layer cache?

Thanks for help.

1

Watermarking with integrated GWC seems to be rather unreliable. Bear in mind how watermarking works: it is set at WMS service level and as you have noticed it works well with a single tile WMS client and one watermark is burned into each map that is sent from the WMS. When using tile cache the integrated GeoWebCache is making GetMap requests to WMS. With default settings (Tile caching - Caching defaults) a metatile size of 4x4 is used. It means that WMS requests are bigger than the tiles and each request covers 16 tiles. If watermark is little, one tile out of 16 will get a watermark and the rest 15 will not.

I was thinking that it should be possible to burn a watermark into all the tiles by setting the metatile size into 1x1 and watermark location into "Middle center". With that setting tiles should be requested one by one. However, there seems to be a bug in GeoServer and GWC does not use WIDTH=256&HEIGHT=256 in the GetMaps it is generating. Instead it is making requests as WIDTH=1024&HEIGHT=256 which meas that still only 2 tiles out of 4 will get a watermark.

You wonder why 2 out of 4 and not just one. That's because I set watermark into Middle center. The second and third tile in a row of 4 both get a half of a watermark image.

enter image description here

I recommend you to repeat my test with the topp:states layer. Delete all the tiles from the cache every time you have changed your settings. Collect some information and write to geoserver-users list about your findings. I am pretty sure that this is a bug and you can file an issue into GeoServer issue tracker.

Your Answer

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

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