Package com.luciad.view.lightspeed.style
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
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:
TLspDensityLineStyle.newBuilder()
for linesTLspDensityPointStyle.newBuilder()
for pointsTLspDensityFillStyle.newBuilder()
for fills
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.
- Since:
- 2012.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
ALspDensityStyle.Builder<B extends ALspDensityStyle.Builder<B>>
Builder used to create density styles.Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.style.ILspWorldElevationStyle
ILspWorldElevationStyle.ElevationMode
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the elevation mode of this style.float
Returns the weight of this density style.int
hashCode()
boolean
Whether thisALspDensityStyle
is transparent.Methods inherited from class com.luciad.view.lightspeed.style.ALspStyle
addStyleChangeListener, asBuilder, getZOrder, isCompatible, removeStyleChangeListener, style
-
Method Details
-
isTransparent
public boolean isTransparent()Whether thisALspDensityStyle
is transparent.This method overrides
ALspStyle.isTransparent()
and always returnsfalse
. If you want transparency, you should use a color model with transparent colors and pass that color model in aTLspIndexColorModelStyle
together with the density style.- Specified by:
isTransparent
in classALspStyle
- 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
Description copied from interface:ILspWorldElevationStyle
Returns the elevation mode of this style.- Specified by:
getElevationMode
in interfaceILspWorldElevationStyle
- Returns:
- The elevation mode.
-
equals
-
hashCode
public int hashCode()
-