Class TLcyHypsometryAddon


public class TLcyHypsometryAddon extends ALcyFormatAddOn
Add-on to compute slopes, orientations, azimuths, and other parameters derived from elevations, and visualize the results on a GXY map. It provides a terrain analysis back-end, format and GUI.

The GUI's application pane is built by a ALcyApplicationPaneTool, using the add-on's GUI factory. By default, this GUI uses the composite workspace preferences of the add-on's preferences tool.

The add-on's functionality can be changed by extending the back-end, or by extending the GUI builder and tapping into the latter preferences object. See the TEA developer's guide for more information on using and extending TEA add-ons.

Note that this add-on depends on the LuciadLightspeed TEA Industry Specific Component.

See Also:
  • Field Details

  • Constructor Details

    • TLcyHypsometryAddon

      public TLcyHypsometryAddon()
      Default constructor for the hypsometry add-on.
  • Method Details

    • plugInto

      public void plugInto(ILcyLucyEnv aLucyEnv)
      Builds a GUI, back-end and file formats for hypsometry calculations and plugs in the GUI and file format.
      Parameters:
      aLucyEnv - the Lucy instance to plug into
      See Also:
    • unplugFrom

      public void unplugFrom(ILcyLucyEnv aLucyEnv)
      Unplugs the add-on's format, preferences tool and application pane tool.
      Parameters:
      aLucyEnv - the Lucy environment
      See Also:
    • createHypsometryBackEnd

      protected TLcyHypsometryBackEnd createHypsometryBackEnd()
      Returns a new back-end for hypsometry calculations. Override this method to extend the default back-end with new functionality.
      Returns:
      a new back-end for hypsometry calculations
    • getHypsometryBackEnd

      public TLcyHypsometryBackEnd getHypsometryBackEnd()
      The back-end that the GUI can use for performing hypsometry calculations.

      Override createHypsometryBackEnd() to extend the back-end.

      Returns:
      a TLcyHypsometryBackEnd object for performing contour calculations
      See Also:
    • getHypsometryGeoTIFFFormat

      public ALcyFormat getHypsometryGeoTIFFFormat()
      Returns the ALcyFormat class that encapsulates a data format for the snapshots taken of all visible elevation layers.
      Returns:
      the ALcyFormat class that encapsulates a data format for the snapshots taken of all visible elevation layers
      See Also:
    • createHypsometryGeoTIFFBaseFormat

      protected ALcyFormat createHypsometryGeoTIFFBaseFormat()
      Returns a new file format for the snapshots taken of all visible elevation layers.
      Returns:
      a new file format for the snapshots taken of all visible elevation layers
    • createHypsometryGeoTIFFBaseFormatWrapper

      protected ALcyFormat createHypsometryGeoTIFFBaseFormatWrapper(ALcyFormat aBaseFormat)
      Returns a new file format wrapper for this format's snapshot format.
      Parameters:
      aBaseFormat - the base file format to wrap
      Returns:
      a new file format wrapper for this format's snapshot format
      See Also:
    • createBaseFormat

      protected ALcyFormat createBaseFormat()

      Returns a new data format for this add-on. Override this method to extend the default format with new functionality.

      For example, to alter the icon of the layers of this format, you can decorate the layer factory created in the format:

      
       @Override
       protected ALcyFormat createBaseFormat() {
         return new ALcyFormatWrapper(super.createBaseFormat()){
           @Override
           protected ILcdGXYLayerFactory createGXYLayerFactory(){
             final ILcdGXYLayerFactory delegate = super.createGXYLayerFactory();
             return new ILcdGXYLayerFactory(){
               @Override
               public ILcdGXYLayer createGXYLayer(ILcdModel aModel){
                 ILcdGXYLayer layer = delegate.createGXYLayer(aModel);
                 if (layer != null){
                   ILcdIcon icon = ...;
                   layer.setIcon(icon);
                 }
                 return layer;
               }
             }
           }
         }
       }
       

      Note that the created format is at least wrapped by a TLcySafeGuardFormatWrapper (or equivalent) before it is plugged in ILcyLucyEnv (using e.g. TLcyFormatTool). So it is safe to rely on the safety checks performed by that wrapper.

      Returns:
      a new file format for this add-on
    • createFormatTool

      public TLcyFormatTool createFormatTool(ALcyFormat aFormat)
      Description copied from class: ALcyFormatAddOn

      Creates a new format tool for the given format. It is used to plug all parts of the format ( e.g. ILcdGXYLayerFactory, ILcdModelDecoder, etc.) into ILcyLucyEnv.

      Overrides:
      createFormatTool in class ALcyFormatAddOn
      Parameters:
      aFormat - the format for which to create a tool
      Returns:
      the created TLcyFormatTool
    • createFormatWrapper

      public final ALcyFormat createFormatWrapper(ALcyFormat aBaseFormat)
      Description copied from class: ALcyFormatAddOn

      Returns a new data format wrapper for this add-on. A format wrapper extends the base format with aspects such as asynchronous painting, mutable file behavior, safe guarding, etc.

      Overriding this method of an existing add-on should be done with extreme care as add-ons typically rely on the wrappers that should be present (e.g. a safe guard).

      Specified by:
      createFormatWrapper in class ALcyFormatAddOn
      Parameters:
      aBaseFormat - the base format to wrap
      Returns:
      a new format for this add-on
      See Also:
    • createGUIFactory

      protected ALcyGUIFactory<Component> createGUIFactory()
      Returns a new GUI factory for this add-on. Override this method to extend the default GUI with new functionality.

      For example, this add-on could return a new instance of TLcyHypsometryGUIFactory

      Returns:
      a new GUI factory for this add-on
    • createApplicationPaneTool

      protected ALcyApplicationPaneTool createApplicationPaneTool()
      Returns the add-on's application pane tool. Override this method to add to the default application pane tool's functionality.

      This add-on's application pane tool initializes the GUI factory with the add-on's composite workspace preferences.

      Returns:
      the add-on's application pane tool
    • getGUIFactory

      public ALcyGUIFactory<Component> getGUIFactory()
      Returns the GUI factory to create the add-on's application pane. See createGUIFactory() if you want to override or extend the add-on's factory.
      Returns:
      the add-on's GUI factory
    • getApplicationPaneTool

      public ALcyApplicationPaneTool getApplicationPaneTool()
      Returns the tool that creates the add-on's application pane. See createApplicationPaneTool() if you want to override or extend the add-on's application pane tool.
      Returns:
      the tool that creates the add-on's application pane
    • createPreferencesTool

      protected TLcyPreferencesTool createPreferencesTool()
      Creates the TLcyPreferencesTool to be used by this add-on. Overwriting this method for example allows to register additional ILcyPropertyConverters for (complex) custom properties, to make sure they are correctly decoded from the add-on's configuration file and/or saved to the workspace. Note that this isn't required for simple properties such as String, int, double, etc.
      Overrides:
      createPreferencesTool in class ALcyPreferencesAddOn
      Returns:
      the created TLcyPreferencesTool.