public class GridImpl extends Object implements Grid
| Modifier and Type | Field and Description |
|---|---|
double |
_2DX |
double |
_4DX_2 |
double |
_6DX |
double |
_DX_2 |
static double |
DEG_180_IN_RAD |
static double |
DEG_270_IN_RAD |
static double |
DEG_360_IN_RAD |
static double |
DEG_45_IN_RAD |
static double |
DEG_90_IN_RAD |
| Constructor and Description |
|---|
GridImpl(Buffer buf,
RasterDataStore datasource,
boolean notInterp)
Crea un grid a partir de un BufferFactory.
|
GridImpl(GridExtent layerExtent,
GridExtent windowExtent,
int dataType,
int[] bands)
Crea un grid vacio a partir de un extent y un tipo de datos.
|
GridImpl(RasterDataStore datasource)
Crea un grid a partir de un BufferFactory.
|
GridImpl(RasterDataStore datasource,
int[] bands)
Crea un grid a partir de un BufferFactory.
|
GridImpl(RasterDataStore datasource,
int[] bands,
GridExtent windowExtent)
Crea un grid a partir de un RasterDataset.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Grid g) |
void |
addToCellValue(int x,
int y,
byte value) |
void |
addToCellValue(int x,
int y,
double value) |
void |
addToCellValue(int x,
int y,
float value) |
void |
addToCellValue(int x,
int y,
int value) |
void |
addToCellValue(int x,
int y,
short value) |
void |
applyFilters()
Aplica la lista de filtros sobre el buffer
|
void |
assign(byte value) |
void |
assign(double value) |
void |
assign(float value) |
void |
assign(Grid driver) |
void |
assign(int value) |
void |
assign(RasterDataStore dSource) |
void |
assign(short value) |
void |
assignNoData() |
int |
calculateStatistics()
Obtiene el número de bandas del grid o 0 si no tiene buffer de
datos asociado.
|
void |
dispose()
Disposes the current object, to allow it to close and dispose any used
resources.
|
protected void |
finalize() |
double |
getAspect(int x,
int y) |
int |
getBandCount()
Obtiene el número de bandas del grid o 0 si no tiene buffer de
datos asociado.
|
double |
getCellSize()
Tamaño de celda
|
double |
getCellValue(int x,
int y) |
byte |
getCellValueAsByte(int x,
int y)
Obtiene el valor de una celda de tipo byte.
|
double |
getCellValueAsDouble(int x,
int y)
Obtiene el valor de una celda de tipo double.
|
float |
getCellValueAsFloat(int x,
int y)
Obtiene el valor de una celda de tipo float.
|
int |
getCellValueAsInt(int x,
int y)
Obtiene el valor de una celda de tipo int.
|
short |
getCellValueAsShort(int x,
int y)
Obtiene el valor de una celda de tipo short.
|
int |
getDataType()
Obtiene el tipo de datos
|
int |
getDirToNextDownslopeCell(int x,
int y) |
int |
getDirToNextDownslopeCell(int x,
int y,
boolean bForceDirToNoDataCell) |
double |
getDistToNeighborInDir(int iDir) |
RasterFilterList |
getFilterList()
Obtiene la lista de filtros.
|
GridCell |
getGridCell(int iX,
int iY)
Returns a GridCell object
|
GridExtent |
getGridExtent()
Obtiene la extensión de la ventana del raster accedida por el grid
|
int |
getLayerNX()
Obtiene el ancho en píxeles del dataset completo
|
int |
getLayerNY()
Obtiene el alto en píxeles del dataset completo
|
NoData |
getNoDataValue()
Valor nodata asociado al grid
|
int |
getNX()
Obtiene el ancho en píxeles del grid
|
int |
getNY()
Obtiene el alto en píxeles del grid
|
ColorTable |
getPalette()
Obtiene la lista de paletas asociadas al grid
|
Buffer |
getRasterBuf()
Obtiene el buffer de datos del grid
|
double |
getSlope(int x,
int y)
Obtiene la pendiente de un área de 3x3 píxeles que tiene como
centro las coordenadas que se le indican
|
GridCell[] |
getSortedArrayOfCells() |
BasicStats |
getStatistics()
Obtiene el objeto que calcula las estadísticas del Grid
|
static double |
getUnitDistToNeighborInDir(int iDir) |
GridExtent |
getWindowExtent()
Obtiene el extent de la ventana seleccionada para petición de datos
|
static int |
getXOffsetInDir(int iDir) |
static int |
getYOffsetInDir(int iDir) |
boolean |
isInGrid(int x,
int y)
Consulta si un punto está dentro del grid o fuera de el
|
boolean |
isNoDataValue(double noDataValue)
Consulta al grid si el valor pasado por parámetro coincide con el valor NoData del
buffer.
|
void |
loadWriterData()
Carga el buffer de datos desde el reader para poder escribir sobre los datos de
la ventana original.
|
void |
multiply(double value) |
void |
setBandToOperate(int band)
Asigna la banda sobre la que se realizan las operaciones.
|
void |
setCellValue(int x,
int y,
byte value) |
void |
setCellValue(int x,
int y,
double value) |
void |
setCellValue(int x,
int y,
float value) |
void |
setCellValue(int x,
int y,
int value) |
void |
setCellValue(int x,
int y,
short value) |
void |
setFilterList(RasterFilterList filterList)
Asigna la lista de filtros
|
void |
setInterpolationMethod(int iMethod)
Asigna el método de interpolación.
|
void |
setNoData(int x,
int y) |
void |
setNoDataValue(NoData dNoDataValue)
Asigna el valor que indica que una celda no tiene datos para el buffer
|
void |
setPalette(ColorTable palette)
Asigna la lista de paletas asociadas al grid
|
void |
switchToInterpolationMethod(boolean interpolation)
Selecciona la forma de obtener datos con o sin interpolación.
|
public static final double DEG_45_IN_RAD
public static final double DEG_90_IN_RAD
public static final double DEG_180_IN_RAD
public static final double DEG_270_IN_RAD
public static final double DEG_360_IN_RAD
public double _2DX
public double _6DX
public double _DX_2
public double _4DX_2
public GridImpl(RasterDataStore datasource, int[] bands, GridExtent windowExtent) throws RasterBufferInvalidException
IRasterDataSource - datasets que proporcionan los datosbands - número de bandas requeridaswindowExtent - Extensión de la ventana. Si este parámetro es null se usará el
mismo que el de la capa.RasterBufferInvalidExceptionpublic GridImpl(GridExtent layerExtent, GridExtent windowExtent, int dataType, int[] bands) throws RasterBufferInvalidException
layerExtent - Tamaño completo de la capawindowExtent - Ventana de datos.dataType - Tipo de datos del bufferbands - número de bandas requeridas y orden de dibujado en el bufferRasterBufferInvalidExceptionpublic GridImpl(Buffer buf, RasterDataStore datasource, boolean notInterp)
bufferFactory - Fuente de datoswindowExtent - Extent de los datos cargados en bufferFactorynotInterp - Si es true fuerza a que el reader sea sin interpolación. Si es false decide si
el reader es interpolado o no a partir de los extents de capa y la ventana seleccionada.public GridImpl(RasterDataStore datasource, int[] bands) throws RasterBufferInvalidException
bufferFactory - Fuente de datosbands - número de bandas requeridas y orden de dibujado en el bufferRasterBufferInvalidExceptionpublic GridImpl(RasterDataStore datasource) throws RasterBufferInvalidException
datasource - Fuente de datosRasterBufferInvalidExceptionpublic void loadWriterData()
throws GridException
loadWriterData in interface GridGridExceptionpublic void switchToInterpolationMethod(boolean interpolation)
interpolation - public int getBandCount()
GridgetBandCount in interface Gridpublic void assign(byte value)
throws GridException
assign in interface GridGridExceptionpublic void assign(short value)
throws GridException
assign in interface GridGridExceptionpublic void assign(int value)
throws GridException
assign in interface GridGridExceptionpublic void assign(float value)
throws GridException
assign in interface GridGridExceptionpublic void assign(double value)
throws GridException
assign in interface GridGridExceptionpublic void assign(RasterDataStore dSource) throws GridException
GridExceptionpublic void assign(Grid driver) throws GridException
assign in interface GridGridExceptionpublic void assignNoData()
assignNoData in interface Gridpublic void setCellValue(int x,
int y,
byte value)
throws OutOfGridException
setCellValue in interface GridOutOfGridExceptionpublic void setCellValue(int x,
int y,
short value)
throws OutOfGridException
setCellValue in interface GridOutOfGridExceptionpublic void setCellValue(int x,
int y,
int value)
throws OutOfGridException
setCellValue in interface GridOutOfGridExceptionpublic void setCellValue(int x,
int y,
float value)
throws OutOfGridException
setCellValue in interface GridOutOfGridExceptionpublic void setCellValue(int x,
int y,
double value)
throws OutOfGridException
setCellValue in interface GridOutOfGridExceptionpublic void add(Grid g) throws GridException
add in interface GridGridExceptionpublic void addToCellValue(int x,
int y,
byte value)
throws GridException
addToCellValue in interface GridGridExceptionpublic void addToCellValue(int x,
int y,
short value)
throws GridException
addToCellValue in interface GridGridExceptionpublic void addToCellValue(int x,
int y,
int value)
throws GridException
addToCellValue in interface GridGridExceptionpublic void addToCellValue(int x,
int y,
float value)
throws GridException
addToCellValue in interface GridGridExceptionpublic void addToCellValue(int x,
int y,
double value)
throws GridException
addToCellValue in interface GridGridExceptionpublic void multiply(double value)
throws GridException
multiply in interface GridGridExceptionpublic void setNoDataValue(NoData dNoDataValue)
GridsetNoDataValue in interface GriddNoDataValue - Valor NoDatapublic boolean isNoDataValue(double noDataValue)
GridisNoDataValue in interface GridnoDataValue - valor para comparar con el NoData del bufferpublic boolean isInGrid(int x,
int y)
Gridpublic double getCellSize()
GridgetCellSize in interface Gridpublic byte getCellValueAsByte(int x,
int y)
throws GridException
GridgetCellValueAsByte in interface Gridx - Posición X a recuperary - Posición Y a recuperarGridExceptionpublic short getCellValueAsShort(int x,
int y)
throws GridException
GridgetCellValueAsShort in interface Gridx - Posición X a recuperary - Posición Y a recuperarGridExceptionpublic int getCellValueAsInt(int x,
int y)
throws GridException
GridgetCellValueAsInt in interface Gridx - Posición X a recuperary - Posición Y a recuperarGridExceptionpublic float getCellValueAsFloat(int x,
int y)
throws GridException
GridgetCellValueAsFloat in interface Gridx - Posición X a recuperary - Posición Y a recuperarGridExceptionpublic double getCellValueAsDouble(int x,
int y)
throws GridException
GridgetCellValueAsDouble in interface Gridx - Posición X a recuperary - Posición Y a recuperarGridExceptionpublic double getCellValue(int x,
int y)
throws GridException
GridExceptionpublic NoData getNoDataValue()
GridgetNoDataValue in interface Gridpublic void setInterpolationMethod(int iMethod)
GridsetInterpolationMethod in interface Gridpublic int getNX()
Gridpublic int getNY()
Gridpublic int getLayerNX()
GridgetLayerNX in interface Gridpublic int getLayerNY()
GridgetLayerNY in interface Gridpublic int getDataType()
GridgetDataType in interface Gridpublic double getSlope(int x,
int y)
throws GridException
GridgetSlope in interface Gridx - Coordenada pixel Xy - Coordenada pixel YGridExceptionpublic double getAspect(int x,
int y)
throws GridException
getAspect in interface GridGridExceptionpublic static int getXOffsetInDir(int iDir)
public static int getYOffsetInDir(int iDir)
public double getDistToNeighborInDir(int iDir)
getDistToNeighborInDir in interface Gridpublic static double getUnitDistToNeighborInDir(int iDir)
public int getDirToNextDownslopeCell(int x,
int y)
throws GridException
getDirToNextDownslopeCell in interface GridGridExceptionpublic int getDirToNextDownslopeCell(int x,
int y,
boolean bForceDirToNoDataCell)
throws GridException
getDirToNextDownslopeCell in interface GridGridExceptionpublic GridCell[] getSortedArrayOfCells() throws GridException
getSortedArrayOfCells in interface GridGridExceptionpublic GridCell getGridCell(int iX, int iY) throws GridException
GridgetGridCell in interface GridiX - X positioniY - Y positionGridExceptionpublic ColorTable getPalette()
getPalette in interface Gridpublic int calculateStatistics()
public void setPalette(ColorTable palette)
palette - Lista de objetos GridPalettepublic RasterFilterList getFilterList()
getFilterList in interface Gridpublic void setFilterList(RasterFilterList filterList)
setFilterList in interface GridfilterList - public void applyFilters()
throws ProcessInterruptedException,
FilterAddException
applyFilters in interface GridFilterAddExceptionInterruptedExceptionProcessInterruptedExceptionpublic Buffer getRasterBuf()
GridgetRasterBuf in interface Gridpublic BasicStats getStatistics()
getStatistics in interface Gridpublic void setBandToOperate(int band)
setBandToOperate in interface Gridband - Banda sobre la que se realizan las operaciones.public GridExtent getWindowExtent()
public GridExtent getGridExtent()
GridgetGridExtent in interface Gridpublic void dispose()
DisposableNOTE:After calling this method, the object may not be usable anymore.
dispose in interface Disposable