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