On Wed, Feb 29, 2012 at 8:53 PM, Martin Davis <[email protected]> wrote: > The invertQuery method in Rendering transformation processes is very useful > (in fact, essential). But I've just realized a Catch-22 with it. > > I need to expand the bounding box of the query (to capture more features for > accurate surface generation). I want the user to be able to specify the > size of the expansion. The obvious place to do this is in the process > parameters. But - the invertQuery method is called *before* the parameters > are supplied to the execute method! So for the first call at least, the > query is not expanded by the correct amount. (The process class saves the > expandBy parameter in an instance variable, so subsequent calls operate > correctly). > > Is there a better way to do this?
A stateful transformation is dangeours business, as you have just one instantiated, ever (styles are cached, and so is whatever is inside of them), and it serves all concurrent requests for all possible requests, maybe for different maps or with different parameters. Long story short, do whatever you need to in order to make the transformation stateless. The rendering transformation framework was setup, proposed and accepted by the community in this geotools improvement proposal: http://docs.codehaus.org/display/GEOTOOLS/Rendering+transformations I see you are struggling with the current design, all you can do to make it better is to follow the same road I walked when setting up rendering transformations: check your needs, propose a design, setup a improvement proposal, discuss it and get it approved My main driver were vector to vector and raster to vector transformations, with a focus on making it possible and making it reusable as WPS processes and transformations at the same time. Your setup is different, you are trying to walk the opposite direction, want it to be easier, and it seems, setup in such a way that you don't need to care about thread safety. The improvement proposal is the only way to revise an existing API (or to roll new API), so that's really your only option. 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 ------------------------------------------------------- ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
