Class TLcdI3SModelDecoder

java.lang.Object
com.luciad.format.i3s.TLcdI3SModelDecoder
All Implemented Interfaces:
ILcdInputStreamFactoryCapable, ILcdModelDecoder

@LcdService(service=ILcdModelDecoder.class, priority=20000) public class TLcdI3SModelDecoder extends Object implements ILcdModelDecoder, ILcdInputStreamFactoryCapable
This model decoder decodes OGC I3S datasets.

Input

File Required Entry point Description
*.slpk x x The Scene Layer Package input file
https://.../SceneServer x x The I3S SceneServer endpoint

Supported transfer protocols

  • SceneServer endpoints and all resources referenced by them are accessed through the configured input stream factory . By default, the decoder uses a composite of the ILcdInputStreamFactory implementations registered as services, which supports HTTP(S) sources.
    You can set a custom input stream factory, for example to access authenticated SceneServer endpoints. The custom factory replaces the default factory and must be able to open the endpoint and every resource it references.
  • SLPK files are read directly from the file system. The configured input stream factory is not used for SLPK files.

Model structure

  • This model decoder creates a model per entry SLPK file or SceneServer endpoint.
  • This model decoder returns a single read-only ALcdModel.
  • By default, this decoder returns a flat model containing all geometry. When working with a Building Scene Layer dataset, you can preserve the sublayer grouping in a model tree. Set the setCreateModelTrees(boolean) flag to true for this behavior: the resulting model will be a model tree (an ILcdModelTreeNode) that preserves the I3S sublayer hierarchy.

Model descriptor

  • When the I3S dataset contains point cloud data in a Point Cloud Scene Layer (PCSL), the model descriptor will be an ILcdDataModelDescriptor. Although the elements in the model are not data objects themselves, you can still use the data model to access properties of individual points to build expressions for use in styling. Use ILcdDataModelDescriptor.getModelTypes() to obtain the single data type that consists of the properties available in the PCSL data.
  • For all other types of I3S datasets, the model descriptor will be an ILcdModelDescriptor.
  • The type name of the model descriptor is the display name of this decoder.

Model reference

  • All models returned by this model decoder have a geocentric reference.

Model elements

  • Each decoded model contains elements that extend Object.

Sample code

    ILcdModelDecoder decoder = new TLcdI3SModelDecoder();
    ILcdModel model = decoder.decode(sourceName);

Thread safety

  • The decoding of models is thread-safe, as long as no properties are changed during the decoding.
  • The decoded models are thread-safe for read access.

Supported versions and specifications

  • OGC I3S version 1.3
  • Supported scene layers:
    • Point Cloud
    • 3D Object
    • Building
    • Integrated Mesh

Known limitations

  • Point Scene Layers are not supported. Point Cloud Scene Layers are supported.
  • Draco-compressed mesh geometry is not supported. The decoder only uses the uncompressed geometry, which the I3S specification requires to be available alongside Draco-compressed geometry.
  • When a SceneServer endpoint defines multiple Scene Layers, only the first layer will be decoded.
Since:
2026.1
  • Field Details

  • Constructor Details

    • TLcdI3SModelDecoder

      public TLcdI3SModelDecoder()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Description copied from interface: ILcdModelDecoder
      Returns a short, displayable name for the format that is decoded by this ILcdModelDecoder.
      Specified by:
      getDisplayName in interface ILcdModelDecoder
      Returns:
      the displayable name of this ILcdModelDecoder.
    • getInputStreamFactory

      public ILcdInputStreamFactory getInputStreamFactory()
      Description copied from interface: ILcdInputStreamFactoryCapable
      Returns the input stream factory that is used.
      Specified by:
      getInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Returns:
      the input stream factory that is used.
    • setInputStreamFactory

      public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
      Description copied from interface: ILcdInputStreamFactoryCapable
      Sets the input stream factory to be used.
      Specified by:
      setInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Parameters:
      aInputStreamFactory - the input stream factory to be used.
    • canDecodeSource

      public boolean canDecodeSource(String aSourceName)
      Description copied from interface: ILcdModelDecoder
      Checks whether this model decoder can decode the specified data source. It is acceptable for this method to return true for a source name while decode throws an exception for that same source name.

      For performance reasons, we strongly recommend that this will only be a simple test. For example: check the file extension of a file, but not that the file exists or contains expected content.

      Specified by:
      canDecodeSource in interface ILcdModelDecoder
      Parameters:
      aSourceName - the data source to be verified; typically a file name or a URL.
      Returns:
      true if this decoder can likely decode the data specified by the source name, false otherwise.
      See Also:
    • isCreateModelTrees

      public boolean isCreateModelTrees()
      Returns whether the decoder preserves the I3S sublayer grouping in a model tree.
      Returns:
      true if the decoder creates a model tree, false if it returns a flat model.
      See Also:
    • setCreateModelTrees

      public void setCreateModelTrees(boolean aCreateModelTrees)
      Sets whether the decoder preserves the I3S sublayer grouping in a model tree.

      When set to true (the default), the resulting model will be an ILcdModelTreeNode that preserves the I3S sublayer hierarchy. When set to false, the decoder returns a flat model containing all the geometry.

      Note that this only applies to Building scene layers.

      Parameters:
      aCreateModelTrees - true to create a model tree, false for a flat model.
      See Also:
    • decode

      public ILcdModel decode(String aSourceName) throws IOException
      Description copied from interface: ILcdModelDecoder
      Creates a new model from the given data source.
      Specified by:
      decode in interface ILcdModelDecoder
      Parameters:
      aSourceName - the data source to be decoded; typically a file name or a URL.
      Returns:
      A model containing the decoded data. While null is allowed, implementors are advised to throw an error instead.
      Throws:
      IOException - for any exceptions caused by IO problems or invalid data. Since decoding invalid data almost always results in RunTimeExceptions (NullPointerException, IndexOutOfBoundsException, IllegalArgumentException, ...) on unexpected places, implementations are advised to catch RuntimeExceptions in their decode() method, and wrap them into an IOException, as illustrated in the code snippet below.
      
         public ILcdModel decode( String aSourceName ) throws IOException {
            try (InputStream input = fInputStreamFactory.createInputStream(aSourceName)) {
               // Perform decoding ...
            } catch (RuntimeException e) {
               throw new IOException(e);
            }
         }
       
      See Also: