Class TLcdLuciadPanoramaModelEncoder

java.lang.Object
com.luciad.format.panorama.TLcdLuciadPanoramaModelEncoder
All Implemented Interfaces:
ILcdModelEncoder, ILcdStatusSource, Serializable

@LcdService(service=ILcdModelEncoder.class, priority=20000) public class TLcdLuciadPanoramaModelEncoder extends Object implements ILcdModelEncoder, ILcdStatusSource
Encodes panoramic image models to the Luciad Panorama Format.

Relevance

See the Panorama guide for more information.

This encoder will create multi-leveled tiled cubemap panoramas, for optimal loading in the RIA scene.

Supported input models

This model encoder handles only models that contain panoramic imagery.

This encoder handles models whose model descriptor implements ILcdPanoramaModelDescriptor. This implies that its elements implement ILcdPanorama. The panoramic models that are created by our decoders (such as TLcdPegasusModelDecoder) fulfill these requirements.

For more information on how you can create your own decoder, see this article.

Output

This encoder outputs a Luciad Panorama dataset. Specifically:

Example

Decoding a Leica Pegasus panoramic dataset and encoding it into a Luciad Panorama cubemap.json.
    // Load a Pegasus panoramic dataset
    ILcdModelDecoder decoder = new TLcdPegasusModelDecoder();
    ILcdModel model = decoder.decode("/path/to/pegasus/External Orientation.csv");

    // Encode to GeoJSON
    ILcdModelEncoder encoder = new TLcdLuciadPanoramaModelEncoder();
    encoder.export(model, "/path/to/cubemap/cubemap.json");

Thread-safety

This encoder is not thread-safe for concurrent writing.

Other notes

  • This encoder uses multiple threads (number of processors - 1) in parallel to do the processing. You can change this with the system property "com.luciad.format.panorama.TLcdLuciadPanoramaModelEncoder.parallelism".
  • You can abort processing by calling stop(), or even killing the process. If you then restart export(com.luciad.model.ILcdModel, java.lang.String), this encoder will automatically try to resume processing from where it got interrupted. When processing a model, this encoder will skip the generation of any cubemap image which already exists in the output location. If you wish to restart processing from scratch, you must first clean the output directory.
  • You can plug in your own encoder to save the cubemap position and metadata information. For example, you can plug in a TLcdPostGISModelEncoder to save the cubemap information in a database. By default, the cubemap information is stored as GeoJSON.
  • You can process multiple input datasets to the same output. The new panoramas will be appended, as long as they have a unique primary key (feature id). By default, an incrementing number is used, but you can override this behaviour and provide your own primary keys. To use the primary key of the input model, use ILcdOGCFeatureIDRetriever.createDefaultFeatureIDRetriever(ILcdModel).
  • There are several settings impact the processing speed and/or quality: setMaximumTileSize(int), setResolutionFactor(double), setResampleGridSize(int), setCompressionQuality(double).
  • The setElementProcessingParameters(int, long, int) method allows you to gain quick insight in a specific large input dataset by skipping elements, limiting the number of elements, or processing only every n-th element.

Since:
2020.1
See Also: