Package com.luciad.format.bci
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
- All models returned by this model decoder have an
ILcdGridReference
or anILcdGeodeticReference
.
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
(andILcdRaster
) 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 Summary
-
Constructor Summary
ConstructorDescriptionCreates a model decoder to decode BCI raster files.TLcdBCIRasterModelDecoder
(ILcdBuffer aBuffer) Creates a model decoder to decode BCI raster files. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecodeSource
(String aSourceName) Checks whetherTLcdBCIRasterModelDecoder
can decode the given data.Creates a new model from the given data source.Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.Returns the input stream factory that is used for creating input streams given source names.void
setInputStreamFactory
(ILcdInputStreamFactory aInputStreamFactory) Sets the input stream factory that will be used for creating input streams given source names.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.model.ILcdModelDecoder
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Field Details
-
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
Creates a model decoder to decode BCI raster files.- Parameters:
aBuffer
- the buffer to cache decoded raster tiles in.
-
-
Method Details
-
setInputStreamFactory
Sets the input stream factory that will be used for creating input streams given source names.- Specified by:
setInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Parameters:
aInputStreamFactory
- The input stream factory to be used for creating input stream.
-
getInputStreamFactory
Returns the input stream factory that is used for creating input streams given source names.- Specified by:
getInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Returns:
- the input stream factory that is used for creating input streams given source names.
-
getDisplayName
Description copied from interface:ILcdModelDecoder
Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.- Specified by:
getDisplayName
in interfaceILcdModelDecoder
- Returns:
- the displayable name of this
ILcdModelDecoder
.
-
canDecodeSource
Checks whetherTLcdBCIRasterModelDecoder
can decode the given data. The test is based on the source name, which should bematrxmap
(case insensitive). If this source name is recognized,true
is returned. In all other cases,false
is returned.- Specified by:
canDecodeSource
in interfaceILcdModelDecoder
- Parameters:
aSourceName
- the name of the file or URL that is to be decoded.- Returns:
true
if the source name ismatrxmap
(case insensitive),false
otherwise.- See Also:
-
decode
Description copied from interface:ILcdModelDecoder
Creates a new model from the given data source.- Specified by:
decode
in interfaceILcdModelDecoder
- 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:
-