ArcGIS Runtime SDK for iOS: AGSQueryParameters Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSQueryParameters Class Reference

Description

Parameters to perform a query using AGSFeatureTable.

Instances of this class represent parameters that can be used to perform a query using queryFeaturesWithParameters:completion: (AGSFeatureTable).

All parameters related to geometry and spatial queries will be ignored when querying non spatial data.

Since
100
Inheritance diagram for AGSQueryParameters:
AGSObject

Instance Methods

(instancetype) - init
 

Class Methods

(instancetype) + queryParameters
 

Properties

AGSGeometrygeometry
 
double maxAllowableOffset
 
NSInteger maxFeatures
 
NSArray< NSNumber * > * objectIDs
 
NSArray< AGSOrderBy * > * orderByFields
 
AGSSpatialReferenceoutSpatialReference
 
NSInteger resultOffset
 
BOOL returnGeometry
 
AGSSpatialRelationship spatialRelationship
 
AGSTimeExtenttimeExtent
 
NSString * whereClause
 

Method Documentation

◆ init

- (instancetype) init

◆ queryParameters

+ (instancetype) queryParameters

Property Documentation

◆ geometry

- (AGSGeometry*) geometry
readwritenonatomicstrong

The geometry to use while performing a spatial query. Valid geometry types are AGSEnvelope, AGSPoint, AGSMultipoint, AGSPolygon, and AGSPolyline. Results of the query will include only those features which conform to the specified spatialRelationship with this geometry.

Since
100

◆ maxAllowableOffset

- (double) maxAllowableOffset
readwritenonatomicassign

The maximum allowable offset used for generalizing geometries returned by the query operation. The default is 0. If 0 is specified the value is not passed to the server in a query. The offset is in the units of the outSpatialReference. If an outSpatialReference is not defined, the spatial reference of the service is used.

Since
100

◆ maxFeatures

- (NSInteger) maxFeatures
readwritenonatomicassign

The maximum number of results that should be returned.

Note
For consistent ordering of results when using pagination, you should also provide a value for orderByFields.
Since
100

◆ objectIDs

- (NSArray<NSNumber*>*) objectIDs
readwritenonatomiccopy

The IDs of features that the query should be restricted to.

Since
100

◆ orderByFields

- (NSArray<AGSOrderBy*>*) orderByFields
readwritenonatomiccopy

Fields by which the results need to be ordered. Note, the service being queried must support advanced queries.

Since
100

◆ outSpatialReference

- (AGSSpatialReference*) outSpatialReference
readwritenonatomicstrong

The spatial reference in which result geometries are to be returned. If not specified, geometries are returned in the spatial reference of the service.

Since
100

◆ resultOffset

- (NSInteger) resultOffset
readwritenonatomicassign

The starting offset of results to fetch. This is useful for paging through results.

Note
If providing a result offset, you must also set maxFeatures otherwise the offset is ignored.
Since
100.2

◆ returnGeometry

- (BOOL) returnGeometry
readwritenonatomicassign

If YES, result features will include their geometry. This is needed when you want to display the features on a map or a scene. If non-spatial data is being queried, results will not contain geometries.

Since
100

◆ spatialRelationship

- (AGSSpatialRelationship) spatialRelationship
readwritenonatomicassign

The spatial constraint that needs to be applied on the query geometry. Only data satisfying this relationship will be returned as results.

Since
100

◆ timeExtent

- (AGSTimeExtent*) timeExtent
readwritenonatomicstrong

Time extent for the query. Only features that fall within this time period will be returned.

Since
100.2

◆ whereClause

- (NSString*) whereClause
readwritenonatomiccopy

A SQL where clause to filter results for the query.

If the where clause includes dates, they must be correctly formatted based on the geodatabase datasource used in the service. Refer to this document for date formats expected by different data sources.

AGSArcGISFeatureTable objects expect that any AGSFieldTypeGlobalID or AGSFieldTypeGUID parameters in the string that is used as the AGSQueryParameters::whereClause are formatted as so: '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'. The where clause should be all uppercase characters, wrapped in curly braces and surrounded by single quotes.

The string that is used as the whereClause should follow standard SQL syntax similar to what is discussed in the document SQL reference for query expressions used in ArcGIS.

Since
100