What Is Watermarking?
Watermarking is the process of embedding an image into a map. This is a new feature as of version 1.6.3. Watermarks are usually used to brand one's map, or to reduce unauthorized use of maps and images.
Configuring watermarking is done through the Web administration console. Click on Config (log in if necessary), then click on WMS, and then Rendering. The Web Map Server Rendering configuration window has six options, the bottom four of which are relevant to watermarking.
|
| Figure 1: Web Map Server Rendering window containing watermarking settings |
| Option |
Description |
| Watermarking |
This option turns on watermarking. When Global Watermarking is checked, all maps rendered through this instance of GeoServer will use the same watermark. (It is not currently possible to specify watermarking on a per-layer or per-feature basis.) |
| Watermark URL |
This is the location of the the graphic for the watermark. The graphic can be referenced in three ways:
- Absolute link to a local file on GeoServer (Ex: file:/path/to/file)
- Relative link to a file inside GeoServer's data directory (Ex: www/file)
- URL (Ex: hxxp://www.example.com/folder/file)
 | There are advantages and disadvantages to each of these methods. Using either an absolute or relative link to a file, GeoServer keeps a cached copy of the graphic in memory, and won't continually link to the original file. (This does mean that if the original file is subsequently deleted, GeoServer won't notice or care until edits to the watermarking options are made.) Using a URL might seem more convenient, but it is much more I/O intensive: GeoServer will load the image every single time it is requested. Also, should the URL cease to be valid, the layer will no longer display properly. |
|
| Watermark transparency (0-100) |
This determines the opacity level of the watermark. Higher numbers indicate increased transparency. (0 = full opacity, 100 = invisible) |
| Watermark position |
This specifies the position of the watermark relative to the WMS request (see A Note About Tiling, below). The nine radio boxes indicate which side/corner to place the graphic (top-left, top-center, top-right, etc). The default is bottom-right. Note that the watermark will always be displayed flush with the boundary, so if some extra space is desired, the change must be made to the graphic itself. |
When all changes are made, click Submit, then Apply and Save as usual to update GeoServer's configuration.
 | A Note About Tiling
Watermarking settings have different visual effects depending on whether a layer is set to be tiled or untiled. (This is the only aspect of watermarking that is layer-specific.) Rendering an untiled map will cause the watermark to appear at the edge of the window, once. Rendering a tiled map, however, will cause the watermark to appear in each tile. (This is similar to the way that Google Maps embeds a very faint copyright notice in their Satellite imagery.) In this case, the watermark position would apply to the position of the watermark relative to each tile, rather than the entire window. The reason for this behavior is that an untiled map is one WMS request, whereas a tiled map contains many WMS requests. In both cases, the watermark is just rendered in each WMS request.
|
|
| Figure 2: Tasmania with untiled watermark (aligned bottom right, transparency=0) |
|
| Figure 3: Tasmania with untiled watermark (aligned bottom right, transparency=90) |
|
| Figure 4: Tasmania with tiled watermark (aligned bottom right of each tile, transparency=90) |