public class GridCoverage2DRIA
extends GeometricOpImage
The exposed Layout will be the same as the target, and each Point in the target grid can be used in the resulting RenderedImage,
backgroundValues, computableBounds, extender, intBackgroundValues, interp, setBackground
Modifier | Constructor and Description |
---|---|
protected |
GridCoverage2DRIA(GridCoverage2D src,
GridGeometry2D dst,
Vector sources,
ImageLayout layout,
Map configuration,
boolean cobbleSources,
BorderExtender extender,
Interpolation interp,
double[] nodata,
ROI roi,
Hints hints) |
Modifier and Type | Method and Description |
---|---|
protected Rectangle |
backwardMapRect(Rectangle destRect,
int sourceIndex)
Returns the minimum bounding box of the region of the specified source to which a particular
Rectangle of the destination will be mapped. |
protected void |
computeRect(PlanarImage[] sources,
WritableRaster dest,
Rectangle destRect)
Warps a rectangle.
|
static GridCoverage2DRIA |
create(GridCoverage2D src,
GridCoverage2D dst,
double[] nodata) |
static GridCoverage2DRIA |
create(GridCoverage2D src,
GridCoverage2D dst,
double[] nodata,
Hints hints,
ROI roi)
Wrap the src coverage in the dst layout.
|
static GridCoverage2DRIA |
create(GridCoverage2D src,
GridGeometry2D dst,
double[] nodata)
Wrap the src coverage in the dst layout.
|
static GridCoverage2DRIA |
create(GridCoverage2D src,
GridGeometry2D dst,
double[] nodata,
Hints hints) |
static GridCoverage2DRIA |
create(GridCoverage2D src,
GridGeometry2D dst,
double[] nodata,
Hints hints,
ROI roi)
Wrap the src coverage in the dst layout.
|
protected Rectangle |
forwardMapRect(Rectangle pxRect,
int i)
Returns the minimum bounding box of the region of the destination to which a particular
Rectangle of the specified source will be mapped. |
Raster |
getTile(int tileX,
int tileY) |
Point2D |
mapDestPoint(Point2D destPt,
int sourceIndex) |
Point2D |
mapSourcePoint(Point2D srcPt,
int sourceIndex) |
float[] |
warpRect(int x,
int y,
int width,
int height,
float[] destRect) |
float[] |
warpSparseRect(int x0,
int y0,
int width,
int height,
int periodX,
int periodY,
float[] destRect) |
computeTile, getBorderExtender, getInterpolation, mapDestRect, mapSourceRect
addTileToCache, cancelTiles, computeRect, computesUniqueTiles, createTile, dispose, getExpandedNumBands, getFormatTags, getOperationComputeType, getTileCache, getTileCacheMetric, getTileDependencies, getTileFromCache, getTileRecycler, getTiles, hasExtender, prefetchTiles, queueTiles, recycleTile, setTileCache, vectorize, vectorize, vectorize
addPropertyChangeListener, addPropertyChangeListener, addSink, addSink, addSource, addTileComputationListener, copyData, copyData, copyExtendedData, createColorModel, createSnapshot, createWritableRaster, finalize, getAsBufferedImage, getAsBufferedImage, getBounds, getColorModel, getData, getData, getDefaultColorModel, getExtendedData, getGraphics, getHeight, getImageID, getMaxTileX, getMaxTileY, getMaxX, getMaxY, getMinTileX, getMinTileY, getMinX, getMinY, getNumBands, getNumSources, getNumXTiles, getNumYTiles, getProperties, getProperty, getPropertyClass, getPropertyNames, getPropertyNames, getSampleModel, getSinks, getSource, getSourceImage, getSourceObject, getSources, getSplits, getTileComputationListeners, getTileFactory, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileIndices, getTileRect, getTiles, getTileWidth, getWidth, overlapsMultipleTiles, removeProperty, removePropertyChangeListener, removePropertyChangeListener, removeSink, removeSink, removeSinks, removeSource, removeSources, removeTileComputationListener, setImageLayout, setProperties, setProperty, setSource, setSources, tileXToX, tileXToX, tileYToY, tileYToY, toString, wrapRenderedImage, XToTileX, XToTileX, YToTileY, YToTileY
protected GridCoverage2DRIA(GridCoverage2D src, GridGeometry2D dst, Vector sources, ImageLayout layout, Map configuration, boolean cobbleSources, BorderExtender extender, Interpolation interp, double[] nodata, ROI roi, Hints hints)
public static GridCoverage2DRIA create(GridCoverage2D src, GridGeometry2D dst, double[] nodata)
src
- the data coverage to be remapped on dst griddst
- the provider of the final gridnodata
- the nodata value to set for cells not covered by src but included in dst. All
bands will share the same nodata value.public static GridCoverage2DRIA create(GridCoverage2D src, GridCoverage2D dst, double[] nodata)
public static GridCoverage2DRIA create(GridCoverage2D src, GridGeometry2D dst, double[] nodata, Hints hints)
public static GridCoverage2DRIA create(GridCoverage2D src, GridGeometry2D dst, double[] nodata, Hints hints, ROI roi)
src
- the data coverage to be remapped on dst griddst
- the provider of the final gridnodata
- the nodata values to set for cells not covered by src but included in dst. All
bands will use the related nodata value.hints
- hints to use for the Rendering, Actually only ImageLayout is consideredroi
- public static GridCoverage2DRIA create(GridCoverage2D src, GridCoverage2D dst, double[] nodata, Hints hints, ROI roi)
src
- the data coverage to be remapped on dst griddst
- the provider of the final gridnodata
- the nodata values to set for cells not covered by src but included in dst. All
bands will use the related nodata value.roi
- public Raster getTile(int tileX, int tileY)
getTile
in interface RenderedImage
getTile
in class OpImage
public Point2D mapSourcePoint(Point2D srcPt, int sourceIndex)
mapSourcePoint
in class GeometricOpImage
protected Rectangle forwardMapRect(Rectangle pxRect, int i)
Rectangle
of the specified source will be mapped.
The integral source rectangle coordinates should be considered pixel indices. The "energy" of each pixel is defined to be concentrated in the continuous plane of pixels at an offset of (0.5, 0.5) from the index of the pixel. Forward mappings must take this (0.5, 0.5) pixel center into account. Thus given integral source pixel indices as input, the fractional destination location, as calculated by functions Xf(xSrc, ySrc), Yf(xSrc, ySrc), is given by:
xDst = Xf(xSrc+0.5, ySrc+0.5) - 0.5 yDst = Yf(xSrc+0.5, ySrc+0.5) - 0.5
forwardMapRect
in class GeometricOpImage
sourceRect
- the Rectangle
in source coordinates.sourceIndex
- the index of the source image.Rectangle
indicating the destination bounding box, or null
if the bounding box is unknown.IllegalArgumentException
- if sourceIndex
is negative or greater than the
index of the last source.IllegalArgumentException
- if sourceRect
is null
.public Point2D mapDestPoint(Point2D destPt, int sourceIndex)
mapDestPoint
in class GeometricOpImage
protected Rectangle backwardMapRect(Rectangle destRect, int sourceIndex)
Rectangle
of the destination will be mapped.
The integral destination rectangle coordinates should be considered pixel indices. The "energy" of each pixel is defined to be concentrated in the continuous plane of pixels at an offset of (0.5, 0.5) from the index of the pixel. Backward mappings must take this (0.5, 0.5) pixel center into account. Thus given integral destination pixel indices as input, the fractional source location, as calculated by functions Xb(xDst, yDst), Yb(xDst, yDst), is given by:
xSrc = Xb(xDst+0.5, yDst+0.5) - 0.5 ySrc = Yb(xDst+0.5, yDst+0.5) - 0.5
backwardMapRect
in class GeometricOpImage
destRect
- the Rectangle
in destination coordinates.sourceIndex
- the index of the source image.Rectangle
indicating the source bounding box, or null
if
the bounding box is unknown.IllegalArgumentException
- if sourceIndex
is negative or greater than the
index of the last source.IllegalArgumentException
- if destRect
is null
.protected void computeRect(PlanarImage[] sources, WritableRaster dest, Rectangle destRect)
Offers Improved performance with support for no data and region of interest.
computeRect
in class OpImage
public float[] warpRect(int x, int y, int width, int height, float[] destRect)
public float[] warpSparseRect(int x0, int y0, int width, int height, int periodX, int periodY, float[] destRect)
x0
- The minimum X coordinate of the destination region.y0
- The minimum Y coordinate of the destination region.width
- The width of the destination region.height
- The height of the destination region.periodX
- The horizontal sampling period.periodY
- The vertical sampling period.destRect
- A float
array containing at least
2*((width+periodX-1)/periodX)*
((height+periodY-1)/periodY)
elements, or null
. If
null
, a new array will be constructed.destRect
parameter if it is non-null
, or
a new float
array otherwise.Copyright © 1996–2019 Geotools. All rights reserved.