On Thu, Feb 23, 2012 at 12:53 AM, Martin Davis <[email protected]> wrote:
> I'm working on a GSProcess which is being used as a RenderingTransformation,
> to produce a GridCoverage output.  I want to create the output grid with the
> size of the image requested.  To do this I need to keep the GridGeometry
> provided in the invertQuery() method for later use in the execute() method.

That is a way, but not a nice one as you noticed.

If you look at how the raster georeferencing process
is used in geometry transformations (SF metro project) you'll see that
on trunk GeoServer sets a few extra enviroment variables that you
can grab with the "env" function, including the width and height of the
output image.

Here are the params:

        // setup some SLD variable substitution environment used by
rendering transformations
        EnvFunction.setLocalValue("wms_bbox", mapContent.getRenderingArea());
        EnvFunction.setLocalValue("wms_crs",
mapContent.getRenderingArea().getCoordinateReferenceSystem());
        EnvFunction.setLocalValue("wms_srs", mapContent.getRequest().getSRS());
        EnvFunction.setLocalValue("wms_width", mapContent.getMapWidth());
        EnvFunction.setLocalValue("wms_height", mapContent.getMapHeight());

Hope this helps

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

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

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to