Class DensitySettings

java.lang.Object
com.luciad.layers.features.DensitySettings
All Implemented Interfaces:
AutoCloseable

public final class DensitySettings extends Object implements AutoCloseable
DensitySettings are used on a feature layer to enable and configure density painting.

When density painting is active, the color map in the density settings is used to determine the colors of shapes. The IFeaturePainter determines which shapes are drawn. The density level is based on the amount of overlapping features that are drawn by the IFeaturePainter, with the alpha value serving as a weight. The color is derived from the ColorMap using the density level.

For example, a region with two overlapping features, where one has an alpha of 0.75 and the other an alpha of 0.5, has a density level of 1.25. The color of this region is equal to colorMap.retrieveColor(1.25).

Notes:

  • Labels are still rendered normally.
  • Complex strokes are ignored.
  • Draped and non-draped shapes won't interact with each other. For example: elevated polylines will not be affected by the density level of draped shapes.
Since:
2024.1
  • Constructor Details Link icon

    • DensitySettings Link icon

      public DensitySettings(@NotNull ColorMap colorMap)
      Constructs density painting settings based on the given color mapping.
      Parameters:
      colorMap - the color mapping to be used for density painting.
  • Method Details Link icon

    • finalize Link icon

      protected void finalize()
      Overrides:
      finalize in class Object
    • close Link icon

      public void close()
      Specified by:
      close in interface AutoCloseable
    • getColorMap Link icon

      @NotNull public ColorMap getColorMap()
      Returns the color mapping used for density painting.
      Returns:
      the color mapping used for density painting.