[Geoserver-users] Watermarking - but only some layers

Hi List,
I’m interested in adding Watermarking to my WMS and TMS/WMTS outputs, but only for specific layers. The documentation says it can only be on/off for everything - has this changed? Is there a way to “cheat” and only get it on for certain layers?

Could I create an SLD that had the watermark in it and add that to a layergroup (I only want the watermark on 2 or 3 layers and they’re all layergroups already). What would be the best way to do this?

Thanks,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

On Mon, Oct 28, 2013 at 4:52 PM, Jonathan Moules <
jonathanmoules@anonymised.com> wrote:

Hi List,
I'm interested in adding Watermarking to my WMS and TMS/WMTS outputs, but
only for specific layers. The documentation says it can only be on/off for
everything - has this changed? Is there a way to "cheat" and only get it on
for certain layers?

I can only think of ugly workarounds

Could I create an SLD that had the watermark in it and add that to a
layergroup (I only want the watermark on 2 or 3 layers and they're all
layergroups already). What would be the best way to do this?

Create a polygon as large as earth, and then add a graphic fill with an
image that
has the watermark, making it semi-transparent with a photoshop like program.

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Hi Andrea,
That’s pretty much what I was thinking. But I don’t need the entire planet; just a relatively small box.
Thanks for confirming though.

Semi-related question - when adding the shapefile there are two checkboxes:
“Use memory mapped buffers”

“Cache and reuse memory maps”

What do these do? The help basically says “maps memory buffers”. What does that mean in non-Java-programmer? :slight_smile:

For anyone interested, the following SLD works quite well (well, as well as a Watermark can):

<?xml version="1.0" encoding="UTF-8"?> WaterMark 15100

se:PolygonSymbolizer
se:Fill
se:GraphicFill
se:Graphic
se:ExternalGraphic
<se:OnlineResource xlink:type=“simple” xlink:href=“file:///d:/GeoServer_Symbology/WCC_Watermark.png”/>
se:Formatimage/png</se:Format>
</se:ExternalGraphic>
se:Size100</se:Size>
</se:Graphic>
</se:GraphicFill>

<se:SvgParameter name=“fill-opacity”>0.1</se:SvgParameter>
</se:Fill>
<se:VendorOption name=“graphic-margin”>100</se:VendorOption>

</se:PolygonSymbolizer>

</se:Rule>
</se:FeatureTypeStyle>


Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

···

On 28 October 2013 16:01, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Mon, Oct 28, 2013 at 4:52 PM, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

Hi List,
I’m interested in adding Watermarking to my WMS and TMS/WMTS outputs, but only for specific layers. The documentation says it can only be on/off for everything - has this changed? Is there a way to “cheat” and only get it on for certain layers?

I can only think of ugly workarounds

Could I create an SLD that had the watermark in it and add that to a layergroup (I only want the watermark on 2 or 3 layers and they’re all layergroups already). What would be the best way to do this?

Create a polygon as large as earth, and then add a graphic fill with an image that
has the watermark, making it semi-transparent with a photoshop like program.

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Mon, Oct 28, 2013 at 5:41 PM, Jonathan Moules <
jonathanmoules@anonymised.com> wrote:

Hi Andrea,
That's pretty much what I was thinking. But I don't need the entire
planet; just a relatively small box.
Thanks for confirming though.

Semi-related question - when adding the shapefile there are two checkboxes:
"Use memory mapped buffers"
"Cache and reuse memory maps"
What do these do? The help basically says "maps memory buffers". What does
that mean in non-Java-programmer? :slight_smile:

It enables a special type of access where the kernel of the OS gives the
program the illusion that the
file is fully available in memory, and makes a better job at caching that
file in memory.
Except from crippled operating systems (aka windows) where the OS actually
checks if there is enough
memory to really put it in memory.

Long story short, don't use it on Windows

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------