This document is archived and information here might be outdated.  Recommended version.


ISpatialFilter.Geometry Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IS > ISpatialFilter Interface > ISpatialFilter.Geometry Property
ArcGIS Developer Help

ISpatialFilter.Geometry Property

The query geometry used to filter results.

[Visual Basic .NET]
Public Property Geometry As IGeometry
[C#]
public IGeometry Geometry {get; set;}
[C++]
HRESULT get_Geometry(
  IGeometry** Geometry
);
[C++]
HRESULT putref_Geometry(
  IGeometry* Geometry
);
[C++]
Parameters
Geometry [out, retval]

Geometry is a parameter of type IGeometry** Geometry [in]
Geometry is a parameter of type IGeometry*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Only high-level geometries, envelopes and geometry bags can be used. High-level geometries are polygons, polylines, points, and multipoints. Low-level geometries including paths, rings, arcs and curves, and lines can not be used. To test whether a geometry is applicable, see if it implements the IRelationalOperator interface; if it does, it can be used.

Remarks

If a geometry bag is being used as the filter's query geometry, a spatial index should be created for the bag prior to any evaluation using the filter. This can be done by casting the geometry bag to the ISpatialIndex interface, setting the AllowIndexing property to true, and calling the Invalidate method.

Note that at ArcGIS 9.3 and later, setting this property to null will cause an error.

See Also

ISpatialFilter Interface

.NET Samples

Editing using a custom form ViperPin tool