Initializes a new instance of the Filter class which can be passed into the Table.Search method to perform a spatial query. The RowCollection returned from the Search method will contain data for all columns in the Table.

Namespace:  ESRI.ArcGISExplorer.Data

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: (


public Filter(
	Geometry geometry,
	FilterSearchOptions spatialSearchType
Visual Basic (Declaration)
Public Sub New ( _
	geometry As Geometry, _
	spatialSearchType As FilterSearchOptions _


Type: ESRI.ArcGISExplorer.Geometry..::.Geometry

A Geometry object.
Type: ESRI.ArcGISExplorer.Data..::.FilterSearchOptions

One of the FilterSearchOptions values which defines the type of spatial relationship to search for between the geometry and the geometries stored in each Row in the Table.


This type of search criteria should only be defined for a spatially enabled Table, where IsSpatial is true.


The code below demonstrates how to create a new Filter object that specifies a Geometry and one of the FilterSearchOptions values.
//Open ArcSDE geodatabase
Geodatabase gdb = new Geodatabase(@"C:\Data\SQLServer.sde");

//Open FirePerimeters feature class 
Table fires = gdb.OpenTable("sde.DBO.FirePerimeters");

//Open Properties feature class
Table properties = gdb.OpenTable("sde.DBO.Properties");

//Get a fire polygon by its unique ID
Geometry firePoly = fires.GetRow(14).Geometry;

//Create the search criteria to find all properties affected by this fire
Filter searchCriteria = new Filter(firePoly, FilterSearchOptions.Intersects);

//Execute the query
RowCollection rows = properties.Search(searchCriteria);
'Open ArcSDE geodatabase
Dim gdb As Geodatabase = New Geodatabase("C:\Data\SQLServer.sde")

'Open FirePerimeters feature class 
Dim fires As Table = gdb.OpenTable("sde.DBO.FirePerimeters")

'Open Properties feature class
Dim properties As Table = gdb.OpenTable("sde.DBO.Properties")

'Get a fire polygon by its unique ID
Dim firePoly As Geometry = fires.GetRow(14).Geometry

'Create the search criteria to find all properties affected by this fire
Dim searchCriteria As Filter = New Filter(firePoly, FilterSearchOptions.Intersects)

'Execute the query
Dim rows As RowCollection = properties.Search(searchCriteria)

See Also