Andrea Aime wrote:
> So you would use:
> FilterFactory ff = CommonFactoryFinder.getFilterFactory(new
> Hints(Hints.LOOSE_BBOX, true));
> Gt2BBOX box = (Gt2BBOX) ff.bbox(...);
>
> where Gt2BBOX would be:
>
> public interface Gt2BBOX extends BBOX {
> public boolean isLoose();
> }
>
> and then sql encoders and the like could check for the interface and
> the return type in order to decide how to encode the filter?
That works; I was thinking of taking it over to the renderer (since the
definition of the style is separate from how we are using it).
FilterFactory ff = CommonFactoryFinder.getFilterFactory(new
Hints(Hints.LOOSE_BBOX, true));
DuplicatorFilterVisitor copy = new DuplicatorFilterVisitor( ff );
And then for each filter used:
filter.accepts( visitor );
filter = visitor.getCopy();
Jody
>
>>> This one would be messy as well... people may think of giving an
>>> order to use the loose semantic and then a random sql encoder
>>> might just encode it as intersects... sigh, what a mess
>> Still that is the same as a random datastore not respecting the Hint
>> right? Ah but your datastores advertise what they support - I still
>> need to review the code example to understand how you did that.
>
> FeatureSource.getSupportedHints() -> Set<RenderingHint.Key>
>
> Cheers
> Andrea
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel