/** * Creates raster data that is compatible to this dataset's data type. The data buffer returned contains exactly * <code>getRasterWidth()*getRasterHeight()</code> elements of a compatible data type. * * @return raster data compatible with this product raster * @see #createCompatibleSceneRasterData */ public ProductData createCompatibleRasterData() { return createCompatibleRasterData(getRasterWidth(), getRasterHeight()); }
/** * Creates raster data that is compatible to this dataset's data type. The data buffer returned contains exactly * <code>getBandOutputRasterWidth()*getBandOutputRasterHeight()</code> elements of a compatible data type. * * @return raster data compatible with this product raster * @see #createCompatibleRasterData */ public ProductData createCompatibleSceneRasterData() { return createCompatibleRasterData(getSceneRasterWidth(), getSceneRasterHeight()); }
@Override public synchronized ProductData getRawSamples() { if (rawSamples == null) { ProductData dataBuffer = getDataBuffer(); if (width * height == dataBuffer.getNumElems()) { rawSamples = dataBuffer; } } if (rawSamples == null) { rawSamples = rasterDataNode.createCompatibleRasterData(width, height); if (target) { mustWriteSampleData = true; } else { raster.getDataElements(minX, minY, width, height, rawSamples.getElems()); } } return rawSamples; }