Class TLcdDAFIFWayPointDecoder
- All Implemented Interfaces:
ILcdDAFIFDecoder,ILcdInputStreamFactoryCapable,ILcdModelDecoder
ALcdDAFIFSingleModelDecoder decodes
waypoints from a DAFIF source file. Decoded models have as model descriptor
an instance of TLcdDAFIFWayPointModelDescriptor.
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 decoder, the type of the decoded objects is TLcdDAFIFDataTypes.WayPoint,
which can also be retrieved through ILcdDataObject.getDataType().
The available properties of the objects are defined in TLcdDAFIFWayPointDataProperties.
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.
The setWaypointFeaturesToBeDecoded method allows
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.
- IDENTIFIER: ILcdWayPointFeature.IDENTIFIER
- COUNTRY CODE: ILcdDAFIFWayPointFeature.COUNTRY_CODE
- USAGE CODE: ILcdDAFIFWayPointFeature.USAGE_CODE
- DESCRIPTION/NAME: ILcdWayPointFeature.NAME
- ICAO CODE (only if the ICAO CODE field has length 4): ILcdDAFIFWayPointFeature.ICAO_CODE
- ICAO CODE (first two characters only): ILcdDAFIFWayPointFeature.ICAO_REGION
- TYPE: ILcdDAFIFWayPointFeature.ICAO_REGION: ILcdDAFIFWayPointFeature.OPERATIONS_TYPE
- STATE/PROVINCE CODE: ILcdDAFIFWayPointFeature.STATE_PROVINCE_CODE
- BEARING/DISTANCE: ILcdDAFIFWayPointFeature.BEARING, ILcdDAFIFWayPointFeature.BEARING_TYPE, ILcdDAFIFWayPointFeature.DISTANCE, ILcdDAFIFWayPointFeature.DISTANCE_UNIT
- MAGNETIC VARIATION: ILcdDAFIFWayPointFeature.MAGNETIC_VARIATION
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 aerodromes the key features are:
- See Also:
-
Field Summary
Fields inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFDecoder
DAFIF_PROP_EXTENSION, fRecordCount -
Constructor Summary
ConstructorsConstructorDescriptionTLcdDAFIFWayPointDecoder(ALcdAISObjectFactory aDomainFactory) Deprecated.TLcdDAFIFWayPointDecoder(ALcdAISObjectFactory aDomainFactory, Properties aDAFIFProperties) Deprecated.TLcdDAFIFWayPointDecoder(TLcdAISDataObjectFactory aDomainFactory) Creates a newTLcdDAFIFWayPointDecoderobject.TLcdDAFIFWayPointDecoder(TLcdAISDataObjectFactory aDomainFactory, Properties aDAFIFProperties) Creates a newTLcdDAFIFWayPointDecoderobject. -
Method Summary
Modifier and TypeMethodDescriptionprotected ILcdModelDescriptorcreateModelDescriptor(String aSource) Creates and returns the model descriptor to be set on the model returned in thedecodemethod.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.protected doublereadLat(char[] aRecord) Reads a latitude.protected doublereadLon(char[] aRecord) Reads a longitude.voidsetWaypointDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the waypoint display name.voidsetWaypointFeaturesToBeDecoded(String[] aWaypointFeaturesToBeDecoded) Specifies the waypoint features to be decoded into the model objects.Methods inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFSingleModelDecoder
cleanUp, decode, setKeyFeatureNamesMethods 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.model.ILcdModelDecoder
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Constructor Details
-
TLcdDAFIFWayPointDecoder
Deprecated.Creates a newTLcdDAFIFWayPointDecoderobject. The user should specify which domainFactory he or she wants to use to create the waypoints.- Parameters:
aDomainFactory- the factory to be used to create the model objects
-
TLcdDAFIFWayPointDecoder
Creates a newTLcdDAFIFWayPointDecoderobject. The user should specify which factory he or she wants to use to create the waypoints.- Parameters:
aDomainFactory- the factory to be used to create the model objects
-
TLcdDAFIFWayPointDecoder
@Deprecated public TLcdDAFIFWayPointDecoder(ALcdAISObjectFactory aDomainFactory, Properties aDAFIFProperties) Deprecated.Creates a newTLcdDAFIFWayPointDecoderobject. The user should specify which domainFactory he or she wants to use to create the waypoints.- Parameters:
aDomainFactory- the factory to be used to create the model objectsaDAFIFProperties- aPropertiesobject that contains for each domain object the appropriate file name
-
TLcdDAFIFWayPointDecoder
public TLcdDAFIFWayPointDecoder(TLcdAISDataObjectFactory aDomainFactory, Properties aDAFIFProperties) Creates a newTLcdDAFIFWayPointDecoderobject. The user should specify which factory he or she wants to use to create the waypoints.- Parameters:
aDomainFactory- the factory to be used to create the model objectsaDAFIFProperties- aPropertiesobject that contains for each domain object the appropriate file name
-
-
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.
-
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
-
handleRecord
protected final void handleRecord(int aFormat, char[] aRecord) Description copied from class:ALcdDAFIFSingleModelDecoderDeals with one record of input.- Specified by:
handleRecordin classALcdDAFIFSingleModelDecoder- Parameters:
aFormat- the format of the recordaRecord- the record
-
createModelDescriptor
Description copied from class:ALcdDAFIFSingleModelDecoderCreates and returns the model descriptor to be set on the model returned in thedecodemethod.- Specified by:
createModelDescriptorin classALcdDAFIFSingleModelDecoder- Parameters:
aSource- the source that will be used to decode- Returns:
- a model descriptor describing the data in the model created in the decode method
-
setWaypointDefaultDisplayNameIndex
public void setWaypointDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the waypoint display name.- Parameters:
aIndex- the index of the feature to be used as display name
-
setWaypointFeaturesToBeDecoded
Specifies the waypoint features to be decoded into the model objects. Please make sure that theIDENTIFIERfeature and theCOUNTRY_CODEfeature are in your list!- Parameters:
aWaypointFeaturesToBeDecoded- a list of features that should be decoded into the waypoint objects
-
readLon
protected double readLon(char[] aRecord) Reads a longitude. The resulting value may be a geodetic or a source longitude depending on the value of isGeodetic.- Parameters:
aRecord-
-
readLat
protected double readLat(char[] aRecord) Reads a latitude. The resulting value may be a geodetic or a source latitude depending on the value of isGeodetic.- Parameters:
aRecord-
-