Class TLcdDAFIFHelipadDecoder
- All Implemented Interfaces:
ILcdDAFIFDecoder
,ILcdInputStreamFactoryCapable
,ILcdModelDecoder
- Direct Known Subclasses:
TLcdDAFIFIndependentHelipadDecoder
ALcdDAFIFSingleModelDecoder
decodes
helipads from a DAFIF source file. Decoded models have as model descriptor
an instance of TLcdDAFIFHelipadModelDescriptor
.
DAFIF distinguishes three kinds of helipads:
- round helipads,
- rectangular helipads with a length shorter than 500 feet,
- rectangular helipads with a length equal or greater than 500 feet.
Rectangular helipads are created as a polygon defined by the four corners of the helipad. The two known locations high end and low end are located on the center line of the helipad. The corners of the helipad lie on both sides of the high respectively low end at a distance of half the width.
If there is no location information available in a helipad record, then it will be interpreted as a round helipad which is located at the linked heliport.
Since helipads shorter than 500 feet have only one location, there is no way of knowing what the angle of the rectangle should be when it's drawn. Therefore these helipads will be represented by a polygon containing only one point instead of four. Special Painters must then be used to draw these single point helipads on the map.
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.Helipad
,
which can also be retrieved through ILcdDataObject.getDataType()
.
The available properties of the objects are defined in TLcdDAFIFHelipadDataProperties
.
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 setHelipadFeaturesToBeDecoded
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.
- HELIPORT IDENTIFICATION: ILcdDAFIFHelipadFeature.HELIPORT_ID
- SEQUENCE NUMBER: ILcdDAFIFHelipadFeature.SEQUENCE_NUMBER
- SURFACE: ILcdDAFIFHelipadFeature.SURFACE
- LANDING AREA AIRCRAFT TYPE: ILcdDAFIFHelipadFeature.LANDING_AREA_AIRCRAFT_TYPE
- CLOSED UNUSABLE HELIPAD/RUNWAY: ILcdDAFIFHelipadFeature.CLOSED
- LIGHTING SYSTEM 1: ILcdDAFIFHelipadFeature.LGT_SYS1
- LIGHTING SYSTEM 2: ILcdDAFIFHelipadFeature.LGT_SYS2
- LIGHTING SYSTEM 3: ILcdDAFIFHelipadFeature.LGT_SYS3
- PAD IDENTIFIER (UNDER 500' IN LENGTH): ILcdDAFIFHelipadFeature.PAD_IDENTIFIER
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:
Helipads belong to a heliport. The TLcdDAFIFHelipadDecoder
does not decode
the heliports necessary to produce a helipad model. A heliport model should be specified by
using the setHeliportModel
method.
This heliport model should have an index on the IDENTIFICATION
feature. The createRequiredIndex
method can be used to put
this index on the heliport model, if the IDENTIFICATION
feature was decoded into the featured model objects of the heliport model.
- See Also:
-
Field Summary
Fields inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFDecoder
DAFIF_PROP_EXTENSION, fRecordCount
-
Constructor Summary
ConstructorDescriptionTLcdDAFIFHelipadDecoder
(ALcdAISObjectFactory aFactory) Deprecated.TLcdDAFIFHelipadDecoder
(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties) Deprecated.Constructs a newTLcdDAFIFHelipadDecoder
object.TLcdDAFIFHelipadDecoder
(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties) Constructs a newTLcdDAFIFHelipadDecoder
object. -
Method Summary
Modifier and TypeMethodDescriptionprotected ILcdModelDescriptor
createModelDescriptor
(String aSource) Creates and returns the model descriptor to be set on the model returned in thedecode
method.void
Adds a unique index on specified model of heliports.Calls the decode method ofALcdDAFIFSingleModelDecoder
.Returns the name of the file to be decoded.Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.protected final void
handleRecord
(int aFormat, char[] aRecord) Deals with one record of input.void
setHelipadDefaultDisplayNameIndex
(int aIndex) Specifies the index of the feature to be used as display name.void
setHelipadFeaturesToBeDecoded
(String[] aHelipadFeaturesToBeDecoded) Specifies a list of features to be decoded into the helipad model objects.void
setHeliportModel
(ILcdFeatureIndexedAnd2DBoundsIndexedModel aHeliportModel) Specifies a model of heliports.Methods inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFSingleModelDecoder
cleanUp, setKeyFeatureNames
Methods 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, 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.model.ILcdModelDecoder
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Constructor Details
-
TLcdDAFIFHelipadDecoder
Deprecated.Constructs a newTLcdDAFIFHelipadDecoder
object. The user should specify which domainFactory he or she wants to use to create the helipads.- Parameters:
aFactory
- the factory to be used to create the helipads
-
TLcdDAFIFHelipadDecoder
Constructs a newTLcdDAFIFHelipadDecoder
object. The user should specify which factory he or she wants to use to create the helipads.- Parameters:
aFactory
- the factory to be used to create the helipads
-
TLcdDAFIFHelipadDecoder
@Deprecated public TLcdDAFIFHelipadDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties) Deprecated.Constructs a newTLcdDAFIFHelipadDecoder
object.- Parameters:
aFactory
- the factory to be used to create the helipadsaDAFIFProperties
- aProperties
object that contains for each domain object the appropriate file name
-
TLcdDAFIFHelipadDecoder
Constructs a newTLcdDAFIFHelipadDecoder
object.- Parameters:
aFactory
- the factory to be used to create the helipadsaDAFIFProperties
- aProperties
object that contains for each domain object the appropriate file name
-
-
Method Details
-
getDisplayName
Description copied from interface:ILcdModelDecoder
Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.- Specified by:
getDisplayName
in interfaceILcdModelDecoder
- Overrides:
getDisplayName
in classALcdDAFIFDecoder
- Returns:
- the displayable name of this
ILcdModelDecoder
.
-
getDecodeFileName
Description copied from interface:ILcdDAFIFDecoder
Returns 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
-
createModelDescriptor
Description copied from class:ALcdDAFIFSingleModelDecoder
Creates and returns the model descriptor to be set on the model returned in thedecode
method.- Specified by:
createModelDescriptor
in 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
-
decode
Calls the decode method ofALcdDAFIFSingleModelDecoder
.Checks whether a heliport model is set before starting the decode process. If no heliport model is specified, an
IllegalStateException
object will be thrown.- Specified by:
decode
in interfaceILcdModelDecoder
- Overrides:
decode
in classALcdDAFIFSingleModelDecoder
- 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 processIllegalStateException
- if no waypoint model has been specified- See Also:
-
handleRecord
protected final void handleRecord(int aFormat, char[] aRecord) Description copied from class:ALcdDAFIFSingleModelDecoder
Deals with one record of input.- Specified by:
handleRecord
in classALcdDAFIFSingleModelDecoder
- Parameters:
aFormat
- the format of the recordaRecord
- the record
-
createRequiredIndex
Adds a unique index on specified model of heliports.This method should be called before calling
setHeliportModel
method.Please make sure that the
ILcdAerodromeFeature.IDENTIFICATION
feature was decoded into the model objects of the specified heliport model. If the features mentioned above weren't decoded into the heliports, this method will cause exceptions to be thrown!- Parameters:
aModel
- a model containing the heliports- See Also:
-
setHeliportModel
Specifies a model of heliports.Please make sure there's a unique index on this model!
- Parameters:
aHeliportModel
- the heliport model to be used to create the helipads- See Also:
-
setHelipadDefaultDisplayNameIndex
public void setHelipadDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be used as display name.- Parameters:
aIndex
- the index of the feature to be used as display name
-
setHelipadFeaturesToBeDecoded
Specifies a list of features to be decoded into the helipad model objects.Please make sure that the
HELIPORT_ID
andSEQUENCE_NUMBER
are in your list.- Parameters:
aHelipadFeaturesToBeDecoded
- a list of features that should be decoded into the helipad objects
-