Class TLcyS57DecoderAddOn


public class TLcyS57DecoderAddOn extends ALcyFormatAddOn

This add-on provides the support for S57/S52 hydrographic format.

This add-on allows to decode S-57 data and create models for it. It also provides the S-52 visualization for the S-57 data on a GXY view. If you want to support S-63 encrypted data as well you should include the TLcyS63FormatAddOn as well.

The visualization of the S-57 data is defined in the S-52 standard. This standard allows for a few customizations. Theses customization options are grouped in a TLcdS52DisplaySettings object (see the S-57 developer guide for more information). Lucy uses two instances of this TLcdS52DisplaySettings class: one for ENC/IENC product types and one for the AML product type. This means that all S-57 layers of the same product type have the same S-52 style (both GXY as Lightspeed layers). This add-on registers these TLcdS52DisplaySettings instances as Lucy services.

This add-on provides a menu item allowing to customize the S-52 display settings. The menu item itself can be customized in the configuration file of this add-on. The actual UI to customize the display settings is created using the registered ILcyCustomizerPanelFactory instances on the Lucy back-end. If you want to adjust the UI for the S-52 display settings, you should register your own ILcyCustomizerPanelFactory on the back-end capable of creating ILcyCustomizerPanel instances for a TLcdS52DisplaySettings object.

Since:
2013.1
  • Constructor Details

    • TLcyS57DecoderAddOn

      public TLcyS57DecoderAddOn()
  • Method Details

    • plugInto

      public void plugInto(ILcyLucyEnv aLucyEnv)
      Description copied from class: ALcyFormatAddOn

      Creates and plugs in the add-on's format.

      Overrides:
      plugInto in class ALcyFormatAddOn
      Parameters:
      aLucyEnv - the Lucy environment to plug into
      See Also:
    • unplugFrom

      public void unplugFrom(ILcyLucyEnv aLucyEnv)
      Description copied from class: ALcyFormatAddOn
      Unplugs the add-on's format.
      Overrides:
      unplugFrom in class ALcyFormatAddOn
      Parameters:
      aLucyEnv - the Lucy environment
      See Also:
    • createBaseFormat

      protected ALcyFormat createBaseFormat()
      Description copied from class: ALcyFormatAddOn

      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;
               }
             }
           }
         }
       }
       
      Specified by:
      createBaseFormat in class ALcyFormatAddOn
      Returns:
      a new format for this add-on
    • createFormatWrapper

      protected 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:
    • createFormatTool

      protected 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