Hello,

I have a postgis view containing somo points. In uDig I create a layer using
postgis directly as a the data source.

I created a plugin with a dual slider to select a range of values and I
would like to filter the features shown in uDig based on this range. How do
I do that?
I see geotools has a factory for creating filters. Do I have to do somthing
like this?

FilterFactory2 ff = (FilterFactory2)
CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
PropertyIsGreaterThanOrEqualTo minIncluded =
ff.greaterOrEqual(ff.property("ATTRIBUT"), ff.literal(min));
PropertyIsLessThanOrEqualTo maxIncluded = ff.lessOrEqual(
ff.property("ATTRIBUT"), ff.literal(max));
And and = ff.and(minIncluded, maxIncluded);

What do I have to do next to apply the filter to a specific layer?

Thanks,
Jaime
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to