Initializes a new instance of the Filter class which can be passed into the Table.Search method to perform both an attribute and a spatial query (using the named geometry Column) in a single search. The RowCollection returned from the Search method will only contain data for the specified columns.

Namespace:  ESRI.ArcGISExplorer.Data

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

Syntax

C#
public Filter(
	Geometry geometry,
	FilterSearchOptions spatialSearchType,
	string whereClause,
	string[] columnNames,
	string spatialColumnName
)
Visual Basic (Declaration)
Public Sub New ( _
	geometry As Geometry, _
	spatialSearchType As FilterSearchOptions, _
	whereClause As String, _
	columnNames As String(), _
	spatialColumnName As String _
)

Parameters

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

A Geometry object.
spatialSearchType
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.
whereClause
Type: System..::.String

An SQL statement. The SQL syntax used in the WhereClause must be supported by the underlying database and additionally must be supported by the ArcGIS Explorer API. For more information and links to other documents which discuss SQL syntax, see How to Search a Table.
columnNames
Type: array< System..::.String >[]()[]

An Array of column names for which data should be returned when a search is executed.
spatialColumnName
Type: System..::.String

Obsolete. This property should be set to an empty string as the member is now established internally when the Search method is called.

Remarks

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

Examples

The code below demonstrates how to create a new Filter object that uses the constructor to specify a search Geometry, one of the FilterSearchOptions values, an SQL clause and columns to populate with data.
CopyC#
//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
//which are in Running Springs city.  The SpatialColumnName is now determined automatically
//so this member is set to an empty string.
Filter searchCriteria = new Filter(firePoly, FilterSearchOptions.Intersects,
                                   "CITY='RUNNING SPRINGS'", new string[] {"APN", "TRA", "SHAPE"},
                                   String.Empty);

//Execute the query
RowCollection rows = properties.Search(searchCriteria);
CopyVB.NET
'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
'which are in Running Springs city. The SpatialColumnName is now determined automatically
'so this member is set to an empty string.
Dim searchCriteria As Filter = New Filter(firePoly, FilterSearchOptions.Intersects, _
                                          "CITY='RUNNING SPRINGS'", New String() {"APN", "TRA", "SHAPE"}, _
                                           String.Empty)

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

See Also