Class ALcdDAFIFAerodromeDecoder
- All Implemented Interfaces:
ILcdDAFIFDecoder
,ILcdInputStreamFactoryCapable
,ILcdModelDecoder
- Direct Known Subclasses:
TLcdDAFIFAerodromeDecoder
,TLcdDAFIFHeliportDecoder
ALcdDAFIFSingleModelDecoder
class
provides read methods to retrieve data from a aerodrome or heliport data file.
Records containing information about airports and about airport communication have the same structure as records containing information about heliports. Therefore, the read methods will be the same for these objects.
-
Field Summary
Modifier and TypeFieldDescriptionprotected String[]
The set of all communications features to be decoded This may be set by the user.protected String[]
For each of the 4 formats, the particular features to decode.protected String[]
protected String[]
protected String[]
Fields inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFDecoder
DAFIF_PROP_EXTENSION, fRecordCount
-
Constructor Summary
ConstructorDescriptionALcdDAFIFAerodromeDecoder
(Properties aDAFIFProperties) Initializes the DAFIFProperties field with the specified properties object. -
Method Summary
Modifier and TypeMethodDescriptionprotected TLcdAerodromeOperationsType
getTypeForChar
(char aType) Returns the uniqueTLcdAirportType
object attached to the given character.protected TLcdFeaturedService
readCommunicationFeaturesFromType1
(char[] aRecord) Reads a full record having format 16 (airports) / 13 (heliports) The created TLcdFeaturedService has the same number of features as specified by fCommunicationFeaturesToBeDecoded, but only the fCommunicationFeaturesType1 are actually filled in.protected TLcdFeaturedService
readCommunicationFeaturesFromType2
(char[] aRecord) Reads a full record having format 17 (airports) / 14 (heliports) The created TLcdFeaturedService has the same number of features as specified by fCommunicationFeaturesToBeDecoded, but only the fCommunicationFeaturesType1 are actually filled in.protected TLcdFeaturedService
readCommunicationFeaturesFromType3
(char[] aRecord) Reads a full record having format 18 (airports) / 15 (heliports) The created TLcdFeaturedService has the same number of features as specified by fCommunicationFeaturesToBeDecoded, but only the fCommunicationFeaturesType1 are actually filled in.protected String
readCommunicationRemark
(char[] aRecord) Reads the remark text from a communication record of format 19 - airports or 16 - heliportsprotected Integer
readCommunicationRemarkSequenceNumber
(char[] aRecord) Reads the remark sequence number from a communication record of format 19 - airports or 16 - heliportsprotected TLcdCommunicationType
readCommunicationType
(char[] aRecord) Reads the communication type from a communication recordprotected Integer
readCommunicationTypeMultiplierFromType1
(char[] aRecord) Reads the communication type multiplier from a communication record of format 16 - airports or 13 - heliports.protected Integer
readCommunicationTypeMultiplierFromType2
(char[] aRecord) Reads the communication type multiplier from a communication record of format 17 - airports or 14 - heliports.protected Integer
readCommunicationTypeMultiplierFromType3
(char[] aRecord) Reads the communication type multiplier from a communication record of format 18 - airports or 15 - heliports.protected Integer
readCommunicationTypeMultiplierFromType4
(char[] aRecord) Reads the communication type multiplier from a communication record of format 19 - airports or 16 - heliports.protected String
readCountryCodeFromFmt1
(char[] aRecord) Returns the country code of an aerodrome.protected double
readElevationFromFmt1
(char[] aRecord) Reads the elevation of an aerodrome.protected String
readFAAHostCountryIdentifierFromFmt1
(char[] aRecord) Reads the Federal Aviation Administration identifier/host country identifier.protected double
readGeodeticLat
(char[] aRecord) Reads a geodetic latitude.protected double
readGeodeticLon
(char[] aRecord) Reads a geodetic longitude.protected String
readICAOCodeFromFmt1
(char[] aRecord) Reads an aerodromes ICAO code from a record of format 01.protected String
readIdentification
(char[] aRecord) Reads the identification of an aerodrome from a given record.protected double
readLat
(char[] aRecord) Reads a latitude.protected ILcdGeodeticDatum
readLocalHorizontalDatumFromFmt1
(char[] aRecord) Reads the local horizontal datum from a record of format 01.protected double
readLon
(char[] aRecord) Reads a longitude.protected String
readMagneticVariation
(char[] aRecord) Reads the magnetic variation from a record of format 01.protected String
readNameFromFmt1
(char[] aRecord) Reads the name of an aerodrome.protected TLcdAerodromeOperationsType
readOperationsTypeFromFmt1
(char[] aRecord) Reads an aerodromes type from a record of format 01.protected boolean
readRotatingBeaconFromFmt1
(char[] aRecord) Reads the rotating beacon of an aerodrome.protected Integer
readStateProvinceCodeFromFmt1
(char[] aRecord) Reads the state province code from a record of format 01.protected String
readWACFromFmt1
(char[] aRecord) Reads the world area code from a record of format 01.void
setCommunicationFeaturesToBeDecoded
(String[] aAerodromeCommunicationsFeaturesToBeDecoded) Sets the airport/heliport communications features to be decoded.protected void
Given the complete fCommunicationFeaturesToBeDecoded list, it finds the features that have to be extracted from each type of format.Methods inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFSingleModelDecoder
cleanUp, createModelDescriptor, decode, handleRecord, setKeyFeatureNames
Methods inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFDecoder
addErrorReport, canDecodeSource, getAltitudeType, getBearingTypeForChar, getBounds, getDAFIFProperties, getDataObjectFactory, getDecodingBounds, getDisplayName, 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, transformPointToReferenceDatumSFCT
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.format.dafif.decoder.ILcdDAFIFDecoder
getDecodeFileName
Methods inherited from interface com.luciad.model.ILcdModelDecoder
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Field Details
-
fCommunicationFeaturesToBeDecoded
The set of all communications features to be decoded This may be set by the user. The accepted types are the union of the Airport Communications Features corresponding to FILE 0 (airports), formats 16,17,18, 19. These types are identical to the Heliport Communications features corresponding to FILE 1 (heliports), formats 13,14, 15 and 16. -
fCommunicationFeaturesType1
For each of the 4 formats, the particular features to decode. The formats are 16,17,18,19 for airports are identical to formats 13,14,15,16 for heliports. The formats are mapped to "Type1", "Type2", "Type3" and "Type4" respectively. This list is obtained from fCommunicationFeaturesToBeDecoded by calling splitAerodromeFeatures. -
fCommunicationFeaturesType2
-
fCommunicationFeaturesType3
-
fCommunicationFeaturesType4
-
-
Constructor Details
-
ALcdDAFIFAerodromeDecoder
Initializes the DAFIFProperties field with the specified properties object. This object may be null.If you don't have a properties object here, you can still specify it by decoding a .toc file containing the dafif properties. The decoder will read the properties from the .toc file and look for the data file to be decoded in the directory containing this .toc file.
- Parameters:
aDAFIFProperties
- aProperties
object containing for each domain object the name of its data file or NULL
-
-
Method Details
-
readIdentification
Reads the identification of an aerodrome from a given record.The identification has no spaces.
- Parameters:
aRecord
- the record to read from- Returns:
- the aerodrome identification
-
readCountryCodeFromFmt1
Returns the country code of an aerodrome.The country code is part of the aerodromes identification. The identification consists of 7 characters: 5 numbers preceded by the country code.
- Parameters:
aRecord
- the record to read from- Returns:
- the country code
-
readNameFromFmt1
Reads the name of an aerodrome.Aerodrome names are found in records of format 01. A name has 38 characters and starts at the 14th position of the record. It should contain at least one character. An exception will be thrown if the name is empty.
- Parameters:
aRecord
- the record to read from- Returns:
- the name
-
readICAOCodeFromFmt1
Reads an aerodromes ICAO code from a record of format 01.The ICAO code has 4 characters and starts at the 3th position of the record. It should contain at least 2 non-space characters. If not, an exception will be thrown
- Parameters:
aRecord
- the record to read from- Returns:
- the ICAO code
-
readStateProvinceCodeFromFmt1
Reads the state province code from a record of format 01.This code has length 2. The field may be empty.
- Parameters:
aRecord
- the record to read from- Returns:
- the State Province code
-
readFAAHostCountryIdentifierFromFmt1
Reads the Federal Aviation Administration identifier/host country identifier.This 4 letter - String contains at least 1 character. If it 's empty, an exception will be thrown.
- Parameters:
aRecord
- the record to read from- Returns:
- the Federal Aviation Administration identifier/host country identifier
-
readLon
protected double readLon(char[] aRecord) Reads a longitude.- Parameters:
aRecord
- the record to read from- Returns:
- the longitude
-
readLat
protected double readLat(char[] aRecord) Reads a latitude.- Parameters:
aRecord
- the record to read from- Returns:
- the latitude
-
readGeodeticLon
protected double readGeodeticLon(char[] aRecord) Reads a geodetic longitude.- Parameters:
aRecord
- the record to read from- Returns:
- the longitude
-
readGeodeticLat
protected double readGeodeticLat(char[] aRecord) Reads a geodetic latitude.- Parameters:
aRecord
- the record to read from- Returns:
- the latitude
-
readLocalHorizontalDatumFromFmt1
Reads the local horizontal datum from a record of format 01.This field must not be empty. If it is, an exception will be thrown.
- Parameters:
aRecord
- the record to read from- Returns:
- the geodetic datum of the source coordinates
-
readOperationsTypeFromFmt1
Reads an aerodromes type from a record of format 01.A type is defined by one single character (values 'A', 'B', 'C' or 'D') and results in an object of
TLcdAirportType
.- Parameters:
aRecord
- the record to read from- Returns:
- the operationsType
-
readElevationFromFmt1
protected double readElevationFromFmt1(char[] aRecord) Reads the elevation of an aerodrome.The elevation starts at the 102nd position of a record of format 01 and it consists of 5 characters. The elevation is measured in meter.
- Parameters:
aRecord
- the record to read from- Returns:
- the elevation
-
readRotatingBeaconFromFmt1
protected boolean readRotatingBeaconFromFmt1(char[] aRecord) Reads the rotating beacon of an aerodrome.This field should contain 'Y' or ' '. If not, an
IllegalArgumentException
will be thrown.- Parameters:
aRecord
- the record to read from- Returns:
- a flag indicating whether this aerodrome has a rotating beacon
-
readMagneticVariation
Reads the magnetic variation from a record of format 01.The magnetic variation has length 12. If not, an exception will be thrown.
- Parameters:
aRecord
- the record to read from- Returns:
- the magnetic variation
-
readWACFromFmt1
Reads the world area code from a record of format 01.This code has length 4 and at least 2 characters are no space. If less than 2 characters are found, an exception will be thrown.
- Parameters:
aRecord
- the record to read from- Returns:
- the WAC
-
getTypeForChar
Returns the uniqueTLcdAirportType
object attached to the given character.If there's no
TLcdAirportType
object provided for the given character, anIllegalArgumentException
is thrown.- Parameters:
aType
- a code for the operationsType- Returns:
- the operationsType according to the given code
-
readCommunicationType
Reads the communication type from a communication record- Parameters:
aRecord
-- Returns:
- the communication type as a TLcdCommunicationType object
-
readCommunicationTypeMultiplierFromType1
Reads the communication type multiplier from a communication record of format 16 - airports or 13 - heliports.- Parameters:
aRecord
-- Returns:
- the communication type multiplier as an Integer
-
readCommunicationTypeMultiplierFromType2
Reads the communication type multiplier from a communication record of format 17 - airports or 14 - heliports.- Parameters:
aRecord
-- Returns:
- the communication type multiplier as an Integer
-
readCommunicationTypeMultiplierFromType3
Reads the communication type multiplier from a communication record of format 18 - airports or 15 - heliports.- Parameters:
aRecord
-- Returns:
- the communication type multiplier as an Integer
-
readCommunicationTypeMultiplierFromType4
Reads the communication type multiplier from a communication record of format 19 - airports or 16 - heliports.- Parameters:
aRecord
-- Returns:
- the communication type multiplier as an Integer
-
readCommunicationRemarkSequenceNumber
Reads the remark sequence number from a communication record of format 19 - airports or 16 - heliports- Parameters:
aRecord
-- Returns:
- the remark sequence number
-
readCommunicationRemark
Reads the remark text from a communication record of format 19 - airports or 16 - heliports- Parameters:
aRecord
-- Returns:
- the remark text
-
setCommunicationFeaturesToBeDecoded
public void setCommunicationFeaturesToBeDecoded(String[] aAerodromeCommunicationsFeaturesToBeDecoded) Sets the airport/heliport communications features to be decoded. The legal names of the features are those present inILcdDAFIFCommunicationFeature
.- Parameters:
aAerodromeCommunicationsFeaturesToBeDecoded
- an array of communication features- See Also:
-
readCommunicationFeaturesFromType1
Reads a full record having format 16 (airports) / 13 (heliports) The created TLcdFeaturedService has the same number of features as specified by fCommunicationFeaturesToBeDecoded, but only the fCommunicationFeaturesType1 are actually filled in. -
readCommunicationFeaturesFromType2
Reads a full record having format 17 (airports) / 14 (heliports) The created TLcdFeaturedService has the same number of features as specified by fCommunicationFeaturesToBeDecoded, but only the fCommunicationFeaturesType1 are actually filled in. -
readCommunicationFeaturesFromType3
Reads a full record having format 18 (airports) / 15 (heliports) The created TLcdFeaturedService has the same number of features as specified by fCommunicationFeaturesToBeDecoded, but only the fCommunicationFeaturesType1 are actually filled in. -
splitAerodromeFeatures
protected void splitAerodromeFeatures()Given the complete fCommunicationFeaturesToBeDecoded list, it finds the features that have to be extracted from each type of format. Also computes the position (mapping) of each feature into the final vector.
-