I am never quite sure *where* we should simplify filters. I know Andrea
simplifies in StreamingRenderer somewhere - let me look up the code.

        // simplify the filter
        SimplifyingFilterVisitor simplifier = new
SimplifyingFilterVisitor();
        Filter simplifiedFilter = (Filter)
query.getFilter().accept(simplifier, null);
        query.setFilter(simplifiedFilter);

Hopefully that is clear?

Given the choice between the two I would simplify in GetMap, rather than in
each and every DataStore.

--
Jody Garnett

On 2 January 2015 at 11:03, Torben Barsballe <[email protected]>
wrote:

> In the org.geoserver.wms.GetMap class, the method buildLayersFilters (line
> 676) uses an and to combine two filters. This ends up ANDing two INCLUDE
> filters. When the new gt-property-ng implementation goes to calculate
> bounds for this query, it checks to see if the Query has an Include filter
> to determine if it can do a quick bounds calculation. With the "INCLUDE AND
> INCLUDE" filter, this check fails.
>
> Is there a method that can combine and simplify two filters, such that
> INCLUDE AND INCLUDE would be converted to INCLUDE?
>
> If so, I intend to modify the GetMap.buildLayersFilters() class to call
> this, so that it is returning more correct filters.
>
> Thanks,
> Torben Barsballe
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to