Class TLcyDefaultDecodersAddOn


public class TLcyDefaultDecodersAddOn extends ALcyPreferencesAddOn

This add-on is a collection of default LuciadLightspeed formats. For each format, an appropriate model decoder is registered to ILcyLucyEnv, an encoder (if it exists for that format), a layer factory, a customizer for the layer properties, a layer type provider and a model content type provider. For the SHP and raster formats, also layer encoders and decoders are registered. This allows to save the layer style for those formats.

For the SHP format and the raster formats (DTED, GeoTiff, TFW, DEM, ...), the layer style can be saved and restored using the layer encoders/decoders registered with the ILcyLucyEnv.

This add-on also adds support for the mtm format (see com.luciad.model.TLcdMultilevelTiledModelDecoder). The support is however limited for mtm files composed of SHP files.

  • Constructor Details

    • TLcyDefaultDecodersAddOn

      public TLcyDefaultDecodersAddOn()
      Default constructor
  • Method Details

    • plugInto

      public void plugInto(ILcyLucyEnv aLucyEnv)
      Description copied from class: ALcyPreferencesAddOn
      Creates and plugs in the add-on's preferences tool.
      Overrides:
      plugInto in class ALcyPreferencesAddOn
      Parameters:
      aLucyEnv - the Lucy environment to plug into
      See Also:
    • createSHPFormat

      protected ALcyFormat createSHPFormat()

      Creates the ALcyFormat for SHP data. Override this method to extend the default format with the new functionality. This method will only be called when the configuration file of this add-on indicates that the SHP format must be plugged in.

      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 createSHPFormat() {
         return new ALcyFormatWrapper(super.createSHPFormat()){
           @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;
               }
             }
           }
         }
       }
       
      Returns:
      the ALcyFormat for SHP data.
      Since:
      2017.1
    • getSHPFormat

      public final ALcyFormat getSHPFormat()

      Returns the ALcyFormat class that encapsulates this add-on's SHP data format. See the createSHPFormat() method if you want to override or extend the data format. Note that the format instance returned here might be different from the one created by createSHPFormat() as it might be wrapped with some ALcyFormatWrapper instances..

      Returns:
      this add-on's SHP format
      Since:
      2017.1
    • unplugFrom

      public void unplugFrom(ILcyLucyEnv aLucyEnv)
      Description copied from class: ALcyPreferencesAddOn
      Unplugs the add-on's preferences tool.
      Overrides:
      unplugFrom in class ALcyPreferencesAddOn
      Parameters:
      aLucyEnv - the Lucy environment
      See Also: