Class TLcdBCIRasterModelDecoder

java.lang.Object
com.luciad.format.bci.TLcdBCIRasterModelDecoder
All Implemented Interfaces:
ILcdInputStreamFactoryCapable, ILcdModelDecoder

@LcdService(service=ILcdModelDecoder.class, priority=20000) public class TLcdBCIRasterModelDecoder extends Object implements ILcdModelDecoder, ILcdInputStreamFactoryCapable
This model decoder decodes BCI raster files. BCI is a proprietary format of Thales Communications, France.

Input files

File Required Entry point Description
{frame,rast}*‍/matrxmap x x file containing raster metadata
{frame,rast}*‍/qdr/*.qdr x
files containing the actual raster data
{frame,rast}*‍/vqtable

file containing a vector quantization table

Supported file transfer protocols

  • This model decoder supports all transfer protocols that are supported by the inputStreamFactory of this decoder.

Model structure

  • This model decoder creates a model per TAB file.
  • All models returned by this model decoder implement ILcd2DBoundsIndexedModel.

Model reference

Model descriptor

  • All models returned by this model decoder have a TLcdBCIRasterModelDescriptor.
  • The type name of the model descriptor is the display name of this decoder.

Model elements

  • Each decoded model contains one object: an ALcdImage (and ILcdRaster) instance.

Sample code


 ILcdModelDecoder decoder = new TLcdBCIRasterModelDecoder();

 ILcdModel model = decoder.decode("frame0033/matrxmap");
 

Performance tips

  • BCI rasters can be large. Precomputing and storing multiple levels of detail may speed up visualization and some computations. The TLcdGeoTIFFModelEncoder can create compressed multilevel GeoTIFF files that can replace the original BCI files.

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

  • Document de Maitrise des Interfaces (ICD), No. 46 315 200-558, Thales Communications (France)

Known limitations

  • Long matrxmap files, referring to multiple data sets, are not supported.
  • The reference systems Euro Lambert, UTM alpha, and UTM spec are not supported.

Requirements

  • This decoder is part of the BCI specialized package.
Since:
7.0.17
  • Field Details

    • DEFAULT_DISPLAY_NAME

      public static final String DEFAULT_DISPLAY_NAME
      The default display name of this decoder.
      See Also:
  • Constructor Details

    • TLcdBCIRasterModelDecoder

      public TLcdBCIRasterModelDecoder()
      Creates a model decoder to decode BCI raster files.
      See Also:
    • TLcdBCIRasterModelDecoder

      public TLcdBCIRasterModelDecoder(ILcdBuffer aBuffer)
      Creates a model decoder to decode BCI raster files.
      Parameters:
      aBuffer - the buffer to cache decoded raster tiles in.
  • Method Details

    • setInputStreamFactory

      public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
      Sets the input stream factory that will be used for creating input streams given source names.
      Specified by:
      setInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Parameters:
      aInputStreamFactory - The input stream factory to be used for creating input stream.
    • getInputStreamFactory

      public ILcdInputStreamFactory getInputStreamFactory()
      Returns the input stream factory that is used for creating input streams given source names.
      Specified by:
      getInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Returns:
      the input stream factory that is used for creating input streams given source names.
    • 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.
    • canDecodeSource

      public boolean canDecodeSource(String aSourceName)
      Checks whether TLcdBCIRasterModelDecoder can decode the given data.

      The test is based on the source name, which should be matrxmap (case insensitive). If this source name is recognized, true is returned. In all other cases, false is returned.

      Specified by:
      canDecodeSource in interface ILcdModelDecoder
      Parameters:
      aSourceName - the name of the file or URL that is to be decoded.
      Returns:
      true if the source name is matrxmap (case insensitive), false otherwise.
      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: