does geoserver (I'm using svn trunk) support a way to add something like a copyright notice or logo to each generated image, at a fixed position, like the lower right corner? I found one page suggesting you could do that using inline features in an sld but also stating that that info was wrong... I think because you cannot put gml geometries at a fixed position of your image, instead of at a georeferenced position? Anyone knows?
does geoserver (I'm using svn trunk) support a way to add something like a copyright notice or logo to each generated image, at a fixed position, like the lower right corner? I found one page suggesting you could do that using inline features in an sld but also stating that that info was wrong... I think because you cannot put gml geometries at a fixed position of your image, instead of at a georeferenced position? Anyone knows?
As far as I know there's no support for it in Geoserver... maybe you
can work around it on the client side and use DHTML layers to put the
image where you want it? I know, this won't be effective if you're trying to avoid image reuse without attribution...
If you want to cook a patch directly in geoserver instead,
the class you have to look at is DefaultRasterMapProducer in the wms
module.
One option could be to use the inline features to do that … some time ago I tryed to let GeoServer 1.5.x working with them, but I noticed that the inline feature module was abandoned for a while and not working perfectly. Hoever I didn’t try to print out a copyright, it should work.
If not, having some spare time, I can try to fix inline features.
does geoserver (I’m using svn trunk) support a way to add something like
a copyright notice or logo to each generated image, at a fixed position,
like the lower right corner? I found one page suggesting you could do
that using inline features in an sld but also stating that that info was
wrong… I think because you cannot put gml geometries at a fixed
position of your image, instead of at a georeferenced position? Anyone
knows?
As far as I know there’s no support for it in Geoserver… maybe you
can work around it on the client side and use DHTML layers to put the
image where you want it? I know, this won’t be effective if you’re
trying to avoid image reuse without attribution…
If you want to cook a patch directly in geoserver instead,
the class you have to look at is DefaultRasterMapProducer in the wms
module.
Ciao Vincent,
there are basically two approaches as Alessio an Andrea pointed out already:
1>Using inline feature to place text directly on the map. It worked
for me and Alessio but we had to tweak it a bit. As Alessio said, I do
not think it will work right out of the box.
2>Adding a watermark to each map as Andrea Aime said. This is actually
of medium difficulty, I can tell because we already implemented
something like it in the past.
If you need some more info, do not hesitate to contact me.
Regards,
Simone.
--
-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions
Thanks for the info and ideas, everyone. I hoped it would have been already implemented... For now, the two suggested options are a bit too much work, I have other more important things on my list. However, I might come back to this in the near future.
1 more question and 1 more option to add:
- I thought that, using inline features, these can only be placed by real coordinates, not by using image pixel coordinates? Thus when using inline features, I'll have to brew them on the client (e.g. using xslt, should be possible with mapbuilder) to have the copyright notice appear like always at the bottom of my image (my mapbuilder app is resizable, and so the images requested from geoserver do not have a fixed size).
- I have been thinking of a third (and maybe easiest) solution: write a proxy script (python, php) or servlet that forwards the request to geoserver, overlay any watermarking, and then push the result down the http line.
Cheers,
Vincent.
Simone Giannecchini wrote:
Ciao Vincent,
there are basically two approaches as Alessio an Andrea pointed out already:
1>Using inline feature to place text directly on the map. It worked
for me and Alessio but we had to tweak it a bit. As Alessio said, I do
not think it will work right out of the box.
2>Adding a watermark to each map as Andrea Aime said. This is actually
of medium difficulty, I can tell because we already implemented
something like it in the past.
If you need some more info, do not hesitate to contact me.
Thanks for the info and ideas, everyone. I hoped it would have been already implemented... For now, the two suggested options are a bit too much work, I have other more important things on my list. However, I might come back to this in the near future.
1 more question and 1 more option to add:
- I thought that, using inline features, these can only be placed by real coordinates, not by using image pixel coordinates? Thus when using inline features, I'll have to brew them on the client (e.g. using xslt, should be possible with mapbuilder) to have the copyright notice appear like always at the bottom of my image (my mapbuilder app is resizable, and so the images requested from geoserver do not have a fixed size).
- I have been thinking of a third (and maybe easiest) solution: write a proxy script (python, php) or servlet that forwards the request to geoserver, overlay any watermarking, and then push the result down the http line.
Indeed, thought it might be easier only if you're playing with a subset
of the formats that Geoserver handles when returning from a getMap
request (SVG anyone?).
Please open a JIRA request for this functionality, we may consider building it sooner or later if a reminder is stuck in our issue
management system
Thanks for the info and ideas, everyone. I hoped it would have been already implemented... For now, the two suggested options are a bit too much work, I have other more important things on my list. However, I might come back to this in the near future.
1 more question and 1 more option to add:
- I thought that, using inline features, these can only be placed by real coordinates, not by using image pixel coordinates? Thus when using inline features, I'll have to brew them on the client (e.g. using xslt, should be possible with mapbuilder) to have the copyright notice appear like always at the bottom of my image (my mapbuilder app is resizable, and so the images requested from geoserver do not have a fixed size).
- I have been thinking of a third (and maybe easiest) solution: write a proxy script (python, php) or servlet that forwards the request to geoserver, overlay any watermarking, and then push the result down the http line.
Indeed, thought it might be easier only if you're playing with a subset
of the formats that Geoserver handles when returning from a getMap
request (SVG anyone?).
Ha, good point. Though for me something just handling 'normal' images (jpeg, png) would suffice, and all other formats could just be forwarded unaltered.
Please open a JIRA request for this functionality, we may consider building it sooner or later if a reminder is stuck in our issue
management system
Thanks for the info and ideas, everyone. I hoped it would have been already implemented... For now, the two suggested options are a bit too much work, I have other more important things on my list. However, I might come back to this in the near future.
1 more question and 1 more option to add:
- I thought that, using inline features, these can only be placed by real coordinates, not by using image pixel coordinates? Thus when using inline features, I'll have to brew them on the client (e.g. using xslt, should be possible with mapbuilder) to have the copyright notice appear like always at the bottom of my image (my mapbuilder app is resizable, and so the images requested from geoserver do not have a fixed size).
You also might just add it directly to the mapbuilder code, to always display a notice. This is how google maps handles it, it's completely on the client side, not the server side. This is also nice for when you get tiling stuff going...
This goes in line with what I think is needed for a wms sanity check:
- support for the specification of the uom of the bounds of a GetMap request
(for width and height)
- support for the specification of DPI (so you can ask for print quality pdf,
postcript, etc)
- SLD 1.1 allows uom on Style elements, that's good
- Support for uom in InlineFeature, so you can draw a north arrow or (c)
notice in pixel coordinates, or cm, etc
SLD change request someone?
Gabriel
On Monday 20 November 2006 16:06, Andrea Aime wrote:
Vincent Schut ha scritto:
> Hi all,
>
> does geoserver (I'm using svn trunk) support a way to add something like
> a copyright notice or logo to each generated image, at a fixed position,
> like the lower right corner? I found one page suggesting you could do
> that using inline features in an sld but also stating that that info was
> wrong... I think because you cannot put gml geometries at a fixed
> position of your image, instead of at a georeferenced position? Anyone
> knows?
As far as I know there's no support for it in Geoserver... maybe you
can work around it on the client side and use DHTML layers to put the
image where you want it? I know, this won't be effective if you're
trying to avoid image reuse without attribution...
If you want to cook a patch directly in geoserver instead,
the class you have to look at is DefaultRasterMapProducer in the wms
module.