Class ChannelSelectionUpdateStyleVisitor

Object
DuplicatingStyleVisitor
ChannelSelectionUpdateStyleVisitor
All Implemented Interfaces:
StyleVisitor

public class ChannelSelectionUpdateStyleVisitor extends DuplicatingStyleVisitor
ChannelSelectionUpdateStyleVisitor is a DuplicatingStyleVisitor that is used to "reset" style symbolizer's selection channel order when the GridCoverageReader used to read a coverage supports band selection. If a reader supports band selection then channel ordering is done by band selection from the reader, so symbolizer does not need to re-apply selection channel order.

Also, see AbstractGridFormat.BANDS for the reader band selection parameter description.

  • Constructor Details

    • ChannelSelectionUpdateStyleVisitor

      public ChannelSelectionUpdateStyleVisitor(SelectedChannelType[] channels)
  • Method Details

    • copy

      protected ChannelSelection copy(ChannelSelection channelSelection)
      Overrides:
      copy in class DuplicatingStyleVisitor
    • getBandIndicesFromSelectionChannels

      public static int[] getBandIndicesFromSelectionChannels(RasterSymbolizer symbolizer)
      Returns an int[] containing the indices of the coverage bands that are used for the symbolizer's selection channels
      Parameters:
      symbolizer - The input symbolizer
      Returns:
      the band indices array (null if no channel selection was present in symbolizer)