Class TLspLayer

java.lang.Object
com.luciad.view.lightspeed.layer.ALspLayer
com.luciad.view.lightspeed.layer.TLspLayer
All Implemented Interfaces:
ILcdPropertyChangeSource, ILcdSelection<Object>, ILcdLayer, ILspSnappable, ILspEditableStyledLayer, ILspInteractivePaintableLayer, ILspLayer, ILspPaintableLayer, ILspStyledLayer, Serializable
Direct Known Subclasses:
TLspLayerTreeNode

Default implementation of ILspInteractivePaintableLayer.

The recommended way to create layers is through the layer builder mechanism. The minimal setup of a TLspLayer comprises setting a model and a painter. Additionally, an editor may be set to provide support for graphical editing of domain objects in this layer's model.

There are a number of ways to reduce the amount of data that is painted by a layer. Using these can significantly reduce the memory usage and increase the performance of a layer:

The layer determines asynchronously what objects need to be painted. This ensures a smooth user interaction. The layer uses the ILspTaskExecutor of the view for any asynchronous operation.

Note that a TLspLayer can be added to a single ILspView.

Data filtering

The data that gets loaded and visualized on the layer can be controlled at multiple locations:
  • By defining a scale range on the layer, you can control for which map scales the layer gets painted.
  • During a paint operation, the layer queries the model for the available data. The layer will retrieve the filter for the current scale of the view from the getModelQueryConfiguration() model query configuration} and use that filter to limit the data it requests from the model. This filtering happens at the model side, meaning that all the data that is filtered out is not transferred from the model to the layer.
  • In order to visualize the queried domain objects, they are passed to the ALspStyler. Before passing the domain objects, the layer will first apply the filter to remove all objects which are not accepted by the filter. This filtering happens at the layer side. This means that the data is first transferred to the layer when the layer queries the model, and only then discarded.
  • The ALspStyler itself can decide to not visualize certain objects by not submitting them on the style collector.
  • You can specify a minimum size, in pixels on the screen, before objects appear. For example, if you specify a minimum size of 5, an object is displayed only if its geometry would be about 5x5 pixels large on the screen.

Data filtering in 3D

Unlike a 2D view, a 3D view does not have a single map scale, every point in the visible area in a 3D view has another scale.

If you have a model query configuration on a layer in 3D, the layer will use different OGC conditions for different regions in your view at the same time. For example, within one view you can have major roads in the distance as well as minor roads nearby.

Similarly, the scale range of a layer in a 3D view is applied using a local scale instead of a single scale per view. Within one view the layer can load data for nearby regions within the scale range, and leave out data for regions outside the scale range.

The "minimum object size for painting" setting on a layer is also applied adaptively. The layer can load smaller elements near the viewer and only larger elements further in the distance.

Since:
2012.0
See Also:
  • Constructor Details

    • TLspLayer

      public TLspLayer(ILcdModel aModel, String aLabel, ILspLayer.LayerType aLayerType)
      Initializes a new TLspLayer object with given model, label and layer type.
      Parameters:
      aModel - the model that is to be added to the new layer
      aLabel - the label of the new layer
      aLayerType - the LayerType of the new layer
    • TLspLayer

      public TLspLayer(ILcdModel aModel, ILspLayer.LayerType aLayerType)
      Initializes a new TLspLayer object with given model and layer type.
      Parameters:
      aModel - the model that is to be added to the new layer
      aLayerType - the LayerType of the new layer
    • TLspLayer

      public TLspLayer(ILcdModel aModel, String aLabel)
      Initializes a new TLspLayer object with given model and label.
      Parameters:
      aModel - the model that is to be added to the new layer
      aLabel - the label of the new layer
    • TLspLayer

      public TLspLayer(ILcdModel aModel)
      Initializes a new TLspLayer object with the given model and the display name of the model's ILcdModelDescriptor as the layer label.
      Parameters:
      aModel - the model to assign to the new layer
  • Method Details