ArcGIS Explorer Component Help |
Filter..::.SpatialSearchType Property |
Filter Class Example See Also |
Gets or sets the type of the spatial search.
Namespace:
ESRI.ArcGISExplorer.DataAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public FilterSearchOptions SpatialSearchType { get; set; } |
Visual Basic (Declaration) |
---|
Public Property SpatialSearchType As FilterSearchOptions |
Field Value
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.Examples
The code below create creates a Filter object using the default constructor, sets Geometry,
SpatialSearchType, and SpatialColumnName properties then executes the query using the Table.Search method.
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 Filter searchCriteria = new Filter(); searchCriteria.Geometry = firePoly; searchCriteria.SpatialSearchType = FilterSearchOptions.Intersects; //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 Dim searchCriteria As Filter = New Filter() searchCriteria.Geometry = firePoly searchCriteria.SpatialSearchType = FilterSearchOptions.Intersects 'Execute the query Dim rows As RowCollection = properties.Search(searchCriteria)