Parameters to perform a statistical query on a FeatureTable. More...
Header: | #include <StatisticsQueryParameters.h> |
Since: | Esri::ArcGISRuntime 100.2 |
Public Functions
StatisticsQueryParameters() | |
StatisticsQueryParameters(const QList<Esri::ArcGISRuntime::StatisticDefinition> &statisticDefinitions) | |
StatisticsQueryParameters(const Esri::ArcGISRuntime::StatisticsQueryParameters &other) | |
StatisticsQueryParameters(Esri::ArcGISRuntime::StatisticsQueryParameters &&other) | |
~StatisticsQueryParameters() | |
void | clear() |
Esri::ArcGISRuntime::Geometry | geometry() const |
QStringList | groupByFieldNames() const |
bool | isEmpty() const |
QList<Esri::ArcGISRuntime::OrderBy> | orderByFields() const |
void | setGeometry(const Esri::ArcGISRuntime::Geometry &geometry) |
void | setGroupByFieldNames(const QStringList &groupByFieldNames) |
void | setOrderByFields(const QList<Esri::ArcGISRuntime::OrderBy> &orderByFields) |
void | setSpatialRelationship(Esri::ArcGISRuntime::SpatialRelationship relationship) |
void | setStatisticDefinitions(const QList<Esri::ArcGISRuntime::StatisticDefinition> &statisticDefinitions) |
void | setTimeExtent(const Esri::ArcGISRuntime::TimeExtent &timeExtent) |
void | setWhereClause(const QString &whereClause) |
Esri::ArcGISRuntime::SpatialRelationship | spatialRelationship() const |
QList<Esri::ArcGISRuntime::StatisticDefinition> | statisticDefinitions() const |
Esri::ArcGISRuntime::TimeExtent | timeExtent() const |
QString | whereClause() const |
Esri::ArcGISRuntime::StatisticsQueryParameters & | operator=(const Esri::ArcGISRuntime::StatisticsQueryParameters &other) |
Esri::ArcGISRuntime::StatisticsQueryParameters & | operator=(Esri::ArcGISRuntime::StatisticsQueryParameters &&other) |
Detailed Description
Perform statistical analyses such as average, count, maximum, and standard deviation on a feature table by defining a StatisticType on a StatisticDefinition. Use a combination of attribute, spatial, and temporal criteria to filter the features to be analyzed. If no filters are defined, all features in the table are included in the statistical query. You can also control how to group the results.
{FeatureTable::queryStatisticsAsync(const Esri::ArcGISRuntime::StatisticsQueryParameters&, QObject*)}, {Esri::ArcGISRuntime::StatisticDefinition::statisticType} {StatisticDefinition::statisticType}
Relevant samples:
- Statistical query: Query a table to get aggregated statistics back for a specific field.
- Statistical query (group & sort): Query a feature table for statistics, grouping and sorting by different fields.
See also Esri::ArcGISRuntime::FeatureTable::queryStatisticsAsync(const Esri::ArcGISRuntime::StatisticsQueryParameters&, QObject*).
Member Function Documentation
StatisticsQueryParameters::StatisticsQueryParameters ()
Default Constructor. Create an empty StatisticsQueryParameters instance.
[explicit]
StatisticsQueryParameters::StatisticsQueryParameters (const QList<Esri::ArcGISRuntime::StatisticDefinition > &statisticDefinitions )
Creates statistics query parameters using one or more StatisticDefinition.
- statisticDefinitions - A QList containing StatisticDefinition instances.
StatisticsQueryParameters::StatisticsQueryParameters (const Esri::ArcGISRuntime::StatisticsQueryParameters &other)
Copy constructor from other StatisticsQueryParameters.
StatisticsQueryParameters::StatisticsQueryParameters (Esri::ArcGISRuntime::StatisticsQueryParameters &&other)
Move constructor from other StatisticsQueryParameters.
StatisticsQueryParameters::~StatisticsQueryParameters ()
Destructor
void StatisticsQueryParameters::clear()
Clears this StatisticsQueryParameters and sets back to empty.
Esri::ArcGISRuntime::Geometry StatisticsQueryParameters::geometry() const
Returns the geometry used to filter the results.
The geometry that (along with the spatialRelationship) defines features to be included in the statistical query.
See also setGeometry().
QStringList StatisticsQueryParameters::groupByFieldNames () const
Returns the fields by which statistical query results will be grouped.
See also setGroupByFieldNames().
bool StatisticsQueryParameters::isEmpty () const
Returns whether this StatisticsQueryParameters is empty.
QList<Esri::ArcGISRuntime::OrderBy > StatisticsQueryParameters::orderByFields () const
Returns the fields by which statistical query results will be ordered.
Results can be sorted by one or more fields. Each OrderBy instance includes a field name and whether to sort by that field in ascending or descending order. If a service-based table is being queried it must support advanced queries.
See also setOrderByFields.
void StatisticsQueryParameters::setGeometry (const Esri::ArcGISRuntime::Geometry &geometry)
Sets the geometry to geometry.
See also geometry.
void StatisticsQueryParameters::setGroupByFieldNames (const QStringList &groupByFieldNames )
Sets the groupByFieldNames to groupByFieldNames.
See also groupByFieldNames.
void StatisticsQueryParameters::setOrderByFields (const QList<Esri::ArcGISRuntime::OrderBy > &orderByFields )
Sets the orderByFields to orderByFields.
See also orderByFields.
void StatisticsQueryParameters::setSpatialRelationship (Esri::ArcGISRuntime::SpatialRelationship relationship)
Sets the spatialRelationship to relationship.
See also spatialRelationship.
void StatisticsQueryParameters::setStatisticDefinitions (const QList<Esri::ArcGISRuntime::StatisticDefinition > &statisticDefinitions )
Sets the statisticDefinitions to statisticDefinitions.
See also statisticDefinitions.
[since Esri::ArcGISRuntime 100.3]
void StatisticsQueryParameters::setTimeExtent (const Esri::ArcGISRuntime::TimeExtent &timeExtent )
Sets the timeExtent to timeExtent.
This function was introduced in Esri::ArcGISRuntime 100.3.
See also timeExtent.
void StatisticsQueryParameters::setWhereClause (const QString &whereClause )
Sets the whereClause to whereClause.
See also whereClause.
Esri::ArcGISRuntime::SpatialRelationship StatisticsQueryParameters::spatialRelationship () const
Returns the spatial relationship that (along with the geometry) defines features to be included in the query.
The default spatial relationship is SpatialRelationship::Intersects.
See also setSpatialRelationship().
QList<Esri::ArcGISRuntime::StatisticDefinition > StatisticsQueryParameters::statisticDefinitions () const
Returns the definition of statistics (input field, output name, statistic type) to include in the statistical query of a table.
See also setStatisticDefinitions().
[since Esri::ArcGISRuntime 100.3]
Esri::ArcGISRuntime::TimeExtent StatisticsQueryParameters::timeExtent () const
Returns the time extent that defines features to be included in the statistics query.
A combination of attribute, spatial, and temporal criteria can be used to filter the features evaluated in a statistical query. If no filters are defined, all features in the table are included in the query.
This function was introduced in Esri::ArcGISRuntime 100.3.
See also setTimeExtent().
QString StatisticsQueryParameters::whereClause () const
Returns the attribute expression that defines features to be included in the statistics query.
The where clause should follow standard SQL syntax similar to that discussed in the document SQL reference for query expressions used in ArcGIS.
If the where clause includes dates, they must be correctly formatted based on the geodatabase datasource used in the service. Refer to Dates and time for date formats expected by different data sources.
ArcGISFeatureTable objects expect that any FieldType::GlobalId or FieldType::GUID parameters in the where clause are formatted as: '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'. All characters are uppercase, wrapped in curly braces and surrounded by single quotes.
See also setWhereClause().
Esri::ArcGISRuntime::StatisticsQueryParameters &StatisticsQueryParameters::operator=(const Esri::ArcGISRuntime::StatisticsQueryParameters &other)
Assignment operator from other StatisticsQueryParameters.
Esri::ArcGISRuntime::StatisticsQueryParameters &StatisticsQueryParameters::operator=(Esri::ArcGISRuntime::StatisticsQueryParameters &&other)
Move operator from other StatisticsQueryParameters.