Tabnine Logo
ChannelSelection
Code IndexAdd Tabnine to your IDE (free)

How to use
ChannelSelection
in
org.geotools.styling

Best Java code snippets using org.geotools.styling.ChannelSelection (Showing top 20 results out of 315)

origin: geoserver/geoserver

  @Override
  public void visit(ChannelSelection cs) {
    if (cs.getGrayChannel() != null) {
      cs.getGrayChannel().accept(this);
    }
    final SelectedChannelType[] rgbChannels = cs.getRGBChannels();
    for (SelectedChannelType ch : rgbChannels) {
      if (ch != null) ch.accept(this);
    }
  }
});
origin: geotools/geotools

protected ChannelSelection copy(ChannelSelection channelSelection) {
  if (channelSelection == null) return null;
  SelectedChannelType[] channels = copy(channelSelection.getSelectedChannels());
  ChannelSelection copy = sf.createChannelSelection(channels);
  copy.setGrayChannel(copy(channelSelection.getGrayChannel()));
  copy.setRGBChannels(copy(channelSelection.getRGBChannels()));
  return copy;
}
origin: geotools/geotools

public void visit(ChannelSelection cs) {
  cs.accept(this);
}
origin: geotools/geotools

  @Override
  public void setTo(
      org.geotools.styling.ChannelSelection sel,
      org.geotools.styling.SelectedChannelType chan) {
    org.geotools.styling.SelectedChannelType channels[] = sel.getRGBChannels();
    channels[1] = chan;
    sel.setRGBChannels(channels);
  }
},
origin: robward-scisys/sldeditor

@Override
protected ContrastEnhancement getContrastEnhancement(
    GroupIdEnum id, ChannelSelection channelSelection) {
  if (id == GroupIdEnum.RASTER_RGB_CHANNEL_OPTION) {
    SelectedChannelType[] channelTypes = channelSelection.getRGBChannels();
    return channelTypes[0].getContrastEnhancement();
  }
  return null;
}
origin: geotools/geotools

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated modifiable
   */
  public Object parse(ElementInstance instance, Node node, Object value) throws Exception {

    ChannelSelection cs = styleFactory.createChannelSelection(null);

    if (node.hasChild("GrayChannel")) {
      cs.setGrayChannel((SelectedChannelType) node.getChildValue("GrayChannel"));
    } else {
      SelectedChannelType[] rgb =
          new SelectedChannelType[] {
            (SelectedChannelType) node.getChildValue("RedChannel"),
            (SelectedChannelType) node.getChildValue("GreenChannel"),
            (SelectedChannelType) node.getChildValue("BlueChannel")
          };
      cs.setRGBChannels(rgb);
    }

    return cs;
  }
}
origin: geotools/geotools

  @Override
  public void setTo(
      org.geotools.styling.ChannelSelection sel,
      org.geotools.styling.SelectedChannelType chan) {
    sel.setGrayChannel(chan);
  }
},
origin: robward-scisys/sldeditor

@Override
protected ContrastEnhancement getContrastEnhancement(
    GroupIdEnum id, ChannelSelection channelSelection) {
  if (id == GroupIdEnum.RASTER_GREY_CHANNEL_OPTION) {
    return channelSelection.getGrayChannel().getContrastEnhancement();
  }
  return null;
}
origin: geotools/geotools

chTypeBlue.setChannelName("1");
chSel.setRGBChannels(chTypeRed, chTypeGreen, chTypeBlue);
origin: geotools/geotools

public void visit(ChannelSelection cs) {
  // get the channels
  final SelectedChannelType sct[] = copy(cs.getSelectedChannels());
  final ChannelSelection copy = sf.createChannelSelection(sct);
  if (STRICT && !copy.equals(cs)) {
    throw new IllegalStateException(
        "Was unable to duplicate provided ChannelSelection:" + cs);
  }
  pages.push(copy);
}
origin: geotools/geotools

  @Override
  public void setTo(
      org.geotools.styling.ChannelSelection sel,
      org.geotools.styling.SelectedChannelType chan) {
    org.geotools.styling.SelectedChannelType channels[] = sel.getRGBChannels();
    channels[0] = chan;
    sel.setRGBChannels(channels);
  }
},
origin: robward-scisys/sldeditor

