Class TLcdDAFIFModelDecoder
- All Implemented Interfaces:
ILcdInputStreamFactoryCapable
,ILcdModelDecoder
Input files
File | Required | Entry point | Description |
---|---|---|---|
.*dafif.*\.toc | x | x |
DAFIF/DAFIFT file which is a root toc file and contains the ICAO regions for this root toc file |
*.txt | x | x |
DAFIFT file containing a DAFIFT formatted data |
*.bnd | x | x |
DAFIF file containing a DAFIF formatted data |
FILE* | x | x |
DAFIF file containing a DAFIF formatted data |
Supported file transfer protocols
- This model decoder supports all transfer protocols that are supported by
the
ILcdInputStreamFactory
of this decoder.
Model structure
- This model decoder returns a
model tree
with a model for each specific decoder that can decode the source (see the list of such decoders below). A decoder can produce a single model or anothermodel tree
. - Each leaf model is of the type
ILcd2DBoundsIndexedModel
,ILcdIntegerIndexedModel
andILcdFeatureIndexedModel
.
Model descriptor
- All models returned by this model decoder have a
TLcdDAFIF...Descriptor
. - 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
TLcdGeodeticReference
. - The used datum is a standard
TLcdGeodeticDatum
(WGS-84).
Model elements
- Each DAFIF model element is a lazy decoded model. The actual decoding occurs during the first access to the
model using for example
ILcdModel.elements()
. - These methods do not trigger lazy loading:
getModelDescriptor()
,getModelReference()
andgetBounds()
. Initially, the bounds are an estimation. The exact bounds can be retrieved after lazy loading was triggered.
Sample code
ILcdModelDecoder decoder = new TLcdDAFIFModelDecoder();
ILcdModel model = decoder.decode( "dafif.toc" );
Performance tips
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
- The LuciadLightspeed DAFIF decoders are based on edition 7 and 8 of the DAFIF specification.
Limitations
- The following information in DAFIF data is not decoded:
- RNAV precision approach path points
- Preferred routes
-
DAFIF data can be supplied with respect to different geodetic datums. In the LuciadLightspeed DAFIF component, the following geodetic datums are supported (specified by the three-character representations used in the DAFIF specification): ARF, CAP, EUR, EUS, KEA, MER, NAS, TOY, OEG, VOR, OGB, AFG, CHU, QAT, YAC, ZAN, LIB, LUZ, MIK, MAS, LEH, WGE, WGC, WGX, U.
Objects containing data given in an unsupported datum, will be ignored by the * decoder and thus not be added to the model.
- Since:
- 2014.0
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a new model decoder with thedefault object factory
and empty properties.TLcdDAFIFModelDecoder
(TLcdAISDataObjectFactory aDataObjectFactory, Properties aDAFIFProperties) Creates a new model decoder with a customobject factory
and optionally properties that define the filenames for each of the possibledata types
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecodeSource
(String aSource) Indicates whether the given source path can be decoded by this decoder.createModelDecodersForDataType
(TLcdDataType aDataType, Properties aProperties) Creates one or more delegate DAFIF model decoders for a given data type.Decode a source using this composite model decoder.Returns the (geodetic) bounds that will be used as a filter on the model created by this mode decoder.Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.Returns the input stream factory that is used.void
setBoundsToFilterOn
(ILcdBounds aBoundsToFilterOn) Specifies (geodetic) bounds that will be used as a filter on the model created by this model decoder.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
-
Constructor Details
-
TLcdDAFIFModelDecoder
public TLcdDAFIFModelDecoder()Creates a new model decoder with thedefault object factory
and empty properties. -
TLcdDAFIFModelDecoder
public TLcdDAFIFModelDecoder(TLcdAISDataObjectFactory aDataObjectFactory, Properties aDAFIFProperties) Creates a new model decoder with a customobject factory
and optionally properties that define the filenames for each of the possibledata types
. SeeTLcdDAFIFModelDecoderSupport
for more details on the possible property keys.- Parameters:
aDataObjectFactory
- The object factory to useaDAFIFProperties
- contains for each data type the associated file name, can benull
-
-
Method Details
-
createModelDecodersForDataType
public Collection<ILcdModelDecoder> createModelDecodersForDataType(TLcdDataType aDataType, Properties aProperties) Creates one or more delegate DAFIF model decoders for a given data type. These delegate model decoders will be used to check whether it is possible to decode a source file or to decode it effectively. In most cases, this method only returns one model decoder in a singleton list. For example: if the given datatype isTLcdDAFIFTDataTypes.Ortca
, a singleton list is returned which contains one instance ofTLcdDAFIFTOrtcaDecoder
. This method should only be overridden if it's needed to configure a specific model decoder.- Parameters:
aDataType
- The data type to create a model decoder for. The model decoder will create a model which contains objects with this data type.aProperties
- aProperties
object that contains for each domain object the appropriate file name. Usually this value is passed to the constructor of the DAFIF model decoders.- Returns:
- One or more model decoders that can decode file, which produces objects with the given data type.
- Since:
- 2024.0
-
setBoundsToFilterOn
Specifies (geodetic) bounds that will be used as a filter on the model created by this model decoder.If this bounds is
null
, all objects found in the data source will be inserted into the model. If this bounds is notnull
, only the objects whose bounds interact with the specified bounds will be inserted into the model.- Parameters:
aBoundsToFilterOn
- the bounds to be used as a filter- See Also:
-
getBoundsToFilterOn
Returns the (geodetic) bounds that will be used as a filter on the model created by this mode decoder.- Returns:
- the bounds that will be used as a filter on the model created by this model
- See Also:
-
getDisplayName
Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
. The display name is "DAFIF"- Specified by:
getDisplayName
in interfaceILcdModelDecoder
- Returns:
- the displayable name of this
ILcdModelDecoder
.
-
setInputStreamFactory
Description copied from interface:ILcdInputStreamFactoryCapable
Sets the input stream factory to be used.- Specified by:
setInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Parameters:
aInputStreamFactory
- the input stream factory to be used.
-
getInputStreamFactory
Description copied from interface:ILcdInputStreamFactoryCapable
Returns the input stream factory that is used.- Specified by:
getInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Returns:
- the input stream factory that is used.
-
canDecodeSource
Indicates whether the given source path can be decoded by this decoder.
See
decode(String)
for the possible source paths.- Specified by:
canDecodeSource
in interfaceILcdModelDecoder
- Parameters:
aSource
- The source path as defined indecode(String)
.- Returns:
true
if the source is a DAFIF(T) dataset,false
otherwise.- See Also:
-
decode
Decode a source using this composite model decoder. The source path can be:- A DAFIF file, for example
FILE0
- A DAFIFT file, for example
ARPT/ARPT.TXT
- A directory containing DAFIF or DAFIFT files, for example
ARPT
or a folder containing FILE0, ... - A
.toc
file in a directory with DAFIF or DAFIFT files - A
.toc
file in a directory with subdirectories containing DAFIF or DAFIFT files
.toc
file in a directory with subdirectories, the different model trees are merged together to have the same structure as for a single directory. The subdirectories have to be named after anICAO Region
(see alsoTLcdDAFIFDataPreparatorMain
).- Specified by:
decode
in interfaceILcdModelDecoder
- Parameters:
aSource
- The source path- Returns:
- A
model tree
- Throws:
IOException
- See Also:
- A DAFIF file, for example
-