A raster styling consists of the style of the raster data itself and the style of the data bounds. The data bounds are displayed if the raster data is not suited for the current view, when the data is too detailed for a zoomed-out view for example.
This article discusses the use of |
Styling raster data with TLspRasterStyle
You can use TLspRasterStyle
to define the style of raster data. The elevation mode of this style is ON_TERRAIN
by default.
You can change the point at which the raster data or its bounds are visualized by setting the startResolutionFactor
.
Note that you need to set a ColorMap
on the style if you want to visualize elevation data as a colored texture on the terrain. Otherwise, the elevation data will
only be used to elevate the terrain.
For more information about customizing the terrain visualization itself, see Terrain visualization.
TLspRasterStyle
Styling the raster data bounds: TLspLineStyle
and TLspFillStyle
You can use TLspLineStyle
and TLspFillStyle
to define the appearance of the raster data bounds. Note that you typically need to enable draping on the style explicitly.
TLspLineStyle
and TLspFillStyle
Color manipulation using TLspColorLookupTableFilterStyle
You can manipulate the colors of a raster layer by adding a TLspColorLookupTableFilterStyle
to the layer. This style defines one or more color lookup tables, which are indexed using the red, green and blue
components of the pixels in the raster, and which produce a new color as output. The color lookup is performed
on the GPU, and therefore has very little performance cost.
Color lookup tables allow for a wide variety of image processing operations, such as:
-
Brightness and contrast adjustments
-
Replacing one color with another, making all black pixels in a raster transparent for example
-
Swapping color channels, converting BGR to RGB for example
For more details, see the reference documentation of the com.luciad.view.lightspeed.style.filter
package and TLspRasterLayerBuilder
class.
As mentioned above, you can perform more elaborate image processing, including color lookup operations, by using |