Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] filtering contents of rendered layers

Put a break point in ShowViewInterceptor and verify that the filter is being picked up correctly. Finally, is the layer a postgis layer?

Jesse
On Oct 30, 2007, at 1:02 PM, Vince Darley wrote:

I'm trying this now:

At 20:38 29/10/2007, Jesse Eichar wrote:
>layer.getBlackboard().put ( ProjectBlackboardConstants#LAYER__DATA_QUERY, filter);

via code like this:

static void addFilterToLayer(ILayer layer, java.util.Map<String, Filter> layerFilters) {
  Filter f = layerFilters.get(layer.getName());
  if (f != null) {
    System.out.println("Filter for " + layer.getName() + " is " + f);
layer.getBlackboard().put (ProjectBlackboardConstants.LAYER__DATA_QUERY, f);
  }
}

the output on the console is:

Filter for Schedule location details is [[ Driver ID = Refuse Team 3 ] AND [ Day = 1 ]]

Which looks ok to me (the filter has definitely parsed ok, since the above string is not exactly how I created it), but, this has no effect at all on rendering of the layer. I still see all the geometries in the layer in my rendered report, even ones which don't have matching attributes for 'Driver ID' and 'Day'.

Anything obvious I'm doing wrong?  Any pointers to debugging this?

thanks,

Vince.

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



Back to the top