Codota Logo
PixelInterleavedRasterData.setSample
Code IndexAdd Codota to your IDE (free)

How to use
setSample
method
in
org.deegree.coverage.raster.data.nio.PixelInterleavedRasterData

Best Java code snippets using org.deegree.coverage.raster.data.nio.PixelInterleavedRasterData.setSample (Showing top 1 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: deegree/deegree3

private void setSubset( PixelInterleavedRasterData targetData, int x0, int y0, int width, int height,
            RasterData sourceRaster ) {
  // clamp to maximum possible size
  int subWidth = min( targetData.getColumns() - x0, width, sourceRaster.getColumns() );
  int subHeight = min( targetData.getRows() - y0, height, sourceRaster.getRows() );
  byte[] tmp = new byte[targetData.getDataInfo().getDataSize()];
  for ( int y = 0; y < subHeight; y++ ) {
    for ( int x = 0; x < subWidth; x++ ) {
      byte[] color = new byte[3];
      byte[] c = new byte[1];
      c = sourceRaster.getSample( x, y, 0, c );
      color[0] = c[0];
      c = sourceRaster.getSample( x, y, 1, c );
      color[1] = c[0];
      c = sourceRaster.getSample( x, y, 2, c );
      color[2] = c[0];
      if ( !shouldBeTransparent( color ) ) {
        targetData.setSample( x0 + x, y0 + y, 0, sourceRaster.getSample( x, y, 0, tmp ) );
        targetData.setSample( x0 + x, y0 + y, 1, sourceRaster.getSample( x, y, 1, tmp ) );
        targetData.setSample( x0 + x, y0 + y, 2, sourceRaster.getSample( x, y, 2, tmp ) );
      }
    }
  }
}
org.deegree.coverage.raster.data.nioPixelInterleavedRasterDatasetSample

Popular methods of PixelInterleavedRasterData

  • getColumns
  • getRows
  • getByteBuffer
  • <init>
    Creates a new PixelInterleavedRasterData with given size, number of bands and data type
  • calculatePos
  • clampSize
  • createRasterDataInfo
  • getDataInfo
  • getDataRect
  • getOriginalHeight
  • getOriginalWidth
  • getPixelStride
  • getOriginalWidth,
  • getPixelStride,
  • getView,
  • isOutside,
  • isWithinDataArea

Popular in Java

  • Creating JSON documents from java classes using gson
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • getExternalFilesDir (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now