public abstract class ProcessUtils
extends java.lang.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,
java.awt.geom.Rectangle2D sourcePxBBox,
boolean[] bands)
Gets a data buffer from a
RasterDataStore |
void |
debug(java.lang.String msg,
java.lang.Object parent,
java.lang.Exception exception)
Registra un mensaje de error en el log de gvSIG
|
boolean |
exportRaster(java.lang.String sFilename,
Buffer buf,
Buffer alphaBuffer,
double cellsize,
double ulx,
double uly)
Export buffer to disk
|
boolean |
exportRaster(java.lang.String sFilename,
Buffer buf,
Buffer alphaBuffer,
double cellsize,
double ulx,
double uly,
IProjection proj)
Export buffer to disk
|
void |
exportRaster(java.lang.String sFilename,
Buffer buf,
ColorInterpretation ci,
Extent windowExtent,
NoData nodata,
IProjection proj)
Exports a raster buffer to disk
|
boolean |
exportRaster(java.lang.String sFilename,
Buffer buf,
double cellsize,
double ulx,
double uly)
Exports raster buffer to disk
|
boolean |
exportRaster(java.lang.String sFilename,
Buffer buf,
double cellsize,
double ulx,
double uly,
IProjection proj)
Exports raster buffer to disk
|
boolean |
exportRaster(java.lang.String sFilename,
Buffer buf,
double cellsize,
double minX,
double minY,
NoData nodata)
Exports a raster buffer to disk
|
boolean |
exportRaster(java.lang.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,
java.util.List<ROI> rois,
RasterDataStore store)
Gets the bounding box taking into account whether there are ROIs or not
|
protected java.awt.geom.Rectangle2D[] |
getIntersectionInPxCoords(RasterDataStore[] dataStoreList)
Gets a list of rectangles which represents the pixel coordinates of each DataStore.
|
java.awt.geom.Rectangle2D |
getSourcePxBox(Extent resultExtent,
RasterDataStore store)
Gets the bounding box of the source in pixel coordinates
|
boolean |
isAnalizedEntireLayer(Extent window,
java.util.List<ROI> rois,
RasterDataStore store)
Returns true if the algorithm is applied to the entire layer
|
boolean |
isInsideOfROI(int x,
int y,
java.util.List<ROI> rois,
Extent extentResult)
Checks if the point in pixel coordinates is inside the region of
interest or not.
|
void |
messageBoxError(java.lang.String msg,
java.lang.Object parentWindow)
Shows a error dialog with a text and a accept button
|
void |
messageBoxError(java.lang.String msg,
java.lang.Object parentWindow,
java.util.ArrayList<java.lang.Exception> exception)
Muestra un dialogo de error con un texto y un botón de aceptar.
|
void |
messageBoxError(java.lang.String msg,
java.lang.Object parentWindow,
java.lang.Exception exception)
Muestra un dialogo de error con un texto y un botón de aceptar.
|
protected NoData doubleNODATA
public void debug(java.lang.String msg, java.lang.Object parent, java.lang.Exception exception)
msg
- Mensaje a guardar en el logparent
- Objeto que hizo disparar el mensajeexception
- Excepcion que ha sido recogidapublic void messageBoxError(java.lang.String msg, java.lang.Object parentWindow)
msg
- Message to show in the dialogparentWindow
- Parent windowpublic void messageBoxError(java.lang.String msg, java.lang.Object parentWindow, java.lang.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(java.lang.String msg, java.lang.Object parentWindow, java.util.ArrayList<java.lang.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(java.lang.String sFilename, Buffer buf, ColorInterpretation ci, Extent windowExtent, NoData nodata, IProjection proj)
sFilename
- buf
- cellsize
- minX
- minY
- ProviderNotRegisteredException
InitializeException
public boolean exportRaster(java.lang.String sFilename, Buffer buf, double cellsize, double minX, double minY, NoData nodata)
sFilename
- buf
- cellsize
- minX
- minY
- ProviderNotRegisteredException
InitializeException
public boolean exportRaster(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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 java.awt.geom.Rectangle2D[] getIntersectionInPxCoords(RasterDataStore[] dataStoreList)
dataStoreList
- public boolean isInsideOfROI(int x, int y, java.util.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, java.util.List<ROI> rois, RasterDataStore store)
public boolean isAnalizedEntireLayer(Extent window, java.util.List<ROI> rois, RasterDataStore store)
extent
- rois
- store
- public java.awt.geom.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, java.awt.geom.Rectangle2D sourcePxBBox, boolean[] bands) throws ProcessException
RasterDataStore
ProcessException
protected double getData(Buffer b, int row, int col, int band)
b
- row
- col
- band
-