@Override
protected ContrastEnhancement getContrastEnhancement(
    GroupIdEnum id, ChannelSelection channelSelection) {
  if (id == GroupIdEnum.RASTER_RGB_CHANNEL_OPTION) {
    SelectedChannelType[] channelTypes = channelSelection.getRGBChannels();
    return channelTypes[1].getContrastEnhancement();
  }
  return null;
}
origin: geotools/geotools

  @Override
  public void handle(YamlObject<?> obj, YamlParseContext context) {
    YamlMap map = obj.map();
    if (map.has(Band.GRAY.key)) {
      if (map.has(Band.RED.key) || map.has(Band.GREEN.key) || map.has(Band.BLUE.key))
        throw new IllegalArgumentException("grey and RGB can not be combined");
      SelectedChannelType gray = factory.style.selectedChannelType((String) null, null);
      selection.setGrayChannel(gray);
      parse(Band.GRAY, gray, map, context);
    } else {
      if (!(map.has(Band.RED.key) && map.has(Band.GREEN.key) && map.has(Band.BLUE.key)))
        throw new IllegalArgumentException("all of red green and blue must be preset");
      SelectedChannelType red = factory.style.selectedChannelType((String) null, null);
      SelectedChannelType green = factory.style.selectedChannelType((String) null, null);
      SelectedChannelType blue = factory.style.selectedChannelType((String) null, null);
      selection.setRGBChannels(red, green, blue);
      parse(Band.RED, red, map, context);
      parse(Band.GREEN, green, map, context);
      parse(Band.BLUE, blue, map, context);
    }
  }
}
origin: org.geotools/gt-ysld

  @Override
  public void setTo(
      org.geotools.styling.ChannelSelection sel,
      org.geotools.styling.SelectedChannelType chan) {
    sel.setGrayChannel(chan);
  }
},
origin: robward-scisys/sldeditor

@Override
protected ContrastEnhancement getContrastEnhancement(RasterSymbolizer rasterSymbolizer) {
  if (rasterSymbolizer != null) {
    ChannelSelection channelSelection = rasterSymbolizer.getChannelSelection();
    if (channelSelection != null) {
      SelectedChannelType greyChannel = channelSelection.getGrayChannel();
      if (greyChannel != null) {
        return greyChannel.getContrastEnhancement();
      }
    }
  }
  return null;
}
origin: geotools/geotools

chTypeGreen.setChannelName("3");
chSel.setRGBChannels(chTypeRed, chTypeBlue, chTypeGreen);
origin: geotools/geotools

public void visit(ChannelSelection cs) {
  if (cs == null) return;
  start("ChannelSelection");
  final SelectedChannelType[] sct = cs.getSelectedChannels();
  for (int i = 0; i < sct.length && sct != null; i++) visit(sct[i]);
  end("ChannelSelection");
}
origin: geotools/geotools

@Override
public void visit(ChannelSelection cs) {
  if (cs.getGrayChannel() != null) {
    cs.getGrayChannel().accept(this);
  }
  for (SelectedChannelType ch : cs.getRGBChannels()) {
    if (ch != null) {
      ch.accept(this);
    }
  }
}
origin: org.geotools/gt-main

protected ChannelSelection copy(ChannelSelection channelSelection) {
  if( channelSelection == null ) return null;
   SelectedChannelType[] channels = copy( channelSelection.getSelectedChannels() );
  ChannelSelection copy = sf.createChannelSelection( channels);
  copy.setGrayChannel( copy( channelSelection.getGrayChannel() ));
  copy.setRGBChannels( copy( channelSelection.getRGBChannels() ));
  return copy;
}

origin: geotools/geotools

  @Override
  public void setTo(
      org.geotools.styling.ChannelSelection sel,
      org.geotools.styling.SelectedChannelType chan) {
    org.geotools.styling.SelectedChannelType channels[] = sel.getRGBChannels();
    channels[2] = chan;
    sel.setRGBChannels(channels);
  }
};
org.geotools.stylingChannelSelection

Javadoc

The ChannelSelection element specifies the false-color channel selection for a multi-spectral raster source (such as a multi-band satellite-imagery source). It is defined as:
 
<xs:element name="ChannelSelection"> 
<xs:complexType> 
<xs:choice> 
<xs:sequence> 
<xs:element ref="sld:RedChannel"/> 
<xs:element ref="sld:GreenChannel"/> 
<xs:element ref="sld:BlueChannel"/> 
</xs:sequence> 
<xs:element ref="sld:GrayChannel"/> 
</xs:choice> 
</xs:complexType> 
</xs:element> 
<xs:element name="RedChannel" type="sld:SelectedChannelType"/> 
<xs:element name="GreenChannel" type="sld:SelectedChannelType"/> 
<xs:element name="BlueChannel" type="sld:SelectedChannelType"/> 
<xs:element name="GrayChannel" type="sld:SelectedChannelType"/> 
Either a channel may be selected to display in each of red, green, and blue, or a single channel may be selected to display in grayscale. (The spelling ?gray? is used since it seems to be more common on the Web than ?grey? by a ratio of about 3:1.) Contrast enhancement may be applied to each channel in isolation. Channels are identified by a system and data-dependent character identifier. Commonly, channels will be labelled as ?1?, ?2?, etc.

Most used methods

  • getRGBChannels
    get the RGB channels to be used
  • getGrayChannel
    Get the gray channel to be used
  • setGrayChannel
    Set the gray channel to be used
  • setRGBChannels
    set the RGB channels to be used
  • getSelectedChannels
    get the channels to be used
  • accept
  • setSelectedChannels
    set the channels to be used

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JPanel (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now