Package com.luciad.format.gee
Class TLcdGEEModelDecoder
java.lang.Object
com.luciad.format.gee.TLcdGEEModelDecoder
- All Implemented Interfaces:
ILcdInputStreamFactoryCapable
,ILcdModelDecoder
@LcdService(service=ILcdModelDecoder.class,
priority=20000)
public class TLcdGEEModelDecoder
extends Object
implements ILcdModelDecoder, ILcdInputStreamFactoryCapable
Decodes fused imagery from Google Earth Enterprise repositories.
The current version of the decoder will first make an attempt to decode PYR files found in a directory such as "product.kia/ver001/raster.kip". If these files are not available or decoding fails it will try to decode the imagery encoded in bundle files. These files can be found in a directory such as "CombinedRP.kia/packgen.kia/packlevel00.kia/ver001/packlevel00.kipacket". Only the first bundle file of a level will be decoded.
Input Files
File | Required | Entry point | Description |
---|---|---|---|
*.kiasset | X | X | A directory containing the Google Earth Enterprise image repository |
Supported file transfer protocols
- This model decoder decodes data from a file system.
Model structure
- The resulting model is an
ILcd2DBoundsIndexedModel
. - This model decoder creates a model with a single domain object.
- An
ALcdImage
can be obtained from the domain object usingALcdImage.fromDomainObject(java.lang.Object)
.
Model elements
- Each decoded model contains a single
ALcdImage
element.
Image structure
- the image is an
ALcdMultilevelImageMosaic
- bounds can differ at different levels. Typically they become smaller as you zoom in.
- tile sizes can differ at different levels
Model descriptor
- The returned model has a model descriptor with "Google Earth Enterprise" as type name.
- The model descriptor of the model is an
ILcdImageModelDescriptor
. - The decoded source name is the display name of the model descriptor.
Model reference
The returned model has a reference which implements eitherILcdGeodeticReference
or ILcdGridReference
.
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.
Sample code
// decode the model TLcdGEEModelDecoder decoder = new TLcdGEEModelDecoder(); ILcdModel model = decoder.decode(aSource); // retrieve the image data Object domainObject = model.elements().nextElement(); ALcdImage image = ALcdImage.fromDomainObject(domainObject);
Known limitations
This decoder is currently in beta status.The current version of the decoder will first make an attempt to decode PYR files found in a directory such as "product.kia/ver001/raster.kip". If these files are not available or decoding fails it will try to decode the imagery encoded in bundle files. These files can be found in a directory such as "CombinedRP.kia/packgen.kia/packlevel00.kia/ver001/packlevel00.kipacket". Only the first bundle file of a level will be decoded.
- Since:
- 2016.0
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecodeSource
(String aSource) Checks whether this model decoder can decode the specified data source.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.void
setInputStreamFactory
(ILcdInputStreamFactory aInputStreamFactory) Sets the input stream factory to be used.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
-
TYPE_NAME
- See Also:
-
-
Constructor Details
-
TLcdGEEModelDecoder
public TLcdGEEModelDecoder()
-
-
Method Details
-
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 whether this model decoder can decode the specified data source. Refer to the class javadoc for more information on the supported data sources.- Specified by:
canDecodeSource
in interfaceILcdModelDecoder
- Parameters:
aSource
- the directory containing the repository- Returns:
true
if the given source name matches a directory that this decoder can decode,false
otherwise.- See Also:
-
decode
Creates a new model from the given data source.- Specified by:
decode
in interfaceILcdModelDecoder
- Parameters:
aSourceName
- the directory containing the repository- Returns:
- a model containing the decoded data.
- 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:
-
setInputStreamFactory
Sets the input stream factory to be used.- Specified by:
setInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Parameters:
aInputStreamFactory
- the input stream factory to be used.
-
getInputStreamFactory
Returns the input stream factory that is used.- Specified by:
getInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Returns:
- the input stream factory that is used.
-