ArcObjects Library Reference (GeoDatabase)  

IQueryFilter2 Interface

Provides access to members that return and modify the output spatial resolution.

Product Availability

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

Description

IQueryFilter2 adds the SpatialResolution method to the IQueryFilter interface.  The IQueryFilter2 interface allows the specification of the desired spatial resolution as part of the query.  It can be used a filter criteria for data sources that support the filtering of feature data based on spatial resolution.  Features whose geometry extent is smaller than the specified spatial resolution will not be returned.

Members

Description
Method AddField Appends a single field name to the list of sub-fields.
Read/write property OutputSpatialReference The spatial reference in which to output geometry for a given field.
Read/write property SpatialResolution The spatial resolution in which to output geometry.
Read/write property SubFields The comma delimited list of field names for the filter.
Read/write property WhereClause The where clause for the filter.

Inherited Interfaces

Interfaces Description
IQueryFilter Provides access to members that filter data based on attribute values and or relationships.

CoClasses that implement IQueryFilter2

CoClasses and Classes Description
ImageQueryFilter (esriCarto) An image query filter.
QueryFilter ESRI Query Filter object.
SpatialFilter ESRI Spatial Filter object.
TemporalQueryFilter (esriTrackingAnalyst) Controls properties for the temporal query filter.
TimeQueryFilter (esriCarto) TimeQueryFilter Class

Remarks

Note on ORDER BY and returning sorted data: To add ORDER BY and GROUP BY clauses to the attribute query the IQueryFilterDefinition::PostfixClause property can be used prior to creating the cursor. This will only work with ArcSDE and Personal Geodatabase.

[C#]

    public void IQueryFilter_SpatialResolution(IFeatureClass featureClass)
    {
        IQueryFilter2 queryFilter2 = new QueryFilterClass();

        //there is no with statement in C#
        queryFilter2.WhereClause = "STATE_NAME = 'California'";
        queryFilter2.SpatialResolution = 500;

        //Using a query filter to search a feature class:
        IFeatureCursor featureCursor = featureClass.Search(queryFilter2, false);
    }

.NET Related Topics

Using ArcObjects as tool input |