public abstract class ProcessUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected NoData |
doubleNODATA |
| Constructor and Description |
|---|
ProcessUtils() |
| Modifier and Type | Method and Description |
|---|---|
Buffer |
createOutputBuffer(int w,
int h,
int bandCount)
Builds the output buffer
|
Buffer |
createOutputBuffer(int w,
int h,
int bandCount,
int datatype) |
Buffer |
createSourceBuffer(RasterDataStore store,
Rectangle2D sourcePxBBox,
boolean[] bands)
Gets a data buffer from a
RasterDataStore |
void |
debug(String msg,
Object parent,
Exception exception)
Registra un mensaje de error en el log de gvSIG
|
boolean |
exportRaster(String sFilename,
Buffer buf,
Buffer alphaBuffer,
double cellsize,
double ulx,
double uly)
Export buffer to disk
|
boolean |
exportRaster(String sFilename,
Buffer buf,
Buffer alphaBuffer,
double cellsize,
double ulx,
double uly,
IProjection proj)
Export buffer to disk
|
void |
exportRaster(String sFilename,
Buffer buf,
ColorInterpretation ci,
Extent windowExtent,
NoData nodata,
IProjection proj)
Exports a raster buffer to disk
|
boolean |
exportRaster(String sFilename,
Buffer buf,
double cellsize,
double ulx,
double uly)
Exports raster buffer to disk
|
boolean |
exportRaster(String sFilename,
Buffer buf,
double cellsize,
double ulx,
double uly,
IProjection proj)
Exports raster buffer to disk
|
boolean |
exportRaster(String sFilename,
Buffer buf,
double cellsize,
double minX,
double minY,
NoData nodata)
Exports a raster buffer to disk
|
boolean |
exportRaster(String sFilename,
Buffer buf,
double cellsize,
double minX,
double minY,
NoData nodata,
IProjection proj)
Exports buffer to disk
|
protected double |
getData(Buffer b,
int row,
int col,
int band)
Gets a value of the buffer in double format
|
Extent |
getExtentResult(Extent window,
List<ROI> rois,
RasterDataStore store)
Gets the bounding box taking into account whether there are ROIs or not
|
protected Rectangle2D[] |
getIntersectionInPxCoords(RasterDataStore[] dataStoreList)
Gets a list of rectangles which represents the pixel coordinates of each DataStore.
|
Rectangle2D |
getSourcePxBox(Extent resultExtent,
RasterDataStore store)
Gets the bounding box of the source in pixel coordinates
|
boolean |
isAnalizedEntireLayer(Extent window,
List<ROI> rois,
RasterDataStore store)
Returns true if the algorithm is applied to the entire layer
|
boolean |
isInsideOfROI(int x,
int y,
List<ROI> rois,
Extent extentResult)
Checks if the point in pixel coordinates is inside the region of
interest or not.
|
void |
messageBoxError(String msg,
Object parentWindow)
Shows a error dialog with a text and a accept button
|
void |
messageBoxError(String msg,
Object parentWindow,
ArrayList<Exception> exception)
Muestra un dialogo de error con un texto y un botón de aceptar.
|
void |
messageBoxError(String msg,
Object parentWindow,
Exception exception)
Muestra un dialogo de error con un texto y un botón de aceptar.
|
protected NoData doubleNODATA
public void debug(String msg, Object parent, Exception exception)
msg - Mensaje a guardar en el logparent - Objeto que hizo disparar el mensajeexception - Excepcion que ha sido recogidapublic void messageBoxError(String msg, Object parentWindow)
msg - Message to show in the dialogparentWindow - Parent windowpublic void messageBoxError(String msg, Object parentWindow, Exception exception)
msg - Mensaje a mostrar en el dialogo.parentWindow - Ventana desde la que se lanza el dialogoexception - Excepcion que ha sido recogidapublic void messageBoxError(String msg, Object parentWindow, ArrayList<Exception> exception)
msg - Mensaje a mostrar en el dialogo.parentWindow - Ventana desde la que se lanza el dialogoexception - Excepcion que ha sido recogidapublic void exportRaster(String sFilename, Buffer buf, ColorInterpretation ci, Extent windowExtent, NoData nodata, IProjection proj)
sFilename - buf - cellsize - minX - minY - ProviderNotRegisteredExceptionInitializeExceptionpublic boolean exportRaster(String sFilename, Buffer buf, double cellsize, double minX, double minY, NoData nodata)
sFilename - buf - cellsize - minX - minY - ProviderNotRegisteredExceptionInitializeExceptionpublic boolean exportRaster(String sFilename, Buffer buf, double cellsize, double minX, double minY, NoData nodata, IProjection proj)
sFilename - Name of file to write data bufferbuf - data buffercellsize - Cell size of new rasterminX - minY - nodata - No data value of new rasterproj - Projection of new rasterpublic boolean exportRaster(String sFilename, Buffer buf, Buffer alphaBuffer, double cellsize, double ulx, double uly, IProjection proj)
sFilename - Name of raster filebuf - Buffer data with new dataalphaBuffer - Buffer with alpha datacellsize - Cell size of new rasterulx - X coordinate of upper left corneruly - Y coordinate of upper left cornerproj - Projection of new rasterpublic boolean exportRaster(String sFilename, Buffer buf, Buffer alphaBuffer, double cellsize, double ulx, double uly)
sFilename - Name of raster filebuf - Buffer data with new dataalphaBuffer - Buffer with alpha datacellsize - Cell size of new rasterulx - X coordinate of upper left corneruly - Y coordinate of upper left cornerpublic boolean exportRaster(String sFilename, Buffer buf, double cellsize, double ulx, double uly)
sFilename - Name of raster filebuf - Buffer data with new datacellsize - Cell size of new rasterulx - X coordinate of upper left corneruly - Y coordinate of upper left cornerpublic boolean exportRaster(String sFilename, Buffer buf, double cellsize, double ulx, double uly, IProjection proj)
sFilename - Name of raster filebuf - Buffer data with new datacellsize - Cell size of new rasterulx - X coordinate of upper left corneruly - Y coordinate of upper left cornerproj - Projection of new rasterprotected Rectangle2D[] getIntersectionInPxCoords(RasterDataStore[] dataStoreList)
dataStoreList - public boolean isInsideOfROI(int x,
int y,
List<ROI> rois,
Extent extentResult)
x - y - rois - extentResult - Bounding box of the area to which belongs the point defined in pixel coordinates (x, y)public Extent getExtentResult(Extent window, List<ROI> rois, RasterDataStore store)
public boolean isAnalizedEntireLayer(Extent window, List<ROI> rois, RasterDataStore store)
extent - rois - store - public Rectangle2D getSourcePxBox(Extent resultExtent, RasterDataStore store)
resultExtent - public Buffer createOutputBuffer(int w, int h, int bandCount)
sourcePxBBox - bandCount - public Buffer createOutputBuffer(int w, int h, int bandCount, int datatype)
public Buffer createSourceBuffer(RasterDataStore store, Rectangle2D sourcePxBBox, boolean[] bands) throws ProcessException
RasterDataStoreProcessExceptionprotected double getData(Buffer b, int row, int col, int band)
b - row - col - band -