Class TLspLIDARLayerBuilder

java.lang.Object
com.luciad.view.lightspeed.layer.ALspLayerBuilder
com.luciad.lidar.lightspeed.TLspLIDARLayerBuilder

public class TLspLIDARLayerBuilder extends ALspLayerBuilder
This builder is used to create a layer optimized for displaying large point clouds. Typically these point clouds are generated by LIDAR systems.

You can configure the following aspects using this builder:

This builder is similar to TLspPlotLayerBuilder, but with some other defaults:

  • Default styling:
    • Color: if the data type associated with the model has a property of type Color.
    • Height: otherwise, a color gradient is applied over the height range of the whole model.
  • Optimized painting performance: point size and visibility is automatically adapted based on the camera settings.
However, you can completely customize the styling and filtering by creating the default style and adapting it. See example below.

See newBuilder() for more default values.

Example with default styling:

   ILspLayer layer = TLspLIDARLayerBuilder.newBuilder()
                                          .model(myModel)
                                          .build()
 

Example with custom styling:

   TLspPlotStyle defaultStyle = getDefaultStyle(myModel);
   ILcdExpression<Color> myColorExpression = ...
   TLspPlotStyle myStyle = defaultStyle.asBuilder()
                                       .color(ifThenElse(myColorAvailable, myColorExpression, defaultStyle.getColor()));
                                       .build();
   ILspLayer layer = TLspLIDARLayerBuilder.newBuilder()
                                          .model(myModel)
                                          .bodyStyler(REGULAR, myStyle)
                                          .build()
 

Performance:

Since Lidar data typically consists of many millions of points, it can take up a large amount of video memory. LuciadLightspeed has a limit on the amount of data in its cache. If this limit is too low, it can have a severe impact on performance. To increase this cache, use the following system property, with values in megabytes:

     -Dcom.luciad.view.lightspeed.opengl.cacheSize=768
   
As an alternative, it is possible to limit the amount of points in the model. This can for example be done by using the TLcdLASModelDecoder#setMaxNumberOfPoints method.

Since:
2014.0