Class ClusteringFeatureReduction

All Implemented Interfaces:
PopupSource

public final class ClusteringFeatureReduction extends AggregationFeatureReduction
Method for aggregating and summarizing features in a point FeatureLayer in dynamic rendering mode (FeatureLayer.RenderingMode.DYNAMIC). Clustering is configured via the FeatureLayer.featureReductionProperty() property of the FeatureLayer.

Feature clustering allows you to visually represent large numbers of point geoelements in relatively small areas by aggregating them into clusters. Each cluster of two or more points is represented with an AggregateGeoElement that has its own symbol. If a point feature is not clustered, it continues to draw as an individual feature using the layer's renderer. As a user navigates the map, clusters update dynamically depending on the map's scale and extent. Feature clustering only applies to layers with point geometries in a 2D map. It does not apply to layers with polyline and polygon geometries and is not supported in 3D.

In such unsupported scenarios, the original features are drawn and LayerViewState is bubbled up indicating the appropriate error. The symbol for the cluster is determined by the renderer passed to ClusteringFeatureReduction and cluster symbol size is always determined by the count of features in a cluster. At present, this API does not support configuring cluster symbol size from another AggregateField.

Since:
200.2.0
  • Property Details

    • maxSymbolSize

      public DoubleProperty maxSymbolSizeProperty
      The symbol size of the largest cluster in device-independent pixels. The default value is 70.

      The ClusteringFeatureReduction#maxSymbolSizeProperty() and radiusProperty() complement each other. If you adjust one, you should adjust the other (a larger ClusteringFeatureReduction.maxSymbolSizeProperty() should have a larger ClusteringFeatureReduction.radiusProperty()). Note, if a custom renderer is defined for clusters and that renderer contains size visual variables, this property is ignored and cluster sizes are determined using the cluster renderer's size variable.

      The maxSymbolSize value must be a non-negative number.

      Since:
      200.3.0
      See Also:
    • minSymbolSize

      public DoubleProperty minSymbolSizeProperty
      The symbol size of the smallest cluster in device-independent pixels. The default value is 12.

      If a custom renderer is defined for the clusters, and that renderer contains size visual variables, this property is ignored and cluster sizes are determined using the cluster renderer's size variable.

      The minSymbolSize value must be a non-negative number.

      Since:
      200.3.0
      See Also:
    • radius

      public DoubleProperty radiusProperty
      The radius in device-independent pixels of the area in which multiple points will be grouped and visualized as a single cluster. The default value is 60.

      If you don't want cluster graphics to overlap, the ClusteringFeatureReduction#radiusProperty() should be larger than the maxSymbolSizeProperty().

      The radius value must be a non-negative number.

      Since:
      200.3.0
      See Also:
  • Constructor Details

  • Method Details

    • maxSymbolSizeProperty

      public DoubleProperty maxSymbolSizeProperty()
      The symbol size of the largest cluster in device-independent pixels. The default value is 70.

      The ClusteringFeatureReduction#maxSymbolSizeProperty() and radiusProperty() complement each other. If you adjust one, you should adjust the other (a larger ClusteringFeatureReduction.maxSymbolSizeProperty() should have a larger ClusteringFeatureReduction.radiusProperty()). Note, if a custom renderer is defined for clusters and that renderer contains size visual variables, this property is ignored and cluster sizes are determined using the cluster renderer's size variable.

      The maxSymbolSize value must be a non-negative number.

      Since:
      200.3.0
      See Also:
    • getMaxSymbolSize

      public double getMaxSymbolSize()
      Gets the value of the property maxSymbolSize.
      Property description:
      The symbol size of the largest cluster in device-independent pixels. The default value is 70.

      The ClusteringFeatureReduction#maxSymbolSizeProperty() and radiusProperty() complement each other. If you adjust one, you should adjust the other (a larger ClusteringFeatureReduction.maxSymbolSizeProperty() should have a larger ClusteringFeatureReduction.radiusProperty()). Note, if a custom renderer is defined for clusters and that renderer contains size visual variables, this property is ignored and cluster sizes are determined using the cluster renderer's size variable.

      The maxSymbolSize value must be a non-negative number.

      Since:
      200.3.0
    • setMaxSymbolSize

      public void setMaxSymbolSize(double maxSymbolSize)
      Sets the value of the property maxSymbolSize.
      Property description:
      The symbol size of the largest cluster in device-independent pixels. The default value is 70.

      The ClusteringFeatureReduction#maxSymbolSizeProperty() and radiusProperty() complement each other. If you adjust one, you should adjust the other (a larger ClusteringFeatureReduction.maxSymbolSizeProperty() should have a larger ClusteringFeatureReduction.radiusProperty()). Note, if a custom renderer is defined for clusters and that renderer contains size visual variables, this property is ignored and cluster sizes are determined using the cluster renderer's size variable.

      The maxSymbolSize value must be a non-negative number.

      Since:
      200.3.0
    • minSymbolSizeProperty

      public DoubleProperty minSymbolSizeProperty()
      The symbol size of the smallest cluster in device-independent pixels. The default value is 12.

      If a custom renderer is defined for the clusters, and that renderer contains size visual variables, this property is ignored and cluster sizes are determined using the cluster renderer's size variable.

      The minSymbolSize value must be a non-negative number.

      Since:
      200.3.0
      See Also:
    • getMinSymbolSize

      public double getMinSymbolSize()
      Gets the value of the property minSymbolSize.
      Property description:
      The symbol size of the smallest cluster in device-independent pixels. The default value is 12.

      If a custom renderer is defined for the clusters, and that renderer contains size visual variables, this property is ignored and cluster sizes are determined using the cluster renderer's size variable.

      The minSymbolSize value must be a non-negative number.

      Since:
      200.3.0
    • setMinSymbolSize

      public void setMinSymbolSize(double minSymbolSize)
      Sets the value of the property minSymbolSize.
      Property description:
      The symbol size of the smallest cluster in device-independent pixels. The default value is 12.

      If a custom renderer is defined for the clusters, and that renderer contains size visual variables, this property is ignored and cluster sizes are determined using the cluster renderer's size variable.

      The minSymbolSize value must be a non-negative number.

      Since:
      200.3.0
    • radiusProperty

      public DoubleProperty radiusProperty()
      The radius in device-independent pixels of the area in which multiple points will be grouped and visualized as a single cluster. The default value is 60.

      If you don't want cluster graphics to overlap, the ClusteringFeatureReduction#radiusProperty() should be larger than the maxSymbolSizeProperty().

      The radius value must be a non-negative number.

      Since:
      200.3.0
      See Also:
    • getRadius

      public double getRadius()
      Gets the value of the property radius.
      Property description:
      The radius in device-independent pixels of the area in which multiple points will be grouped and visualized as a single cluster. The default value is 60.

      If you don't want cluster graphics to overlap, the ClusteringFeatureReduction#radiusProperty() should be larger than the maxSymbolSizeProperty().

      The radius value must be a non-negative number.

      Since:
      200.3.0
    • setRadius

      public void setRadius(double radius)
      Sets the value of the property radius.
      Property description:
      The radius in device-independent pixels of the area in which multiple points will be grouped and visualized as a single cluster. The default value is 60.

      If you don't want cluster graphics to overlap, the ClusteringFeatureReduction#radiusProperty() should be larger than the maxSymbolSizeProperty().

      The radius value must be a non-negative number.

      Since:
      200.3.0