@LcdService(service=ILcdModelDecoder.class, priority=20000) public class TLcdDAFIFModelDecoder extends Object implements ILcdModelDecoder, ILcdInputStreamFactoryCapable
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 |
ILcdInputStreamFactory
of this decoder.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 another model tree
.ILcd2DBoundsIndexedModel
, ILcdIntegerIndexedModel
and ILcdFeatureIndexedModel
.TLcdDAFIF...Descriptor
.TLcdGeodeticReference
.TLcdGeodeticDatum
(WGS-84).ILcdModel.elements()
.getModelDescriptor()
,
getModelReference()
and
getBounds()
. Initially, the bounds are an estimation. The exact
bounds can be retrieved after lazy loading was triggered.
ILcdModelDecoder decoder = new TLcdDAFIFModelDecoder();
ILcdModel model = decoder.decode( "dafif.toc" );
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.
TLcdDAFIFAerodromeDecoder
,
TLcdDAFIFAirspaceDecoder
,
TLcdDAFIFHeliportDecoder
,
TLcdDAFIFMilitaryTrainingRouteDecoder
,
TLcdDAFIFNavaidDecoder
,
TLcdDAFIFOrtcaDecoder
,
TLcdDAFIFParachuteJumpAreaDecoder
,
TLcdDAFIFRefuelingTrackDecoder
,
TLcdDAFIFSpecialUseAirspaceDecoder
,
TLcdDAFIFVFRRouteDecoder
,
TLcdDAFIFWayPointDecoder
,
TLcdDAFIFIndependentAerodromeNavaidDecoder
,
TLcdDAFIFIndependentATSRouteDecoder
,
TLcdDAFIFIndependentHelipadDecoder
,
TLcdDAFIFIndependentHoldingDecoder
,
TLcdDAFIFIndependentILSDecoder
,
TLcdDAFIFIndependentProcedureDecoder
,
TLcdDAFIFIndependentRunwayDecoder
,
TLcdDAFIFTAerodromeDecoder
,
TLcdDAFIFTAirspaceDecoder
,
TLcdDAFIFTHeliportDecoder
,
TLcdDAFIFTMinimumSectorAltitudeDecoder
,
TLcdDAFIFTMilitaryTrainingRouteDecoder
,
TLcdDAFIFTNavaidDecoder
,
TLcdDAFIFTOrtcaDecoder
,
TLcdDAFIFTParachuteJumpAreaDecoder
,
TLcdDAFIFTPrecisionApproachPathDecoder
,
TLcdDAFIFTRefuelingTrackDecoder
,
TLcdDAFIFTSpecialUseAirspaceDecoder
,
TLcdDAFIFTVFRRouteDecoder
,
TLcdDAFIFTWayPointDecoder
,
TLcdDAFIFTIndependentAerodromeNavaidDecoder
,
TLcdDAFIFTIndependentATSRouteDecoder
,
TLcdDAFIFTIndependentHelipadDecoder
,
TLcdDAFIFTIndependentHoldingDecoder
,
TLcdDAFIFTIndependentILSDecoder
,
TLcdDAFIFTIndependentProcedureDecoder
,
TLcdDAFIFTIndependentRunwayDecoder
Constructor and Description |
---|
TLcdDAFIFModelDecoder()
Creates a new model decoder with the
default object factory
and empty properties. |
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 . |
Modifier and Type | Method and Description |
---|---|
boolean |
canDecodeSource(String aSource)
Indicates whether the given source path can be decoded by this decoder.
|
ILcdModel |
decode(String aSource)
Decode a source using this composite model decoder.
|
ILcdBounds |
getBoundsToFilterOn()
Returns the (geodetic) bounds that will be used as a filter on the model created by this mode decoder.
|
String |
getDisplayName()
Returns a short, displayable name for the format that is decoded by this
ILcdModelDecoder . |
ILcdInputStreamFactory |
getInputStreamFactory()
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
public TLcdDAFIFModelDecoder()
default object factory
and empty properties.public TLcdDAFIFModelDecoder(TLcdAISDataObjectFactory aDataObjectFactory, Properties aDAFIFProperties)
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.aDataObjectFactory
- The object factory to useaDAFIFProperties
- contains for each data type the associated file name, can be null
public void setBoundsToFilterOn(ILcdBounds aBoundsToFilterOn)
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.
aBoundsToFilterOn
- the bounds to be used as a filtergetBoundsToFilterOn()
public ILcdBounds getBoundsToFilterOn()
setBoundsToFilterOn(com.luciad.shape.ILcdBounds)
public String getDisplayName()
ILcdModelDecoder
.
The display name is "DAFIF"getDisplayName
in interface ILcdModelDecoder
ILcdModelDecoder
.public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
ILcdInputStreamFactoryCapable
setInputStreamFactory
in interface ILcdInputStreamFactoryCapable
aInputStreamFactory
- the input stream factory to be used.public ILcdInputStreamFactory getInputStreamFactory()
ILcdInputStreamFactoryCapable
getInputStreamFactory
in interface ILcdInputStreamFactoryCapable
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.
canDecodeSource
in interface ILcdModelDecoder
aSource
- The source path as defined in decode(String)
.true
if the source is a DAFIF(T) dataset, false
otherwise.ILcdModelDecoder.decode(String)
,
ILcdModelDecoder.decodeModelMetadata(String)
public ILcdModel decode(String aSource) throws IOException
FILE0
ARPT/ARPT.TXT
ARPT
or a folder containing FILE0, ....toc
file in a directory with DAFIF or DAFIFT files.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 an
ICAO Region
(see also TLcdDAFIFDataPreparatorMain
).decode
in interface ILcdModelDecoder
aSource
- The source pathmodel tree
IOException
InterruptedIOException
- When the thread on which this method is called is interrupted: it is recommended to stop the decoding
and throw an InterruptedIOException
.
This same exception can also be used if the decoder shows UI to the user, and the user cancels the decoding
through the UI.ILcdModelDecoder.canDecodeSource(String)