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


ISpatialFilter.Geometry Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoDatabase)  

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 Snippets

Get All Features from Point Search in GeoFeatureLayer | Get First Feature from Point Search in GeoFeatureLayer | Perform Spatial Query

.NET Samples

Editing using a custom form (Code Files: EditorForm) | ViperPin tool (Code Files: ViperPinForm)

.NET Related Topics

Developing SOAP server object extensions | Executing spatial queries | How to download images from an image service | How to query an image service | Map services