This guide shows how to decode DAFIF data defined according to the Edition 8 specifications.
You can recognize the DAFIF Edition 8 specific classes by the prefix DAFIFT
. The
extra 'T' stands for the tab-delimited record layout of this specification.
More information on the individual DAFIFT classes can be found in the reference guide in the subpackages of the com.luciad.format.dafift
package.
For example the package com.luciad.format.dafift.model
contains more information about the DAFIFT domain model.
Similar to DAFIF, you can simply decode the data using |
Preparing DAFIFT data
What does 'preparing' DAFIFT data mean?
Like DAFIF Edition 7 data files, DAFIF Edition 8 (or DAFIFT) data files can be very large. Decoding these large files is time-consuming, and unnecessary if you are interested in only a small part of it.
Therefore, the DAFIF package provides a class, TLcdDAFIFTDataPreparatorMain
, that
is able to divide large data files into smaller ones. This division is based on the ICAO
region found in the records.
Given a directory containing one or more DAFIFT files, the TLcdDAFIFTDataPreparatorMain
class will create a new directory tree, starting from the path specified in the configuration file for the data preparation.
The root of the tree contains a sub-directory for each ICAO region found in the source data. Each sub-directory contains:
-
The records containing the ICAO region of the sub-directory name, organized in files with the same names as the source files
-
A file named
dafift.toc
, containing the property:icao.region=< ICAO code>
. This code represents the ICAO region of this data structure.
The result of running the TLcdDAFIFTDataPreparatorMain
class will look like this:
- < split _ directory > - AG - ARPT ACOM.TXT ACOM_RMK.TXT ... - BDRY BDRY.TXT BDRY_PAR.TXT ... ... dafift.toc - AN - ARPT ACOM.TXT ACOM_RMK.TXT ... - BDRY BDRY.TXT BDRY_PAR.TXT ... ... dafift.toc ... dafift.toc
How to prepare DAFIFT data?
To prepare the DAFIF Edition 8 data, the DAFIFT data preparator needs a configuration
file. You must specify the path to the configuration file as a program parameter
when running the TLcdDAFIFTDataPreparatorMain
. The configuration file must
contain the following attributes:
-
filechooser_initial_directory
: specifies the base directory for the file chooser. It will be used to choose the source directory. You must define either this attribute, or thefullall_directory
attribute. -
fullall_directory
: specifies the path to the source directory. Define either this attribute, or thefilechooser_initial_directory
attribute. -
split_directory
: specifies the top directory for the result of the splitting process.
Decoding DAFIFT data
The TLcdDAFIFModelDecoder
can decode a single DAFIFT file, ARPT/ARPT.TXT
for example.
It can also handle a directory that contains DAFIFT files: it creates a model tree node with a model for each file.
If you need more control over the decoding, such as filtering, you can use one of the decoders for specific types.
These decoder classes are located in the package com.luciad.format.dafift.decoder
.
The following decoders are currently provided in the decoder sub-package:
-
TLcdDAFIFTATSRouteDecoder
: decodes ATS routes. -
TLcdDAFIFTAerodromeDecoder
: decodes airport and airport communications. -
TLcdDAFIFTAerodromeNavaidDecoder
: decodes aerodrome navaids (from AIRPORT_OR_HELIPORT_NAVAID records in a DAFIFT file), which form a subset of all the navaids in the DAFIFT data. This decoder constructs aTLcdModelList
that contains 4 sub-models (ILcdModel
instances) with specific navaids inside: VOR, TACAN, DME, and NDB. -
TLcdDAFIFTAirspaceDecoder
: decodes airspaces. -
TLcdDAFIFTHelipadDecoder
: decodes helipads. -
TLcdDAFIFTHeliportDecoder
: decodes heliport and heliport communications. -
TLcdDAFIFTHoldingDecoder
: decodes holding patterns. -
TLcdDAFIFTILSDecoder
: decodes instrument landing systems. This decoder constructs aTLcdModelList
that contains four sub-models (ILcdModel
instances) with specific objects inside: Glide path, markers, localizers, DMEs. -
TLcdDAFIFTMilitaryTrainingRouteDecoder
: decodes military training routes. -
TLcdDAFIFTNavaidDecoder
: decodes navaids. This decoder constructs aTLcdModelList
that contains 4 sub-models (ILcdModel
instances) with specific navaids inside: VOR, TACAN, DME, and NDB. -
TLcdDAFIFTOrtcaDecoder
: decodes off-route terrain clearance altitudes. -
TLcdDAFIFTParachuteJumpAreaDecoder
: decodes parachute jump areas. -
TLcdDAFIFTPrecisionApproachPathDecoder
: decodes precision approach path points. -
TLcdDAFIFTRefuelingTrackDecoder
: decodes refueling tracks. -
TLcdDAFIFTRunwayDecoder
: decodes runways. -
TLcdDAFIFTSpecialUseAirspaceDecoder
: decodes special use air spaces. -
TLcdDAFIFTVFRRouteDecoder
: decodes VFR routes. -
TLcdDAFIFTWayPointDecoder
: decodes waypoints. -
TLcdDAFIFTProcedureDecoder
: decodes procedures.
Some of these decoders require that a number of models are set on the decoder before decoding can start. The reason for this is that an ATS route, for instance, refers to a number waypoints which must be known during the decode process.
For these decoders, extensions that do not require such models to be set beforehand, are available.
They have the prefix Independent
in their names.
These independent decoders will decode any necessary data, such as waypoints,
before starting to decode themselves. The following independent decoders are
provided:
When a DAFIFT file is decoded successfully, the specific decoder returns an
ILcdModel
containing the decoded objects. Note that the types of these
objects are the same as the types of objects created with the DAFIF Edition 7 decoders.
Filtering DAFIFT data
DAFIF Edition 8 data can be filtered in three ways:
-
By specifying an
ILcdBounds
-
By specifying an
ILcdDAFIFModelFilter
-
By specifying an
ILcdDAFIFTRecordFilter
The ILcdBounds
filter
By calling the setDecodingBounds
method on a DAFIFT model decoder, you can specify filter
bounds. When decoding a DAFIFT data file with the configured
DAFIFT decoder, this decoder will only put an object in the resulting model if
the bounds of the object interact with the specified bounds. If no
bounds are specified on a decoder, all objects will be inserted into the model.
The ILcdDAFIFModelFilter
You can specify an ILcdDAFIFModelFilter
by calling the setModelFilter
method on the DAFIFT model decoder. When decoding a DAFIFT data file with the
configured DAFIFT decoder, this decoder will only put an object in the resulting
model if the object passes through the specified filter. If no
ILcdDAFIFModelFilter
is specified on a decoder, all objects will be inserted
into the model.
The ILcdDAFIFTRecordFilter
You can specify an ILcdDAFIFTRecordFilter
by calling the setRecordFilter
method on the DAFIFT model decoder. When decoding a DAFIFT data file with the
configured DAFIFT decoder, this decoder will only handle records that pass through
the specified filter. If no ILcdDAFIFTRecordFilter
is specified on a
decoder, all records will be handled. If a record is not handled, the corresponding
object cannot be created, and can therefore not be added to model.