Class TLfnPointCloudPreprocessor

java.lang.Object
com.luciad.fusion.pointcloud.TLfnPointCloudPreprocessor
All Implemented Interfaces:
ILcdStatusSource

public class TLfnPointCloudPreprocessor extends Object implements ILcdStatusSource
Preprocesses point cloud data from different data sources into a single point cloud store.

Supported input

This preprocessor supports all point cloud data supported by TLcdLASModelDecoder and TLcdE57ModelDecoder. It only processes the attributes that are common to all of the data sources. When the target store already exists, only data sources having (at least) the same attributes as those already present in the target start are processed.

How to use the output data

The output data store uses the Luciad point cloud data format, a file-based storage format consisting of several files and folders that can contain and efficiently retrieve tiled and multi-leveled data.

To open the directly in a Lightspeed-based client such as Lucy, open the "tileset.json" found in the root of the output directory.

To import the output data into LuciadFusion Studio, add the entire output directory as a "Data Root". Once the data root has been crawled, you should be able to see a new data entry that represents the preprocesed dataset in your "Data" tab. To serve it, create a new Service using this dataset, and set the service type to "OGC 3D Tiles".

Both of these use-cases will make use of the TLcdPointCloudModelDecoder. This model decoder can be used to decode the output of this preprocessor.

Tiling process

The preprocessing itself consists of going through all the input datasets, and splitting them up into smaller pieces. The preprocessing also creates voxelized, lower-quality tiles that a client can use to visualize the dataset at a larger distance. This generally reduces the amount of bandwidth needed to visualize a dataset.

How to use

Construction of a point cloud processor is done through the builder mechanism. After creating the preprocessor, you will need to start it. The preprocessor has a running state and allows monitoring its progress.

The following snippet demonstrates how to create and start a preprocessor:

 List sourceNames = Arrays.asList("path/to/file1.las", "path/to/file2.las");
 TLfnPointCloudPreprocessor preprocessor = TLfnPointCloudPreprocessor.newBuilder()
  .sources(sourceNames)
  .targetDirectory("path/to/myoutput")
  .name("Example Store")
  .pointCloudCompression(ELcdOGC3DTilesPointCloudCompressionType.DRACO)
  .tempDirectory("path/to/temp")
  .build();
  preprocessor.start();
 
Since:
2018.1
See Also:
  • Method Details

    • newBuilder

      public static TLfnPointCloudPreprocessor.Builder newBuilder()
      Creates a new builder with the default values.
      Returns:
      the new builder.
    • start

      public void start() throws IOException, CancellationException
      Starts pre-processing. This method blocks until pre-processing is finished (successfully or because an exception occurred). During this time, the preprocessor is considered to be running.
      Throws:
      IOException - if an IO problem occurs
      CancellationException - if aborted using stop()
      IllegalStateException - if the process was already started
      IllegalStateException - If the sources could not be processed (invalid input directory)
      See Also:
    • isRunning

      public boolean isRunning()
      Returns whether or not the preprocessing is running.
      Returns:
      true if the preprocessing is running; false otherwise.
    • getSources

      public List<String> getSources()
      Retrieves the data sources to be preprocessed.
      Returns:
      list of sources.
    • getProgress

      Retrieves instantaneous progress information about the ongoing processing.
      Returns:
      the progress, or null if not processing
    • stop

      public void stop()
      Stops pre-processing if it is still ongoing. It may take a short amount of time before the start() call being aborted actually stops. Calling stop() while the preprocessor is not running has no effect.

      Calling stop() will leave the existing flushed files in the specified output path. It does not clean up this path. It is possible to call start() again on a partially completed output directory, which will skip any previously processed work.

      Throws:
      IllegalStateException - if the point cloud preprocessor was already stopped.
    • addStatusListener

      public void addStatusListener(ILcdStatusListener aStatusListener)
      Description copied from interface: ILcdStatusSource

      Registers the given listener so it will receive status events from this source.

      In case you need to register a listener which keeps a reference to an object with a shorter life-time than this status source, you can use a ALcdWeakStatusListener instance as status listener.

      Specified by:
      addStatusListener in interface ILcdStatusSource
      Parameters:
      aStatusListener - The listener to be notified when the status has changed.
    • removeStatusListener

      public void removeStatusListener(ILcdStatusListener aStatusListener)
      Description copied from interface: ILcdStatusSource
      Removes the specified listener so it is no longer notified.
      Specified by:
      removeStatusListener in interface ILcdStatusSource
      Parameters:
      aStatusListener - The listener to remove.