Hi Martin,
Yes, this is how I read the specification, a value less parameter of any name
would be passed the input dataset. But this is now what I observed as I needed
to use the name "data" for the input data. I can do a little digging, but
things are working now and changing the parameter name to "data" wasn't an
issue.
We're using the rendering transformations in an attempt to pass data to
OpenLayers for use with Tim Shaub's recent work with HTML 5 Canvas layers and
in-the-browser raster operations. We want to pass in an image with rasterized
vectors where the pixel contains the value of an attribute assigned to the
vector that was rasterized to that pixel (with anti-aliasing for "pretty
pictures") so that we can assign color-maps in the browser. We also want to
take advantage or tile-caching on the WMS services as the rendering operation
is very expensive. The requirement that rasterized vectors are anti-aliased is
problematic. This causes issues as (1) the default alpha compositing operation
in the java.awt.Graphics2D is SRC_IN so pixel attribute values are modified
(when more then on vector intersects a pixel in the raster) by that operation
(we don't want this) and (2) most (all?) HTML5 canvas implementations
premultiply the alpha channel against the stored RGB data. To solve (1) we are
using a rendering transform with a custom java.awt.Composite implementation
passed to the Graphics2D instance to customize source to destination alpha
composite operations. Issue (2) is handled by remapping RGBA channels in the
output images (we can do this in the coverage returned by the rendering
transform but maybe also in the SLD RasterSymbolizer) so that the image
returned has a alpha of 255 (true alpha is stored in another channel), we then
remap alpha as needed in the HTML 5 canvas raster operation as it allows
manipulation of the image pixel components. So the use-case here is to vend
rasterized vector data to OpenLayers with attribute values (classes or indices)
assigned to pixels so that the color-map can be controlled in the browser. I
thought this would require some hacking against private API/implementations but
the implementation is a lot cleaner with the use of rendering transforms.
Tom
On Sep 26, 2012, at 11:46 AM, Martin Davis <mda...@opengeo.org> wrote:
> The SLD needs to have a value-less parameter with the same name as the
> process parameter that accepts the input dataset. AFAIK there is no
> restriction on what that name needs to be.
>
> Great that you're making use of RTs. It would be interesting to see some
> details or screenshots of what you're doing.
>
> Martin
>
> On Wed, Sep 26, 2012 at 3:22 AM, Tom Kunicki <tkuni...@usgs.gov> wrote:
>
> Went over the docs at
> http://docs.geoserver.org/stable/en/user/styling/sld-extensions/rendering-transform.html
>
> As stated:
> "Most rendering transformations take as input a dataset to be transformed.
> This is supplied via a special named parameter which does not have a value
> specified. The name of the parameter is determined by the particular
> transformation being used. When the transformation is executed, the input
> dataset is passed to it via this parameter."
>
> I was under impression that the reference to a "special named parameter which
> does not have a value specified" would mean simply a parameter w/o a value.
> It appears that the parameter must be named "data" (this is with GeoServer
> 2.2).
>
> This rendering transformation feature allows from some pretty amazing things.
> Thanks to those that requested and implemented this feature...
>
> --
> Martin Davis
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users