On Thu, Sep 20, 2012 at 12:25 AM, Ian Schneider <ischnei...@opengeo.org>wrote:

> In tracking down why a PointStacker transform isn't working, I found
> that the StreamingRenderer adapts the original query then reapplies it
> to the transformed feature collection. StreamingRenderer:2236 on 8.x
> is the start of the relevant block of code.
>
> The issue in my case is that the original query[1] contains an
> attribute that the PointStacker doesn't preserve and hence the second
> query on the transformed collection yields nothing.
>
> Certainly one improvement would be to allow PointStacker to preserve
> one of the aggregated feature's attributes to represent the new
> stacked output feature, but my question is:
>
> Why is the query being run a second time? I could see that preserving
> the BBOX would be useful for transformations that create new features
> that lie outside the initial BBOX but it seems like the other work is
> redundant as the features have already been filtered via the first
> query. I admit I might be short-sighted here.
>

Looked into it (GEOT-4281) and figured out what was going on.
The re-quering was a bad attempt to maintain the layer definition query
working, but it was not really working.

Martin's suggestion not to do the requery was also pointing in the
wrong direction, it would have resulted in ignoring the layer definition
query
for layers with rendering transformations.

No, the thing is that the streaming renderer was building a query mixing
togheter the query that is defined against the layer, and the one that
can be derived by the bbox and the SLD.
The two queries can be mixed and applied on the source in case of no
rendering transformation, but in case of transformation, they have to
be managed separately:
- the feature layer query has to be applied _before_ the transformation
runs
  (along with the bbox one, or the rendering query inverted by the RT if
  it provides that functionality)
- the "rendering" query has to be applied after the transformation runs

I've created a test rendering transformation changing the name of an
attribute
and prepared tests, things seem to be working fine.

I've committed the change on trunk only at the moment, can you let me
know if this fixes your issue?

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

-------------------------------------------------------
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to