AggregateField Class

  • AggregateField
  • class Esri::ArcGISRuntime::AggregateField

    Defines a field or statistical ArcadeExpression for summarizing aggregated data from an AggregationFeatureReduction. More...

    Header: #include <AggregateField.h>
    Since: Esri::ArcGISRuntime 200.3
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    AggregateField(const QString &name, Esri::ArcGISRuntime::ArcadeExpression *statisticExpression, Esri::ArcGISRuntime::AggregateStatisticType statisticType, QObject *parent = nullptr)
    AggregateField(const QString &name, const QString &statisticFieldName, Esri::ArcGISRuntime::AggregateStatisticType statisticType, QObject *parent = nullptr)
    virtual ~AggregateField() override
    QString alias() const
    QString name() const
    void setAlias(const QString &alias)
    void setName(const QString &name)
    void setStatisticExpression(Esri::ArcGISRuntime::ArcadeExpression *statisticExpression)
    void setStatisticFieldName(const QString &statisticFieldName)
    void setStatisticType(Esri::ArcGISRuntime::AggregateStatisticType statisticType)
    Esri::ArcGISRuntime::ArcadeExpression *statisticExpression() const
    QString statisticFieldName() const
    Esri::ArcGISRuntime::AggregateStatisticType statisticType() const

    Detailed Description

    Feature reduction uses statistical methods to aggregate geoelements into logical groups based on their location. Attribute values for each group (AggregateGeoElement) can be summarized for any numeric field using a specified AggregateStatisticType, such as the average, maximum, or sum. A common workflow is to summarize aggregated groups with the number of geoelements they represent.

    Member Function Documentation

    AggregateField::AggregateField(const QString &name, Esri::ArcGISRuntime::ArcadeExpression *statisticExpression, Esri::ArcGISRuntime::AggregateStatisticType statisticType, QObject *parent = nullptr)

    Creates an AggregateField object.

    • name - A name that uniquely identifies the aggregate field within the AggregationFeatureReduction::aggregateFields collection.
    • statisticExpression - An Arcade expression that evaluates to either a string or a number.
    • statisticType - Type of statistic used to summarize numeric field for aggregated geoelements.
    • parent - The optional parent QObject.

    AggregateField::AggregateField(const QString &name, const QString &statisticFieldName, Esri::ArcGISRuntime::AggregateStatisticType statisticType, QObject *parent = nullptr)

    Creates an AggregateField object.

    • name - A name that uniquely identifies the aggregate field within the AggregationFeatureReduction::aggregateFields collection.
    • statisticFieldName - An attribute name from the source dataset that contains numeric values to summarize.
    • statisticType - Type of statistic used to summarize numeric field for aggregated geoelements.
    • parent - The optional parent QObject.

    [override virtual] AggregateField::~AggregateField()

    Destructor.

    QString AggregateField::alias() const

    Returns a display name for the field that appears in a Popup, label, and other UI elements.

    See also setAlias().

    QString AggregateField::name() const

    Returns a name that uniquely identifies the aggregate field within the AggregationFeatureReduction::aggregateFields collection. Clusters will not draw correctly if AggregateField.name is empty or does not match the field name used by AggregationFeatureReduction::renderer.

    For example, an AggregateField that summarizes `population` values might have the alias `population_sum`.

    See also setName().

    void AggregateField::setAlias(const QString &alias)

    Sets the alias to alias.

    See also alias.

    void AggregateField::setName(const QString &name)

    Sets the name to name.

    See also name.

    void AggregateField::setStatisticExpression(Esri::ArcGISRuntime::ArcadeExpression *statisticExpression)

    Sets the statisticExpression to statisticExpression.

    See also statisticExpression.

    void AggregateField::setStatisticFieldName(const QString &statisticFieldName)

    Sets the statisticFieldName to statisticFieldName.

    See also statisticFieldName.

    void AggregateField::setStatisticType(Esri::ArcGISRuntime::AggregateStatisticType statisticType)

    Sets the statisticType to statisticType.

    See also statisticType.

    Esri::ArcGISRuntime::ArcadeExpression *AggregateField::statisticExpression() const

    Returns an Arcade expression that must evaluate to either a string or a number.

    The expression is evaluated for each geoelement represented by the AggregateGeoElement and the result of the expression is summarized using the given statistic type.

    See also setStatisticExpression().

    QString AggregateField::statisticFieldName() const

    Returns an attribute name from the source dataset that contains numeric values to summarize.

    Alternatively, an Arcade expression (statisticExpression) can be used instead of an AggregateStatisticType. If present, this value always takes precedence over statisticExpression.

    See also setStatisticFieldName().

    Esri::ArcGISRuntime::AggregateStatisticType AggregateField::statisticType() const

    Returns defines the type of statistic for summarizing values returned from statisticFieldName or statisticExpression.

    See also setStatisticType().

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