Class TLcdDAFIFModelDecoder

java.lang.Object
com.luciad.format.dafif.TLcdDAFIFModelDecoder
All Implemented Interfaces:
ILcdInputStreamFactoryCapable, ILcdModelDecoder

@LcdService(service=ILcdModelDecoder.class, priority=20000) public class TLcdDAFIFModelDecoder extends Object implements ILcdModelDecoder, ILcdInputStreamFactoryCapable
Composite model decoder that handles all DAFIF and DAFIFT data.

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

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

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() and getBounds(). 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 Details

    • TLcdDAFIFModelDecoder

      public TLcdDAFIFModelDecoder()
      Creates a new model decoder with the default object factory and empty properties.
    • TLcdDAFIFModelDecoder

      public TLcdDAFIFModelDecoder(TLcdAISDataObjectFactory aDataObjectFactory, Properties aDAFIFProperties)
      Creates a new model decoder with a custom object factory and optionally properties that define the filenames for each of the possible data types.

      See TLcdDAFIFModelDecoderSupport for more details on the possible property keys.

      Parameters:
      aDataObjectFactory - The object factory to use
      aDAFIFProperties - contains for each data type the associated file name, can be null
  • 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 is TLcdDAFIFTDataTypes.Ortca, a singleton list is returned which contains one instance of TLcdDAFIFTOrtcaDecoder. 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 - a Properties 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

      public void setBoundsToFilterOn(ILcdBounds aBoundsToFilterOn)
      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 not null, 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

      public ILcdBounds 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

      public String getDisplayName()
      Returns a short, displayable name for the format that is decoded by this ILcdModelDecoder.

      The display name is "DAFIF"

      Specified by:
      getDisplayName in interface ILcdModelDecoder
      Returns:
      the displayable name of this ILcdModelDecoder.
    • setInputStreamFactory

      public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
      Description copied from interface: ILcdInputStreamFactoryCapable
      Sets the input stream factory to be used.
      Specified by:
      setInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Parameters:
      aInputStreamFactory - the input stream factory to be used.
    • getInputStreamFactory

      public ILcdInputStreamFactory getInputStreamFactory()
      Description copied from interface: ILcdInputStreamFactoryCapable
      Returns the input stream factory that is used.
      Specified by:
      getInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Returns:
      the input stream factory that is used.
    • canDecodeSource

      public boolean canDecodeSource(String aSource)

      Indicates whether the given source path can be decoded by this decoder.

      See decode(String) for the possible source paths.

      Specified by:
      canDecodeSource in interface ILcdModelDecoder
      Parameters:
      aSource - The source path as defined in decode(String).
      Returns:
      true if the source is a DAFIF(T) dataset, false otherwise.
      See Also:
    • decode

      public ILcdModel decode(String aSource) throws IOException
      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
      In case of a .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 an ICAO Region (see also TLcdDAFIFDataPreparatorMain).
      Specified by:
      decode in interface ILcdModelDecoder
      Parameters:
      aSource - The source path
      Returns:
      A model tree
      Throws:
      IOException
      See Also: