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

How to use
setRGBChannels
method
in
org.geotools.styling.ChannelSelection

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

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: 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: 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);
  }
};
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

  /**
   *
   * <!-- 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 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) {
    org.geotools.styling.SelectedChannelType channels[] = sel.getRGBChannels();
    channels[1] = chan;
    sel.setRGBChannels(channels);
  }
},
origin: org.geotools/gt-ysld

  @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);
  }
};
origin: org.geotools/gt-ysld

  @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: geotools/geotools

  channels[i].setContrastEnhancement(cntEnh);
chSel.setRGBChannels(chTypeRed, chTypeGreen, chTypeBlue);
origin: geotools/geotools

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

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

private RasterSymbolizer createClippingChannelSelectionSymbolizer(int min, int max) {
  StyleBuilder sldBuilder = new StyleBuilder();
  RasterSymbolizer symbolizer = sldBuilder.createRasterSymbolizer();
  final ChannelSelection chSel = new ChannelSelectionImpl();
  final SelectedChannelType chTypeRed = new SelectedChannelTypeImpl();
  final SelectedChannelType chTypeBlue = new SelectedChannelTypeImpl();
  final SelectedChannelType chTypeGreen = new SelectedChannelTypeImpl();
  SelectedChannelType[] channels =
      new SelectedChannelType[] {chTypeRed, chTypeGreen, chTypeBlue};
  // Assign a different contrast method for each channel
  // by offsetting min and max of 20 on each channel
  // and assigning channels number with increments of 2
  for (int i = 0; i < 3; i++) {
    final ContrastEnhancement cntEnh = new ContrastEnhancementImpl();
    final ContrastMethodStrategy method = new NormalizeContrastMethodStrategy();
    method.addOption(
        "algorithm",
        sldBuilder.literalExpression(
            ContrastEnhancementType.NORMALIZE_CLIP_TO_ZERO_NAME));
    method.addOption("minValue", sldBuilder.literalExpression(min + (20 * i)));
    method.addOption("maxValue", sldBuilder.literalExpression(max + (20 * i)));
    cntEnh.setMethod(method);
    channels[i].setChannelName(Integer.toString((i * 2) + 1));
    channels[i].setContrastEnhancement(cntEnh);
  }
  chSel.setRGBChannels(chTypeRed, chTypeGreen, chTypeBlue);
  symbolizer.setChannelSelection(chSel);
  symbolizer.setOpacity(sldBuilder.literalExpression(1.0));
  return symbolizer;
}
origin: geotools/geotools

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

chTypeBlue.setChannelName("2");
chTypeGreen.setChannelName("3");
chSel.setRGBChannels(chTypeRed, chTypeBlue, chTypeGreen);
rsb_1.setChannelSelection(chSel);
rsb_1.setOpacity(sldBuilder.literalExpression(1.0));
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: org.geotools.xsd/gt-xsd-sld

  /**
   * <!-- 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: org.geotools.xsd/gt-sld

  /**
   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated modifiable
   */
  public Object parse(ElementInstance instance, Node node, Object value)
    throws Exception {
    if ((node.getChild("RedChannel") == null) || (node.getChild("BlueChannel") == null)
        || (node.getChild("GreenChannel") == null)
        || (node.getChild("GrayChannel") == null)) {
      String msg = "All of Red,Blue,Green,Gray must be specified";
      throw new RuntimeException(msg);
    }

    SelectedChannelType[] rgb = new SelectedChannelType[] {
        (SelectedChannelType) node.getChildValue("RedChannel"),
        (SelectedChannelType) node.getChildValue("GreenChannel"),
        (SelectedChannelType) node.getChildValue("BlueChannel")
      };
    SelectedChannelType gray = (SelectedChannelType) node.getChildValue("GrayChannel");

    ChannelSelection cs = styleFactory.createChannelSelection(null);
    cs.setGrayChannel(gray);
    cs.setRGBChannels(rgb);

    return cs;
  }
}
origin: org.geotools/gt-ysld

  @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.geoserver/gs-wms

blue.setChannelName("1");
cs.setRGBChannels(new SelectedChannelType[] {red, green, blue});
symbolizer.setChannelSelection(cs);
org.geotools.stylingChannelSelectionsetRGBChannels

Javadoc

Set the RGB channels to be used

Popular methods of ChannelSelection

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

Popular in Java

  • Start an intent from android
  • runOnUiThread (Activity)
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JComboBox (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