Class TLcdGDFMultiLevelTiledModelDecoder

java.lang.Object
com.luciad.format.gdf.TLcdGDFMultiLevelTiledModelDecoder
All Implemented Interfaces:
ILcdInputStreamFactoryCapable, ILcdModelDecoder

public class TLcdGDFMultiLevelTiledModelDecoder extends Object implements ILcdModelDecoder, ILcdInputStreamFactoryCapable
This ILcdModelDecoder decodes multileveled, tiled GDF files, generated by the TLcdGDFMultiLevelTiledModelEncoder.
Since:
5.1
  • Constructor Details

    • TLcdGDFMultiLevelTiledModelDecoder

      public TLcdGDFMultiLevelTiledModelDecoder()
  • Method Details

    • setInputStreamFactory

      public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
      Sets the factory that will create input streams from which models can be decoded.
      Specified by:
      setInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Parameters:
      aInputStreamFactory - the factory that creates an input stream based on a source name.
    • getInputStreamFactory

      public ILcdInputStreamFactory getInputStreamFactory()
      Description copied from interface: ILcdInputStreamFactoryCapable
      Returns the input stream factory that is used.
      Specified by:
      getInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Returns:
      the input stream factory that is used.
    • setFeatureFilter

      public void setFeatureFilter(ILcdFilter aFeatureFilter)
      Sets a filter to select which features will be added to the decoded models and which not. The filter influences only which features will be directly contained in the models. Features which are filtered can still be present in the model via a reference from another feature (e.g. a road element that has been filtered can still be present via a complex feature from which it is part of).
      Parameters:
      aFeatureFilter - the filter to apply, or null if no filter should be used.
    • getFeatureFilter

      public ILcdFilter getFeatureFilter()
      Returns the feature filter used in this model decoder, or null if none is used.
      Returns:
      the feature filter used in this model decoder, or null if none is used.
    • setFeatureThemeMap

      public void setFeatureThemeMap(ILcdGDFFeatureThemeMap aFeatureThemeMap)
      Sets the ILcdGDFFeatureThemeMap to be used by this decoder. A model is created per theme in the feature theme map - and all features will be put in the appropriate model, according to the feature theme map. If null, all features will be put in one model. By default, the TLcdGDFDefaultFeatureThemeMap is used.
      Parameters:
      aFeatureThemeMap - the ILcdGDFFeatureThemeMap that is to be used by this decoder.
    • getFeatureThemeMap

      public ILcdGDFFeatureThemeMap getFeatureThemeMap()
      Returns the ILcdGDFFeatureThemeMap used by this decoder.
      Returns:
      the ILcdGDFFeatureThemeMap used by this decoder.
    • setDecodeZCoordinate

      public void setDecodeZCoordinate(boolean aDecodeZCoordinate)
      Sets a flag indicating whether the Z value of coordinates should be taken into account or not. Setting this flag to false will results in a slightly better memory usage.

      The default value is false.

      Parameters:
      aDecodeZCoordinate - boolean indicating whether the Z value of coordinates should be taken into account or not.
    • isDecodeZCoordinate

      public boolean isDecodeZCoordinate()
      Returns true if the z coordinate decoding flag is set, falseotherwise.
      Returns:
      true if the z coordinate decoding flag is set, falseotherwise.
    • setDecodeAttributes

      public void setDecodeAttributes(boolean aDecodeAttributes)
      Sets a flag indicating whether attributes should be decoded or not. Setting this flag to false will result in a slightly faster decoding and will require less memory, but not all information (e.g. road classes, names, ...) will be available in the model.

      The default value is true.

      Parameters:
      aDecodeAttributes - boolean indicating whether to decode attributes or not.
    • isDecodeAttributes

      public boolean isDecodeAttributes()
      Returns true if the attribute decoding flag is set, falseotherwise.
      Returns:
      true if the attribute decoding flag is set, falseotherwise.
    • setDecodeRelationships

      public void setDecodeRelationships(boolean aDecodeRelationships)
      Sets a flag indicating whether relationships should be decoded or not. Setting this flag to false will result in a slightly faster decoding and will require less memory, but not all information (e.g. turn restrictions) will be available in the model.

      The default value is true.

      Parameters:
      aDecodeRelationships - boolean indicating whether to decode relationships or not.
    • isDecodeRelationships

      public boolean isDecodeRelationships()
      Returns true if the relationship decoding flag is set, falseotherwise.
      Returns:
      true if the relationship decoding flag is set, falseotherwise.
    • setDecodeComplexFeatures

      public void setDecodeComplexFeatures(boolean aDecodeComplexFeatures)
      Sets a flag indicating whether complex features should be decoded or not. Setting this flag to false will result in a slightly faster decoding and will require less memory. All features constituting a complex feature will be available in the model, but the complex feature itself will not.

      The default value is true.

      Parameters:
      aDecodeComplexFeatures - boolean indicating whether to decode complex features or not.
    • isDecodeComplexFeatures

      public boolean isDecodeComplexFeatures()
      Returns true if the complex features decoding flag is set, falseotherwise.
      Returns:
      true if the complex features decoding flag is set, falseotherwise.
    • setTextTypeCodes

      public void setTextTypeCodes(String[] aTextTypeCodes)
      Sets the array of type codes whose attribute value is a pointer to a text record.

      The default list of type codes is based on the GDF 4 specification (ISO/DIS 14825 p333):

      Description Attribute Type Code
      Official Name Prefix OX
      Official Name Text ON
      Alternate Name Text AN
      Multi-media Attachment Name MN
      Directional Prefix DP
      Street Type Prefix SX
      Official Street Name Text OF
      Alternate Street Name TExt AL
      Street Type Suffix ST
      Directional Suffix DS
      Pronunciation PO
      Exit Number EN
      Route Number RN
      Route Number on Sign RX
      Building Class Name BC
      Destination Location DL
      Other Textual Content on Traffic Sign CT
      Brand Name BA
      Place Name PE
      Street Name SN
      Telefax Number TX
      Telephone Number TL
      Parameters:
      aTextTypeCodes - array of type codes whose attribute value is a pointer to a text record.
    • getTextTypeCodes

      public String[] getTextTypeCodes()
      Returns the list of type codes whose attribute value is a pointer to a name record.
      Returns:
      the list of type codes whose attribute value is a pointer to a name record.
    • setTimeDomainTypeCodes

      public void setTimeDomainTypeCodes(String[] aTimeDomainTypeCodes)
      Sets the array of type codes whose attribute value is a pointer to a time domain record.

      The default list of type codes is based on the GDF 4 specification (ISO/DIS 14825 p333):

      Description Attribute Type Code
      Validity Period VP
      Opening Record OP
      Parameters:
      aTimeDomainTypeCodes - array of type codes whose attribute value is a pointer to a time domain record.
    • getTimeDomainTypeCodes

      public String[] getTimeDomainTypeCodes()
      Returns the list of type codes whose attribute value is a pointer to a time domain record.
      Returns:
      the list of type codes whose attribute value is a pointer to a time domain record.
    • getDisplayName

      public String getDisplayName()
      Description copied from interface: ILcdModelDecoder
      Returns a short, displayable name for the format that is decoded by this ILcdModelDecoder.
      Specified by:
      getDisplayName in interface ILcdModelDecoder
      Returns:
      the displayable name of this ILcdModelDecoder.
    • canDecodeSource

      public boolean canDecodeSource(String aSourceName)
      Description copied from interface: ILcdModelDecoder
      Checks whether this model decoder can decode the specified data source. It is acceptable for this method to return true for a source name while decode throws an exception for that same source name.

      For performance reasons, we strongly recommend that this will only be a simple test. For example: check the file extension of a file, but not that the file exists or contains expected content.

      Specified by:
      canDecodeSource in interface ILcdModelDecoder
      Parameters:
      aSourceName - the data source to be verified; typically a file name or a URL.
      Returns:
      true if this decoder can likely decode the data specified by the source name, false otherwise.
      See Also:
    • decode

      public ILcdModel decode(String aSourceName) throws IOException
      Decodes the given source and returns a model, build from the decoded source.
      Specified by:
      decode in interface ILcdModelDecoder
      Parameters:
      aSourceName - the source document to be decoded.
      Returns:
      a model, build from the given source.
      Throws:
      IOException - if the given source document cannot be (fully) read or is damaged.
      See Also: