public class MixedGridResampler extends GridResampler
MixedGridResampler
class performs generic data
resampling between 2D earth transforms using a mix of forward and
inverse resampling methods. The steps are as follows:
Modifier and Type | Field and Description |
---|---|
static int |
OVERWRITE_ALWAYS
The always overwrite mode.
|
static int |
OVERWRITE_IF_CLOSER
The closer overwrite mode.
|
static int |
OVERWRITE_NEVER
The never overwrite mode.
|
protected int |
overwriteMode
The overwrite mode.
|
protected int |
rectHeight
The source coordinate rectangle height.
|
protected int |
rectWidth
The source coordinate rectangle width.
|
protected LocationFilter |
sourceFilter
The source location filter for pixel data.
|
destGrids, destTrans, sourceGrids, sourceTrans
Constructor and Description |
---|
MixedGridResampler(EarthTransform sourceTrans,
EarthTransform destTrans,
int rectWidth,
int rectHeight)
Creates a new grid resampler from the specified source and
destination transforms.
|
Modifier and Type | Method and Description |
---|---|
void |
perform(boolean verbose)
Performs the resampling operation on all source / destination
pairs.
|
void |
setOverwriteMode(int mode)
Sets the overwrite mode.
|
void |
setSourceFilter(LocationFilter filter)
Sets the source location filter.
|
addGrid
public static final int OVERWRITE_NEVER
public static final int OVERWRITE_ALWAYS
public static final int OVERWRITE_IF_CLOSER
protected int rectWidth
protected int rectHeight
protected int overwriteMode
protected LocationFilter sourceFilter
public MixedGridResampler(EarthTransform sourceTrans, EarthTransform destTrans, int rectWidth, int rectHeight)
sourceTrans
- the source earth transform.destTrans
- the destination earth transform.rectWidth
- the source rectangle width.rectHeight
- the source rectangle height.public void setSourceFilter(LocationFilter filter)
filter
- the source location filter, or null for none.public void setOverwriteMode(int mode)
OVERWRITE_NEVER
- Keep the first data value
and never overwrite it.OVERWRITE_ALWAYS
- Always overwrite the data
value with a new value. This is the default.OVERWRITE_IF_CLOSER
- Only overwrite the data
value if the new value is closer in physical location to the
destination than the previous value.mode
- the new overwrite mode value.public void perform(boolean verbose)
GridResampler
perform
in class GridResampler
verbose
- true for verbose resampling.