Class TLcdDAFIFVFRRouteDecoder
- All Implemented Interfaces:
ILcdDAFIFDecoder,ILcdDAFIFMultiModelDecoder,ILcdInputStreamFactoryCapable,ILcdModelDecoder
ALcdDAFIFMultiModelDecoder decodes VFR routes from a DAFIF
source file. Decoded models have as model descriptor an instance of
TLcdDAFIFVFRRouteModelListDescriptor.
The resulting modelList will contain submodels for:
- VFR routes,
- offset routes,
- aerodromes for which the VFR routes serve (optional).
- heliports for which the VFR routes serve (optional).
The objects in decoded models are based on the AIS domain objects available in com.luciad.ais.model,
which all implement ILcdDataObject. This interface provides a generic and
format-independent way of accessing the type and properties (features) of a domain object.
For this handler, the types of the decoded objects are TLcdDAFIFDataTypes.VFRRoute,
TLcdDAFIFDataTypes.VFROffsetRoute and TLcdDAFIFDataTypes.VFRRoutePoint,
which can also be retrieved through ILcdDataObject.getDataType().
The available properties of the objects are defined in TLcdDAFIFVFRRouteDataProperties,
TLcdDAFIFVFROffsetRouteDataProperties and TLcdDAFIFVFRRoutePointDataProperties.
The values for these properties can be retrieved through ILcdDataObject.getValue(com.luciad.datamodel.TLcdDataProperty).
Next to ILcdDataObject, the objects in decoded models also implement ILcdFeatured,
the former interface to access the properties (features) of a domain object.
This is still fully supported, and explained in the following comments.
VFR route data includes data about aerodromes and heliports, served by the VFR and offset routes.
To decode the available aerodrome and heliport information as well, use the
setAddAerodromes method. For the aerodromes and heliports, there is no
feature selection possible; all features will be decoded.
The setVFRRouteFeaturesToBeDecoded method, the
setOffsetRouteFeaturesToBeDecoded method and the
setVFRRoutePointFeaturesToBeDecoded method allow the
user to specify which DAFIF features are decoded into the featured model objects.
If no features to be decoded are specified, all features will be decoded.
The following fields (taken from the National Imagery and Mapping Agency (NIMA) Product Specifications for Digital Aeronautical Flight Information File (DAFIF), Seventh Edition, May 2001) are supported by the decoder. The list indicates into which feature the fields are decoded. VFR Arrival/Departure route fields:
- AIRPORT/HELIPORT IDENTIFICATION: ILcdAerodromeFeature.IDENTIFICATION
- NAME: ILcdAerodromeFeature.NAME
- COUNTRY CODE: ILcdDAFIFAerodromeFeature.COUNTRY_CODE
- STATE/PROVINCE CODE: ILcdDAFIFAerodromeFeature.STATE_PROVINCE_CODE
- ICAO CODE (only if the ICAO CODE field has length 4): ILcdAerodromeFeature.ICAO_CODE
- ICAO CODE (first two characters only): ILcdAerodromeFeature.ICAO_REGION
- FAA/HOST COUNTRY: ILcdDAFIFAerodromeFeature.FAA_HOST_COUNTRY_IDENTIFIER
- MAGNETIC VARIATION: ILcdAerodromeFeature.MAGNETIC_VARIATION
- AIRPORT/HELIPORT IDENTIFICATION: ILcdDAFIFVFRRouteFeature.AIRPORT_ID
- ROUTE IDENTIFICATION: ILcdDAFIFVFRRouteFeature.ROUTE_ID
- ROUTE NAME: ILcdDAFIFVFRRouteFeature.ROUTE_NAME
- POINT NAME/CHECKPOINT: ILcdDAFIFVFRRoutePointFeature.POINT_NAME
- POINT IDENTITY: ILcdDAFIFVFRRoutePointFeature.POINT_IDENTITY
- POINT COORDINATES UTM: ILcdDAFIFVFRRoutePointFeature.UTM_COORDINATES
- POINT TYPE: ILcdDAFIFVFRRoutePointFeature.POINT_TYPE
- POINT SYMBOL: ILcdDAFIFVFRRoutePointFeature.POINT_SYMBOL
- AT HELIPORT/AIRPORT: ILcdDAFIFVFRRoutePointFeature.AT_HELIPORT_AIRPORT
- SEGMENT NAME: ILcdDAFIFVFRRoutePointFeature.SEGMENT_NAME
- MAGNETIC COURSE: ILcdDAFIFVFRRoutePointFeature.COURSE, ILcdDAFIFVFRRoutePointFeature.COURSE_TYPE
- PATH CODE: ILcdDAFIFVFRRoutePointFeature.PATH_CODE
- ALTITUDE DESCRIPTION CODE: ILcdDAFIFVFRRoutePointFeature.ALTITUDE_DESCRIPTION_CODE
- ALTITUDE: ILcdDAFIFVFRRoutePointFeature.ALTITUDE, ILcdDAFIFVFRRoutePointFeature.ALTITUDE_UNIT
- TURN DIRECTION: ILcdDAFIFVFRRoutePointFeature.TURN_DIRECTION
DAFIF decoders rely on a specific set of key features that uniquely define an object. This set of features must always be included in the set of features to be decoded. For VFR routes and offset routes the key features are:
- See Also:
-
Field Summary
Fields inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFDecoder
DAFIF_PROP_EXTENSION, fRecordCount -
Constructor Summary
ConstructorsConstructorDescriptionTLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory) Deprecated.TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory, boolean aAddAerodromes) Deprecated.TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties) Deprecated.TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties, boolean aAddAerodromes) Deprecated.Constructs a newTLcdDAFIFVFRRouteDecoder.TLcdDAFIFVFRRouteDecoder(TLcdAISDataObjectFactory aFactory, boolean aAddAerodromes) Constructs a newTLcdDAFIFVFRRouteDecoder.TLcdDAFIFVFRRouteDecoder(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties) Constructs a newTLcdDAFIFVFRRouteDecoder.TLcdDAFIFVFRRouteDecoder(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties, boolean aAddAerodromes) Constructs a newTLcdDAFIFVFRRouteDecoder. -
Method Summary
Modifier and TypeMethodDescriptionprotected ILcdModelDescriptorcreateModelDescriptor(int aIndex, String aSource) Creates and returns the model descriptor to be set on the model with index aIndex in the model (i.e. in the model returned in thedecodemethod).createModelDescriptor(String aSource) Creates and returns the model descriptor to be set on the model returned in the decode method.If the isAddAerodrome property is true, the aerodrome and heliport model are decoded first.Returns the name of the file to be decoded.Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder.protected final voidhandleRecord(int aFormat, char[] aRecord) Deals with one record of input.booleanReturns the addAerodromes property.voidsetAddAerodromes(boolean aValue) Specifies a value for the addAerodromes property.voidsetOffsetRouteFeaturesToBeDecoded(String[] aOffsetRouteFeaturesToBeDecoded) Specifies the features that should be decoded into the offset route objects of the model that will be returned by thedecodemethod.voidsetRouteDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the route display name.voidsetRoutePointDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the route point display name.voidsetVFRRouteFeaturesToBeDecoded(String[] aVFRRouteFeaturesToBeDecoded) Specifies the features that should be decoded into the VFR route objects of the model that will be returned by thedecodemethod.voidsetVFRRoutePointFeaturesToBeDecoded(String[] aVFRRoutePointFeaturesToBeDecoded) Specifies the features that should be decoded into the VFR route point objects of the model that will be returned by thedecodemethod.Methods inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFMultiModelDecoder
cleanUp, getModelCount, postProcess, setKeyFeatureNames, setModelCountMethods inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFDecoder
addErrorReport, canDecodeSource, getAltitudeType, getBearingTypeForChar, getBounds, getDAFIFProperties, getDataObjectFactory, getDecodingBounds, getDomainFactory, getErrorMessage, getInputStream, getInputStreamFactory, getLocalHorizontalDatum, getModelFilter, getRecordCount, initializeErrorMessage, isStoreOriginalReference, isTraceOn, loadCFGProperties, read, readExactValue, readFormat, readMinLength, readRecord, setBounds, setDAFIFModelFilter, setDAFIFProperties, setDataObjectFactory, setDecodingBounds, setDomainFactory, setInputStreamFactory, setStoreOriginalReference, setTraceOn, transformPointToReferenceDatumSFCTMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.format.dafif.decoder.ILcdDAFIFDecoder
getBounds, getDAFIFProperties, getDataObjectFactory, getDecodingBounds, getDomainFactory, getErrorMessage, setBounds, setDAFIFModelFilter, setDAFIFProperties, setDataObjectFactory, setDecodingBounds, setDomainFactory, setStoreOriginalReferenceMethods inherited from interface com.luciad.model.ILcdModelDecoder
canDecodeSource, canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Constructor Details
-
TLcdDAFIFVFRRouteDecoder
Deprecated.Constructs a newTLcdDAFIFVFRRouteDecoder. The isAddAerodromes property will be set to true.The user should specify which domainFactory he or she wants to use to create the VFR routes, the aerodromes and the heliports.
- Parameters:
aFactory- the factory to be used to create the model objects
-
TLcdDAFIFVFRRouteDecoder
Deprecated.Constructs a newTLcdDAFIFVFRRouteDecoder. The user should specify which domainFactory he or she wants to use to create the VFR routes, the aerodromes and the heliports (if requested).- Parameters:
aFactory- the factory to be used to create the model objectsaAddAerodromes- abooleanindicating whether a submodel containing the aerodromes should be added or not
-
TLcdDAFIFVFRRouteDecoder
@Deprecated public TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties) Deprecated.Constructs a newTLcdDAFIFVFRRouteDecoder. The isAddAerodromes property will be set to true.The user should specify which domainFactory he or she wants to use to create the VFR routes, the aerodromes and the heliports.
- Parameters:
aFactory- the factory to be used to create the model objectsaDAFIFProperties- aPropertiesobject that contains for each domain object the appropriate file name
-
TLcdDAFIFVFRRouteDecoder
@Deprecated public TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties, boolean aAddAerodromes) Deprecated.Constructs a newTLcdDAFIFVFRRouteDecoder. The user should specify which domainFactory he or she wants to use to create the VFR routes, the aerodromes and the heliports (if requested).- Parameters:
aFactory- the factory to be used to create the model objectsaDAFIFProperties- aPropertiesobject that contains for each domain object the appropriate file nameaAddAerodromes- abooleanindicating whether submodels containing the aerodromes and heliports should be added or not
-
TLcdDAFIFVFRRouteDecoder
Constructs a newTLcdDAFIFVFRRouteDecoder. The isAddAerodromes property will be set to true.The user should specify which factory he or she wants to use to create the VFR routes, the aerodromes and the heliports.
- Parameters:
aFactory- the factory to be used to create the model objects
-
TLcdDAFIFVFRRouteDecoder
Constructs a newTLcdDAFIFVFRRouteDecoder. The user should specify which factory he or she wants to use to create the VFR routes, the aerodromes and the heliports (if requested).- Parameters:
aFactory- the factory to be used to create the model objectsaAddAerodromes- abooleanindicating whether a submodel containing the aerodromes should be added or not
-
TLcdDAFIFVFRRouteDecoder
Constructs a newTLcdDAFIFVFRRouteDecoder. The isAddAerodromes property will be set to true.The user should specify which factory he or she wants to use to create the VFR routes, the aerodromes and the heliports.
- Parameters:
aFactory- the factory to be used to create the model objectsaDAFIFProperties- aPropertiesobject that contains for each domain object the appropriate file name
-
TLcdDAFIFVFRRouteDecoder
public TLcdDAFIFVFRRouteDecoder(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties, boolean aAddAerodromes) Constructs a newTLcdDAFIFVFRRouteDecoder. The user should specify which factory he or she wants to use to create the VFR routes, the aerodromes and the heliports (if requested).- Parameters:
aFactory- the factory to be used to create the model objectsaDAFIFProperties- aPropertiesobject that contains for each domain object the appropriate file nameaAddAerodromes- abooleanindicating whether submodels containing the aerodromes and heliports should be added or not
-
-
Method Details
-
getDisplayName
Description copied from interface:ILcdModelDecoderReturns a short, displayable name for the format that is decoded by thisILcdModelDecoder.- Specified by:
getDisplayNamein interfaceILcdModelDecoder- Overrides:
getDisplayNamein classALcdDAFIFDecoder- Returns:
- the displayable name of this
ILcdModelDecoder.
-
decode
If the isAddAerodrome property is true, the aerodrome and heliport model are decoded first. Then the decode method of theALcdDAFIFMultiModelDecoderclass will be called.Prints additional information to the log.
- Specified by:
decodein interfaceILcdModelDecoder- Overrides:
decodein classALcdDAFIFMultiModelDecoder- Parameters:
aSource- either the directory containing the Dafif source file to decode (if you did not specify a properties file in the constructor, the default file name will be used) or a .toc file containing the Dafif properties (the data file should be in the same directory as the .toc file)- Returns:
- the model build by reading the file found with aSource
- Throws:
IOException- if an error occurs during the reading process- See Also:
-
handleRecord
protected final void handleRecord(int aFormat, char[] aRecord) Description copied from class:ALcdDAFIFMultiModelDecoderDeals with one record of input.- Specified by:
handleRecordin classALcdDAFIFMultiModelDecoder- Parameters:
aFormat- the format of the recordaRecord- the record to deal with
-
createModelDescriptor
Description copied from class:ALcdDAFIFMultiModelDecoderCreates and returns the model descriptor to be set on the model with index aIndex in the model (i.e. in the model returned in thedecodemethod).- Specified by:
createModelDescriptorin classALcdDAFIFMultiModelDecoder- Parameters:
aSource- the source to be decoded- Returns:
- a model descriptor describing the data in the submodel at position aIndex in the model produced by this decoder
-
createModelDescriptor
Description copied from interface:ILcdDAFIFMultiModelDecoderCreates and returns the model descriptor to be set on the model returned in the decode method.- Specified by:
createModelDescriptorin interfaceILcdDAFIFMultiModelDecoder- Specified by:
createModelDescriptorin classALcdDAFIFMultiModelDecoder- Parameters:
aSource- the source that will be used to build the model- Returns:
- the model descriptor to be set on the model produced by this decoder
-
getDecodeFileName
Description copied from interface:ILcdDAFIFDecoderReturns the name of the file to be decoded.Each domain object has its own file name. This method returns the name of the data file for the domain objects decoded by this DAFIF decoder.
- Returns:
- the name of the source file
-
setRouteDefaultDisplayNameIndex
public void setRouteDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the route display name.- Parameters:
aIndex- the index of the feature to be used as display name
-
setRoutePointDefaultDisplayNameIndex
public void setRoutePointDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the route point display name.- Parameters:
aIndex- the index of the feature to be used as display name
-
setVFRRouteFeaturesToBeDecoded
Specifies the features that should be decoded into the VFR route objects of the model that will be returned by thedecodemethod.Please make sure that the
AIRPORT_IDfeature and theROUTE_IDfeature are in your list.- Parameters:
aVFRRouteFeaturesToBeDecoded- a list of features that should be decoded into the VFR route objects
-
setVFRRoutePointFeaturesToBeDecoded
Specifies the features that should be decoded into the VFR route point objects of the model that will be returned by thedecodemethod.- Parameters:
aVFRRoutePointFeaturesToBeDecoded- a list of features that should be decoded into the VRF route point objects
-
setOffsetRouteFeaturesToBeDecoded
Specifies the features that should be decoded into the offset route objects of the model that will be returned by thedecodemethod.Please make sure that the
ILcdDAFIFVFRRouteFeature.AIRPORT_IDfeature and theILcdDAFIFVFRRouteFeature.ROUTE_IDfeature are in your list.- Parameters:
aOffsetRouteFeaturesToBeDecoded- a list of features that should be decoded into the offset route objects
-
isAddAerodromes
public boolean isAddAerodromes()Returns the addAerodromes property. If the addAerodromes property is true, extra submodels will be created. One model containing the aerodromes and another one containing the heliports for which a VFR route serves.The aerodromes and heliports in the model are retrieved from the aerodrome and the heliport model decoded by this decoder using the source to be decoded.
- Returns:
- a
booleanindicating whether submodel of aerodromes and heliports should be added - See Also:
-
setAddAerodromes
public void setAddAerodromes(boolean aValue) Specifies a value for the addAerodromes property.- Parameters:
aValue- abooleanindicating whether submodel of aerodromes and heliports should be added- See Also:
-