IQueryFilter2 Interface

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

Description

IQueryFilter2adds the SpatialResolution method to the IQueryFilter interface. The IQueryFilter2interface 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

Name 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.

IQueryFilter2.SpatialResolution Property

The spatial resolution in which to output geometry.

Public Property SpatialResolution As Double
public double SpatialResolution {get; set;}

Description

The SpatialResolution method provides generalization of shapes returned by a filter. The generalization is performed on the server to minimize network travel. A zero value is default and will result in no generalization. The higher the value, the greater the generalization performed. The value is specified in feature units and generally should be roughly the size of one display pixel (measured in feature units).

This method is only supported on ArcGIS feature service and ArcIMS data sources. It will be ignored on all other data sources.

public void IQueryFilter2_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);

     }

Inherited Interfaces

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

Classes that implement IQueryFilter2

Classes Description
ImageQueryFilter (esriCarto) An image query filter.
QueryFilter Esri Query Filter object.
SpatialFilter Esri Spatial Filter object.

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.

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);

    }

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.