Class ALspDensityStyle

java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.style.ALspDensityStyle
All Implemented Interfaces:
ILspWorldElevationStyle, ILspStyler
Direct Known Subclasses:
ALspSoftDensityStyle, TLspDensityFillStyle

public abstract class ALspDensityStyle extends ALspStyle implements ILspWorldElevationStyle

A style which describes density plots. Visualizing density plots of vector data is done with the TLspShapeLayerBuilder in combination with ALspDensityStyle instances. Controlling the color mapping is done by specifying a TLspIndexColorModelStyle as well.

Density styles are created using a builder class:

For lines and points, you can control the width and the hardness of the density plot:

  • Width: the density plot can be displayed with pixel-sized density or world-sized density.
    With pixel-sized density, the width is specified in pixels. A density plot with pixel-sized width adapts when the zoom level changes.
    With world-sized density, the width is specified in world size, with respect to the world reference. A density plot with world-sized width remains fixed when the zoom level changes.
  • Hardness: this parameter controls to what extent the influence of a shape on the density plot decreases with distance. You can specify any value within the range of 0 and 1.
    With a hardness value of 0, the influence of a shape decreases fast.
    With a hardness value of 1, the influence of the shape remains constant over the entire width of the line.
    This results in very blurry plot lines when the hardness is set to 0, while the plot lines are sharp when the hardness is set to 1. This effect is illustrated in the picture below.
Density plots
Density styles with hardness 0.2 (left) and 1.0 (right)
Since:
2012.0
See Also:
  • Method Details

    • isTransparent

      public boolean isTransparent()
      Whether this ALspDensityStyle is transparent.

      This method overrides ALspStyle.isTransparent() and always returns false. If you want transparency, you should use a color model with transparent colors and pass that color model in a TLspIndexColorModelStyle together with the density style.

      Specified by:
      isTransparent in class ALspStyle
      Returns:
      Whether this ALspDensityStyle is transparent.
    • getWeight

      public float getWeight()
      Returns the weight of this density style. The weight is a value between 0 and 1 which specifies how much this style contributes to the computed density values. A value of 0 means no contribution at all, and a value of 1 (the default) means that each object increments the density value by 1.
      Returns:
      the weight of this density style
      See Also:
    • getElevationMode

      public ILspWorldElevationStyle.ElevationMode getElevationMode()
      Description copied from interface: ILspWorldElevationStyle
      Returns the elevation mode of this style.
      Specified by:
      getElevationMode in interface ILspWorldElevationStyle
      Returns:
      The elevation mode.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class ALspStyle
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ALspStyle