Class TLcdPOLModelEncoder

java.lang.Object
com.luciad.format.pol.TLcdPOLModelEncoder
All Implemented Interfaces:
ILcdModelEncoder, Serializable

@LcdService(service=ILcdModelEncoder.class, priority=20000) public class TLcdPOLModelEncoder extends Object implements ILcdModelEncoder
ILcdModelEncoder implementation to export ILcdModel objects to Polygon files which can be read by Jeppesen's TAAM application. The current implementation supports exporting of
  • ILcdPOLGeometry implementations
  • ILcdPoint implementations
  • ILcdPointList implementations.
  • ILcdExtruded implementations where the base shape is a ILcdPolygon or a ILcdPolyline.
The encoder can have a ILcdPOLAttributeProvider set to provide POL specific attributes for arbitrary elements in the model.
See Also:
  • Field Details Link icon

  • Constructor Details Link icon

    • TLcdPOLModelEncoder Link icon

      public TLcdPOLModelEncoder()
  • Method Details Link icon

    • getPOLAttributeProvider Link icon

      public ILcdPOLAttributeProvider getPOLAttributeProvider()
      Returns the POL attribute provider to provide POL specific attributes for arbitrary elements.
      Returns:
      the POL attribute provider to provide POL specific attributes for arbitrary elements.
      See Also:
    • setPOLAttributeProvider Link icon

      public void setPOLAttributeProvider(ILcdPOLAttributeProvider aPOLAttributeProvider)
      Sets the POL attribute provider to provide POL specific attributes for arbitrary elements.
      Parameters:
      aPOLAttributeProvider - the POL attribute provider to provide POL specific attributes for arbitrary elements.
      See Also:
    • canSave Link icon

      public boolean canSave(ILcdModel aModel)
      Description copied from interface: ILcdModelEncoder
      Returns whether this model encoder can save the specified model to the location it originally came from. Often this will only be a simple test, for example checking the type of the model's model descriptor.
      Specified by:
      canSave in interface ILcdModelEncoder
      Parameters:
      aModel - the model to be verified.
      Returns:
      true if this encoder can save the model in the location where it originally came from, false otherwise.
      See Also:
    • getDisplayName Link icon

      public String getDisplayName()
      Description copied from interface: ILcdModelEncoder
      Returns a short, displayable name for the format this ILcdModelEncoder encodes to.
      Specified by:
      getDisplayName in interface ILcdModelEncoder
      Returns:
      the displayable name of this ILcdModelEncoder.
    • save Link icon

      public void save(ILcdModel aModel) throws IllegalArgumentException, IOException
      Description copied from interface: ILcdModelEncoder
      Saves the model to the location where it originally came from.
      Specified by:
      save in interface ILcdModelEncoder
      Parameters:
      aModel - the model to be saved.
      Throws:
      IllegalArgumentException - if the model cannot be saved by this encoder (!canSave(aModel)).
      IOException - if an I/O error occurs during encoding.
    • canExport Link icon

      public boolean canExport(ILcdModel aModel, String aDestination)
      Tests if the model contains any elements that this encoder can process. This implementation calls isPOLElement(java.lang.Object) for every object in the model until 1 object passes the test.
      Specified by:
      canExport in interface ILcdModelEncoder
      Parameters:
      aModel - the model to export.
      aDestination - not used.
      Returns:
      true if at least one element can be exported.
      See Also:
    • export Link icon

      public void export(ILcdModel aModel, String aString) throws IllegalArgumentException, IOException
      Description copied from interface: ILcdModelEncoder
      Exports the specified model to the specified destination.
      Specified by:
      export in interface ILcdModelEncoder
      Parameters:
      aModel - the model to be exported.
      aString - the location where the model should be saved. Typically, this is a name for the output file, but it can also point to a file containing the required properties to create a set of data files.
      Throws:
      IllegalArgumentException - if the model cannot be saved by this encoder (!canExport(aModel, aDestinationName)).
      IOException - if an I/O error occurs during encoding.
    • isPOLElement Link icon

      protected boolean isPOLElement(Object aElement)
      Test whether an object can be exported as a POL element.
      Parameters:
      aElement -
      Returns:
      true if the element is an implementation of ILcdPOLGeometry, ILcdPoint, ILcdPointList or an extruded shape based on a ILcdPolygon or a ILcdPolyline.