Class TLspVPFGeoSymStyler

java.lang.Object
com.luciad.view.lightspeed.style.styler.ALspStyler
com.luciad.format.vpf.lightspeed.TLspVPFGeoSymStyler
All Implemented Interfaces:
ILspStyler

public class TLspVPFGeoSymStyler extends ALspStyler
A styler for GeoSym styling (MIL-DTL-89045, 17 Juni 2004) of VPF data. For convenience, TLspVPFLayerBuilder can be used to create fully configured layers for a given VPF model.

The Z-order of the elements is based on the geometry type as follows (top-to-bottom):

  • Text geometry
  • Point geometry
  • Line geometry
  • Area geometry
The order of different classes of the same geometry type is undefined.

This styler supports full and simplified GeoSym styling. When using full GeoSym styling the styling will be derived from the fullsym.txt file, when configured to use simplified styling the simpsym.txt file is used.

The constructors of this class require a VPF product id as a parameter. This can be obtained from TLcdVPFModelDescriptor as follows:

 TLcdVPFFeatureClass vpfFeatureClass = ((TLcdVPFModelDescriptor) aModel.getModelDescriptor()).getVPFFeatureClass();
 String productId = vpfFeatureClass.getCoverage().getLibrary().getProductType();
 
Since:
2012.1
  • Constructor Details

    • TLspVPFGeoSymStyler

      public TLspVPFGeoSymStyler(String aVPFProductId)
      Creates a new GeoSym styler, using full GeoSym styling, for the given VPF product id. Use this constructor for models decoded by the TLcdVPFModelDecoder.
      Parameters:
      aVPFProductId - a VPF product id for which to create a GeoSym styler
      Throws:
      IllegalArgumentException - if the product is an invalid or unsupported VPF product id.
      See Also:
    • TLspVPFGeoSymStyler

      public TLspVPFGeoSymStyler(String aVPFProductId, boolean aSimplifiedGeoSymStyling)
      Creates a new GeoSym styler for the given VPF product id. Use this constructor for models decoded by the TLcdVPFModelDecoder.
      Parameters:
      aVPFProductId - a VPF product id for which to create a GeoSym styler
      aSimplifiedGeoSymStyling - whether to use full GeoSym styling or simplified GeoSym styling. true enables simplified GeoSym styling.
      Throws:
      IllegalArgumentException - if the product is an invalid or unsupported VPF product id.
      See Also:
    • TLspVPFGeoSymStyler

      public TLspVPFGeoSymStyler(String aVPFProductId, Set<ALspStyleTargetProvider> aStyleTargetProviders)
      Creates a new GeoSym styler, using full GeoSym styling, for the given VPF product id. Use this constructor for models whose model elements are not native VPF domain objects, e.g. for fused VPF data. The style target providers are used by the styler to retrieve the geometries from the elements.
      Parameters:
      aVPFProductId - a VPF product id for which to create a GeoSym styler
      aStyleTargetProviders - the style target providers to use for retrieving geometries from the domain objects
      Throws:
      IllegalArgumentException - if the product is an invalid or unsupported VPF product id.
      See Also:
    • TLspVPFGeoSymStyler

      public TLspVPFGeoSymStyler(String aVPFProductId, Set<ALspStyleTargetProvider> aStyleTargetProviders, boolean aSimplifiedGeoSymStyling)
      Creates a new GeoSym styler for the given VPF product id. Use this constructor for models whose model elements are not native VPF domain objects, e.g. for fused VPF data. The style target providers are used by the styler to retrieve the geometries from the elements.
      Parameters:
      aVPFProductId - a VPF product id for which to create a GeoSym styler
      aStyleTargetProviders - the style target providers to use for retrieving geometries from the domain objects
      aSimplifiedGeoSymStyling - whether to use full GeoSym styling or simplified GeoSym styling. true enables simplified GeoSym styling.
      Throws:
      IllegalArgumentException - if the product is an invalid or unsupported VPF product id.
      See Also:
  • Method Details

    • setOpacity

      public void setOpacity(float aOpacity)
      Sets the opacity of all colors and icons used by this styler.
      Parameters:
      aOpacity - the alpha value. Must be contained in the [0,1] interval (0 is fully transparent, 1 is fully opaque).
    • style

      public void style(Collection<?> aObjects, ALspStyleCollector aStyleCollector, TLspContext aContext)
      Description copied from interface: ILspStyler

      Styles the objects or labels contained in aObjects using the methods provided by ALspStyleCollector.

      Example usages for object styling:

      
       // Same style for all objects:
       aStyleCollector.objects(aObjects).style(myStyle).submit();
      
       // Object specific styling:
       aStyleCollector.object(myObject1).style(myStyle1).submit();
       aStyleCollector.object(myObject2).style(myStyle2).submit();
       

      Example usages for label styling:

      
       if (aStyleCollector instanceof ALspLabelStyleCollector) {
         ALspLabelStyleCollector labelStyleCollector = (ALspLabelStyleCollector)aStyleCollector;
      
         // Specify a priority for all labels of all objects:
         labelStyleCollector.objects(aDomainObjects).allLabels().priority(3).styles(...).submit();
      
         // Specify an algorithm for a specific label:
         labelStyleCollector.object(myObject1).label(123).algorithm(...).styles(...).submit();
       }
       

      The objects that are provided to aStyleCollector must be objects that are contained in aObjects. Note that not all objects have to be styled. Objects that are not submitted in aStyleCollector will not be painted.

      This method can be called very frequently, depending on the (amount of) data. If this method is not implemented efficiently, painting performance may be affected.

      Parameters:
      aObjects - The objects to be styled.
      aStyleCollector - A style collector to which all styling information should be passed, this collector is only valid within this method call, and can no longer be used afterwards.
      aContext - Provides context information that may affect styling, such as view specific properties.