ExecuteSpatialQuery

This method returns all the features that intersect with a selection area geometry according to the specified intersection type and renders all data in the 3D Window. If rendering of the data is not desirable for the spatial query, the ExecuteQuery method can be used instead. Note that in addition to combining the spatial query with an attribute query, ExecuteQuery also offers the advantages of performing the query without rendering and of splitting the request into chunks (multiple “sub-queries”, each on a defined subset of the features). ExecuteSpatialQuery, on the other has the advantage of rendering all the data in the 3D Window. SeeExecuteQuery” for more information.

 

JavaScript

 

ExecuteSpatialQuery(

       pIGeometry,

       IntersectionType)

 

C#

 

IFeatures80 ExecuteSpatialQuery(

       IGeometry pIGeometry,

       IntersectionType IntersectionType = IntersectionType.IT_INTERSECT)

 

C++

 

HRESULT ExecuteSpatialQuery(

       IGeometry* pIGeometry,

       IntersectionType IntersectionType,

       IFeatures80** pIFeatures)

Parameters

pIGeometry

Any valid IGeometry derived object, representing the geometric properties of the selection area geometry.

IntersectionType

An enum that determines the intersection type. The following are the possible values:

·          IT_NONE = 0

·          IT_INTERSECT = 1
Select all features that geometrically intersect with the selection area.

·          IT_WITHIN = 2
Select only features whose entire geometry falls within the selection area.

Return Value

pIFeatures

An IFeatures80, containing all the features that intersect with the selection area geometry according to the IGeometry properties set.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.