AggregationFeatureReduction Class

  • AggregationFeatureReduction
  • class Esri::ArcGISRuntime::AggregationFeatureReduction

    A base class to define visual aggregation of geoelements. More...

    Header: #include <AggregationFeatureReduction.h>
    Since: Esri::ArcGISRuntime 200.2
    Inherits: Esri::ArcGISRuntime::FeatureReduction and Esri::ArcGISRuntime::PopupSource
    Inherited By:


    Public Functions

    virtual ~AggregationFeatureReduction() override
    Esri::ArcGISRuntime::AggregateFieldListModel *aggregateFields() const
    bool isShowLabels() const
    Esri::ArcGISRuntime::LabelDefinitionListModel *labelDefinitions() const
    double maxScale() const
    Esri::ArcGISRuntime::Renderer *renderer() const
    void setMaxScale(double maxScale)
    void setRenderer(Esri::ArcGISRuntime::Renderer *renderer)
    void setShowLabels(bool showLabels)

    Reimplemented Public Functions

    virtual bool isPopupEnabled() const override
    virtual Esri::ArcGISRuntime::PopupDefinition *popupDefinition() const override
    virtual void setPopupDefinition(Esri::ArcGISRuntime::PopupDefinition *popupDefinition) override
    virtual void setPopupEnabled(bool popupEnabled) override

    Detailed Description

    Feature reduction dynamically aggregates groups of points that are within proximity of each other in order to represent each group with a single symbol. Such grouping allows you to see patterns in the data that are difficult to visualize when a layer contains hundreds or thousands of points that overlap and cover each other. The count of geoelements in each group can be displayed, and numeric attribute values can also be summarized within each group.

    Note, properties defined for AggregationFeatureReduction are independent of the properties for FeatureLayer and GraphicsOverlay.

    FeatureReduction is not supported in 3D.

    Member Function Documentation

    [override virtual] AggregationFeatureReduction::~AggregationFeatureReduction()


    [since Esri::ArcGISRuntime 200.3] Esri::ArcGISRuntime::AggregateFieldListModel *AggregationFeatureReduction::aggregateFields() const

    Returns an array of AggregateField that summarizes one or more attributes for a group of geoelements visualized with FeatureReduction.

    aggregateFields define the attributes of AggregateGeoElement. Each AggregateField stores a value that is generated by aggregating values from a field referenced in the feature layer.

    These aggregate fields may be used in popups, labels, and renderers. Note that aggregated geoelements only have access to the AggregationFeatureReduction::aggregateFields defined. The fields from the feature layer are not accessible for use in popups, labels, or renderers for aggregated geoelements.

    For example, to display the sum of the population values in a cluster of features, you can create an aggregate field called 'sum_population' using the 'population' attribute of the FeatureLayer. You can then use the 'sum_population' attribute as a label for the AggregateGeoElement, but not the original 'population' attribute from the feature layer.

    Note: Updates to this collection cause data to be re-aggregated.

    This function was introduced in Esri::ArcGISRuntime 200.3.

    See also AggregateField.

    [override virtual] bool AggregationFeatureReduction::isPopupEnabled() const

    Reimplements: PopupSource::isPopupEnabled() const.

    Returns a flag indicating whether the PopupDefinition defined on the PopupSource is enable / disable.

    [since Esri::ArcGISRuntime 200.3] bool AggregationFeatureReduction::isShowLabels() const

    Returns true to display labels for aggregated geoelements, false to turn them off.

    The default value is true.

    This function was introduced in Esri::ArcGISRuntime 200.3.

    [since Esri::ArcGISRuntime 200.3] Esri::ArcGISRuntime::LabelDefinitionListModel *AggregationFeatureReduction::labelDefinitions() const

    Returns the collection of LabelDefinition objects that define label display for the summarized attribute values of aggregated geoelements.

    Label expressions can only refer to the fields defined in aggregateFields. Feature layer fields are not accessible to aggregated geoelements. AggregationFeatureReduction::labelDefinitions is independent of FeatureLayer::labelDefinitions and Esri::ArcGISRuntime::GraphicsOverlay::labelDefinitions. Labels on aggregated geoelements will only appear if there is at least one LabelDefinition defined.

    This function was introduced in Esri::ArcGISRuntime 200.3.

    [since Esri::ArcGISRuntime 200.3] double AggregationFeatureReduction::maxScale() const

    Returns the map scale at which aggregation is enabled. Geoelements are not aggregated when the map scale goes beyond the maximum scale.

    The default value is 0, which means aggregation is applied at all map scales.

    Note: changing this property causes data to be re-aggregated.

    This function was introduced in Esri::ArcGISRuntime 200.3.

    See also setMaxScale().

    [override virtual] Esri::ArcGISRuntime::PopupDefinition *AggregationFeatureReduction::popupDefinition() const

    Reimplements: PopupSource::popupDefinition() const.

    Returns the pop-up definition.

    The PopupDefinition associated with the popup source. A nullptr if an error occurs or if the popup source is not associated with a pop-up definition.

    See also setPopupDefinition().

    [since Esri::ArcGISRuntime 200.3] Esri::ArcGISRuntime::Renderer *AggregationFeatureReduction::renderer() const

    Returns defines the symbology for displaying aggregated geoelements.

    Only SimpleRenderer, UniqueValueRenderer, and ClassBreaksRenderer are currently supported for renderer. UniqueValueRenderer with multiple fields is not supported.

    If the renderer passed is not one of the supported renderer types listed above, then original features from the FeatureLayer or original graphics from the GraphicsOverlay are drawn using FeatureLayer::renderer or GraphicsOverlay::renderer respectively. In the case of FeatureLayer, a LayerViewState that contains an error indicating the use of an unsupported renderer is bubbled up. Also, note that AggregationFeatureReduction::renderer is independent of FeatureLayer::renderer and GraphicsOverlay::renderer.

    If you want to symbolize aggregate geoelements using the same symbology used by the FeatureLayer or GraphicsOverlay, you may clone the FeatureLayer::renderer or the GraphicsOverlay::renderer and set it here. You can also create a new renderer of a supported type. If you create a new SimpleRenderer, aggregate geoelements will display with the symbol defined for the SimpleRenderer.

    If the new renderer is of type ClassBreaksRenderer or UniqueValueRenderer, the field name on the renderer must match one of the AggregateField in aggregateFields.

    If this field is not found in aggregateFields, aggregate geoelements will draw using ClassBreaksRenderer::defaultSymbol or UniqueValueRenderer::defaultSymbol.

    If there is no default symbol defined, the clusters will not draw.

    Note: Updating the renderer causes data to be re-aggregated.

    This function was introduced in Esri::ArcGISRuntime 200.3.

    See also setRenderer().

    [since Esri::ArcGISRuntime 200.3] void AggregationFeatureReduction::setMaxScale(double maxScale)

    Sets the maxScale to maxScale.

    This function was introduced in Esri::ArcGISRuntime 200.3.

    See also maxScale.

    [override virtual] void AggregationFeatureReduction::setPopupDefinition(Esri::ArcGISRuntime::PopupDefinition *popupDefinition)

    Reimplements: PopupSource::setPopupDefinition(Esri::ArcGISRuntime::PopupDefinition *popupDefinition).

    Sets the popupDefinition to popupDefinition.

    See also popupDefinition.

    [override virtual] void AggregationFeatureReduction::setPopupEnabled(bool popupEnabled)

    Reimplements: PopupSource::setPopupEnabled(bool popupEnabled).

    Sets the popupEnabled to popupEnabled.

    See also isPopupEnabled.

    [since Esri::ArcGISRuntime 200.3] void AggregationFeatureReduction::setRenderer(Esri::ArcGISRuntime::Renderer *renderer)

    Sets the renderer to renderer.

    This function was introduced in Esri::ArcGISRuntime 200.3.

    See also renderer.

    [since Esri::ArcGISRuntime 200.3] void AggregationFeatureReduction::setShowLabels(bool showLabels)

    Sets the showLabels to showLabels.

    This function was introduced in Esri::ArcGISRuntime 200.3.

    See also isShowLabels.

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