Class AggregationFeatureReduction
- All Implemented Interfaces:
PopupSource
- Direct Known Subclasses:
ClusteringFeatureReduction
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 properties of
FeatureLayer
and GraphicsOverlay
.
FeatureReduction
is not supported in 3D.
- Since:
- 200.2.0
-
Property Summary
TypePropertyDescriptionThe map scale at which aggregation is enabled.Defines the symbology for displaying aggregated geoelements.True to display labels for aggregated geoelements, false to turn them off.Properties inherited from class com.esri.arcgisruntime.mapping.reduction.FeatureReduction
enabled
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the collection ofAggregateField
that summarizes one or more attributes for a group of geoelements visualized withFeatureReduction
.Gets the collection ofLabelDefinition
objects that define label display for the summarized attribute values of aggregated geoelements.double
Gets the value of themaxScale
property.Gets the PopupDefinition that is currently defined or set on the entity.Gets the value of therenderer
property.boolean
Checks if the pop-up definition returned fromPopupSource.getPopupDefinition()
is enabled or disabled.boolean
Gets the value of theshowLabels
property.The map scale at which aggregation is enabled.Defines the symbology for displaying aggregated geoelements.void
setMaxScale
(double maxScale) Sets the value of themaxScale
property.void
setPopupDefinition
(PopupDefinition popupDefinition) Sets a new PopupDefinition on the entity, overriding any previously existing one.void
setPopupEnabled
(boolean enabled) Sets whether the pop-up definition returned fromPopupSource.getPopupDefinition()
is enabled or disabled.void
setRenderer
(Renderer renderer) Sets the value of therenderer
property.void
setShowLabels
(boolean showLabels) Sets the value of theshowLabels
property.True to display labels for aggregated geoelements, false to turn them off.Methods inherited from class com.esri.arcgisruntime.mapping.reduction.FeatureReduction
enabledProperty, isEnabled, setEnabled
-
Property Details
-
maxScale
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.
The maxScale value must be a non-negative number.
- Since:
- 200.3.0
- See Also:
-
renderer
Defines the symbology for displaying aggregated geoelements.Only
SimpleRenderer
,UniqueValueRenderer
, andClassBreaksRenderer
are currently supported forrendererProperty()
.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 theFeatureLayer
or original graphics from theGraphicsOverlay
are drawn usingFeatureLayer.getRenderer()
orGraphicsOverlay.getRenderer()
respectively. In the case ofFeatureLayer
, aLayerViewState
that contains an error indicating the use of an unsupported renderer is bubbled up. Also, note thatAggregationFeatureReduction.rendererProperty()
is independent ofFeatureLayer.rendererProperty()
andGraphicsOverlay.rendererProperty()
.If you want to symbolize aggregate geoelements using the same symbology used by the
FeatureLayer
orGraphicsOverlay
, you may calltoJson()
onFeatureLayer.getRenderer()
orGraphicsOverlay.getRenderer()
and then create a new renderer withfromJson()
. You can also create a new renderer of a supported type. If you create a newSimpleRenderer
, aggregate geoelements will display with the symbol defined for theSimpleRenderer
. orUniqueValueRenderer
, the field name on the renderer must match one of theAggregateField
ingetAggregateFields()
. If this field is not found inAggregationFeatureReduction.getAggregateFields()
, aggregate geoelements will draw usingClassBreaksRenderer.getDefaultSymbol()
orUniqueValueRenderer.getDefaultSymbol()
. If there is no default symbol defined, aggregate geoelements will not draw.Note: Updating the renderer causes data to be re-aggregated.
Attempting to set the value to null will throw a NullPointerException exception.
- Since:
- 200.3.0
- See Also:
-
showLabels
True to display labels for aggregated geoelements, false to turn them off.The default value is true.
- Since:
- 200.3.0
- See Also:
-
-
Field Details
-
mRenderer
-
-
Method Details
-
getAggregateFields
Gets the collection ofAggregateField
that summarizes one or more attributes for a group of geoelements visualized withFeatureReduction
.getAggregateFields()
define the attributes of anAggregateGeoElement
. EachAggregateField
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 theAggregationFeatureReduction.getAggregateFields()
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 theFeatureLayer
. You can then use the 'sum_population' attribute as a label for theAggregateGeoElement
, but not the original 'population' attribute from the feature layer. SeeAggregateField
for more info. Note: Updates to this collection cause data to be re-aggregated.- Returns:
- the collection of
AggregateField
that summarizes one or more attributes for a group of geoelements visualized withFeatureReduction
- Since:
- 200.3.0
-
getLabelDefinitions
Gets the collection ofLabelDefinition
objects that define label display for the summarized attribute values of aggregated geoelements.Label expressions can only refer to the fields defined in
getAggregateFields()
. Feature layer fields are not accessible to aggregated geoelements.getLabelDefinitions()
is independent ofFeatureLayer.getLabelDefinitions()
andGraphicsOverlay.getLabelDefinitions()
. Labels on aggregated geoelements will only appear if there is at least oneLabelDefinition
defined.- Returns:
- the collection of
LabelDefinition
objects that define label display for the summarized attribute values of aggregated geoelements - Since:
- 200.3.0
-
maxScaleProperty
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.
The maxScale value must be a non-negative number.
- Returns:
- the
maxScale
property - Since:
- 200.3.0
- See Also:
-
getMaxScale
public double getMaxScale()Gets the value of themaxScale
property.- Property description:
- 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.
The maxScale value must be a non-negative number.
- Returns:
- the value of the
maxScale
property - Since:
- 200.3.0
- See Also:
-
setMaxScale
public void setMaxScale(double maxScale) Sets the value of themaxScale
property.- Property description:
- 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.
The maxScale value must be a non-negative number.
- Parameters:
maxScale
- the value for themaxScale
property- Since:
- 200.3.0
- See Also:
-
rendererProperty
Defines the symbology for displaying aggregated geoelements.Only
SimpleRenderer
,UniqueValueRenderer
, andClassBreaksRenderer
are currently supported forrendererProperty()
.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 theFeatureLayer
or original graphics from theGraphicsOverlay
are drawn usingFeatureLayer.getRenderer()
orGraphicsOverlay.getRenderer()
respectively. In the case ofFeatureLayer
, aLayerViewState
that contains an error indicating the use of an unsupported renderer is bubbled up. Also, note thatAggregationFeatureReduction.rendererProperty()
is independent ofFeatureLayer.rendererProperty()
andGraphicsOverlay.rendererProperty()
.If you want to symbolize aggregate geoelements using the same symbology used by the
FeatureLayer
orGraphicsOverlay
, you may calltoJson()
onFeatureLayer.getRenderer()
orGraphicsOverlay.getRenderer()
and then create a new renderer withfromJson()
. You can also create a new renderer of a supported type. If you create a newSimpleRenderer
, aggregate geoelements will display with the symbol defined for theSimpleRenderer
. orUniqueValueRenderer
, the field name on the renderer must match one of theAggregateField
ingetAggregateFields()
. If this field is not found inAggregationFeatureReduction.getAggregateFields()
, aggregate geoelements will draw usingClassBreaksRenderer.getDefaultSymbol()
orUniqueValueRenderer.getDefaultSymbol()
. If there is no default symbol defined, aggregate geoelements will not draw.Note: Updating the renderer causes data to be re-aggregated.
Attempting to set the value to null will throw a NullPointerException exception.
- Returns:
- the
renderer
property - Since:
- 200.3.0
- See Also:
-
getRenderer
Gets the value of therenderer
property.- Property description:
- Defines the symbology for displaying aggregated geoelements.
Only
SimpleRenderer
,UniqueValueRenderer
, andClassBreaksRenderer
are currently supported forrendererProperty()
.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 theFeatureLayer
or original graphics from theGraphicsOverlay
are drawn usingFeatureLayer.getRenderer()
orGraphicsOverlay.getRenderer()
respectively. In the case ofFeatureLayer
, aLayerViewState
that contains an error indicating the use of an unsupported renderer is bubbled up. Also, note thatAggregationFeatureReduction.rendererProperty()
is independent ofFeatureLayer.rendererProperty()
andGraphicsOverlay.rendererProperty()
.If you want to symbolize aggregate geoelements using the same symbology used by the
FeatureLayer
orGraphicsOverlay
, you may calltoJson()
onFeatureLayer.getRenderer()
orGraphicsOverlay.getRenderer()
and then create a new renderer withfromJson()
. You can also create a new renderer of a supported type. If you create a newSimpleRenderer
, aggregate geoelements will display with the symbol defined for theSimpleRenderer
. orUniqueValueRenderer
, the field name on the renderer must match one of theAggregateField
ingetAggregateFields()
. If this field is not found inAggregationFeatureReduction.getAggregateFields()
, aggregate geoelements will draw usingClassBreaksRenderer.getDefaultSymbol()
orUniqueValueRenderer.getDefaultSymbol()
. If there is no default symbol defined, aggregate geoelements will not draw.Note: Updating the renderer causes data to be re-aggregated.
Attempting to set the value to null will throw a NullPointerException exception.
- Returns:
- the value of the
renderer
property - Since:
- 200.3.0
- See Also:
-
setRenderer
Sets the value of therenderer
property.- Property description:
- Defines the symbology for displaying aggregated geoelements.
Only
SimpleRenderer
,UniqueValueRenderer
, andClassBreaksRenderer
are currently supported forrendererProperty()
.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 theFeatureLayer
or original graphics from theGraphicsOverlay
are drawn usingFeatureLayer.getRenderer()
orGraphicsOverlay.getRenderer()
respectively. In the case ofFeatureLayer
, aLayerViewState
that contains an error indicating the use of an unsupported renderer is bubbled up. Also, note thatAggregationFeatureReduction.rendererProperty()
is independent ofFeatureLayer.rendererProperty()
andGraphicsOverlay.rendererProperty()
.If you want to symbolize aggregate geoelements using the same symbology used by the
FeatureLayer
orGraphicsOverlay
, you may calltoJson()
onFeatureLayer.getRenderer()
orGraphicsOverlay.getRenderer()
and then create a new renderer withfromJson()
. You can also create a new renderer of a supported type. If you create a newSimpleRenderer
, aggregate geoelements will display with the symbol defined for theSimpleRenderer
. orUniqueValueRenderer
, the field name on the renderer must match one of theAggregateField
ingetAggregateFields()
. If this field is not found inAggregationFeatureReduction.getAggregateFields()
, aggregate geoelements will draw usingClassBreaksRenderer.getDefaultSymbol()
orUniqueValueRenderer.getDefaultSymbol()
. If there is no default symbol defined, aggregate geoelements will not draw.Note: Updating the renderer causes data to be re-aggregated.
Attempting to set the value to null will throw a NullPointerException exception.
- Parameters:
renderer
- the value for therenderer
property- Since:
- 200.3.0
- See Also:
-
showLabelsProperty
True to display labels for aggregated geoelements, false to turn them off.The default value is true.
- Returns:
- the
showLabels
property - Since:
- 200.3.0
- See Also:
-
isShowLabels
public boolean isShowLabels()Gets the value of theshowLabels
property.- Property description:
- True to display labels for aggregated geoelements, false to turn them off.
The default value is true.
- Returns:
- the value of the
showLabels
property - Since:
- 200.3.0
- See Also:
-
setShowLabels
public void setShowLabels(boolean showLabels) Sets the value of theshowLabels
property.- Property description:
- True to display labels for aggregated geoelements, false to turn them off.
The default value is true.
- Parameters:
showLabels
- the value for theshowLabels
property- Since:
- 200.3.0
- See Also:
-
isPopupEnabled
public boolean isPopupEnabled()Description copied from interface:PopupSource
Checks if the pop-up definition returned fromPopupSource.getPopupDefinition()
is enabled or disabled.- Specified by:
isPopupEnabled
in interfacePopupSource
- Returns:
- true if the pop-up definition is enabled; false otherwise. Will return false if an error occurs.
- See Also:
-
setPopupEnabled
public void setPopupEnabled(boolean enabled) Description copied from interface:PopupSource
Sets whether the pop-up definition returned fromPopupSource.getPopupDefinition()
is enabled or disabled.- Specified by:
setPopupEnabled
in interfacePopupSource
- Parameters:
enabled
- true to enable the PopupDefinition; false otherwise- See Also:
-
getPopupDefinition
Description copied from interface:PopupSource
Gets the PopupDefinition that is currently defined or set on the entity.- Specified by:
getPopupDefinition
in interfacePopupSource
- Returns:
- the current PopupDefinition. Will return null if an error occurs or if the pop-up source is not associated with a pop-up definition.
- See Also:
-
setPopupDefinition
Description copied from interface:PopupSource
Sets a new PopupDefinition on the entity, overriding any previously existing one.- Specified by:
setPopupDefinition
in interfacePopupSource
- Parameters:
popupDefinition
- the PopupDefinition to set- See Also:
-