Class OpenJUMPSextanteRasterLayer
java.lang.Object
org.openjump.core.rasterimage.sextante.AbstractSextanteRasterLayer
org.openjump.core.rasterimage.sextante.OpenJUMPSextanteRasterLayer
- All Implemented Interfaces:
ISextanteDataObject, ISextanteLayer, ISextanteRasterLayer
-
Field Summary
Fields inherited from class AbstractSextanteRasterLayer
m_BaseDataObjectFields inherited from interface ISextanteRasterLayer
INTERPOLATION_BicubicSpline, INTERPOLATION_Bilinear, INTERPOLATION_BSpline, INTERPOLATION_InverseDistance, INTERPOLATION_NearestNeighbour, RASTER_DATA_TYPE_BYTE, RASTER_DATA_TYPE_DOUBLE, RASTER_DATA_TYPE_FLOAT, RASTER_DATA_TYPE_INT, RASTER_DATA_TYPE_SHORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()This method closes the data object, which was opened using the open() method.voidcreate(String name, String filename, GridExtent ge, int dataType, int numBands, Object crs, LayerManager layerManager) voidcreate(RasterImageLayer layer) voidcreate(RasterImageLayer layer, boolean loadFromFile) voidfitToGridExtent(GridExtent ge, LayerManager layerManager) Resamples the layer so the new full extent is the same as a given gridExtentintReturns the number of bands of the layerdoublegetCellValueInLayerCoords(int x, int y, int band) Returns the value of a cell in the original image coords, that is, not using the query windowgetCRS()Returns an object with information about the CRS associated to this layer.intReturns the data type of the layerReturns the filename associated to this data object.Returns the extent covered by the layerReturn the original cellsize of the layer.Returns the grid extent of the layergetName()Returns the name of this data objectdoubleGets the no-data value of the layervoidopen()This methods initialize the data object, so it is ready to be accessedvoidThis method post-processes the object after it has been created.voidsetCellValue(int x, int y, int band, double value) Sets the value at a cellvoidSets a new name for this objectvoidsetNoDataValue(double noDataValue) Sets the no-data value of the layerMethods inherited from class AbstractSextanteRasterLayer
add, addToCellValue, addToCellValue, assign, assign, assignNoData, getAccumulatedHistogram, getAccumulatedHistogram, getAspect, getBaseDataObject, getCellValueAsByte, getCellValueAsByte, getCellValueAsDouble, getCellValueAsDouble, getCellValueAsFloat, getCellValueAsFloat, getCellValueAsInt, getCellValueAsInt, getCellValueAsShort, getCellValueAsShort, getDirToNextDownslopeCell, getDirToNextDownslopeCell, getDistToNeighborInDir, getHistogram, getHistogram, getMaxValue, getMaxValue, getMeanValue, getMeanValue, getMinValue, getMinValue, getNX, getNY, getSlope, getUnitDistToNeighborInDir, getValueAt, getValueAt, getVariance, getVariance, getWindowCellSize, getWindowGridExtent, isInWindow, isNoDataValue, multiply, setCellValue, setFullExtent, setInterpolationMethod, setNoData, setNoData, setWindowExtent, setWindowExtent, toString
-
Constructor Details
-
OpenJUMPSextanteRasterLayer
public OpenJUMPSextanteRasterLayer()
-
-
Method Details
-
create
- Throws:
IOException
-
create
- Throws:
IOException
-
create
public void create(String name, String filename, GridExtent ge, int dataType, int numBands, Object crs, LayerManager layerManager) -
fitToGridExtent
Description copied from interface:ISextanteRasterLayerResamples the layer so the new full extent is the same as a given gridExtent- Parameters:
ge- the reference gridExtentlayerManager- the LayerManager
-
getBandsCount
public int getBandsCount()Description copied from interface:ISextanteRasterLayerReturns the number of bands of the layer- Returns:
- the number of bands of the layer
-
getCellValueInLayerCoords
public double getCellValueInLayerCoords(int x, int y, int band) Description copied from interface:ISextanteRasterLayerReturns the value of a cell in the original image coords, that is, not using the query window- Parameters:
x- the x coordinate(col) of the celly- the y coordinate(row) of the cellband- the band to be queried- Returns:
- the value of a cell in the original image coords.
-
getDataType
public int getDataType()Description copied from interface:ISextanteRasterLayerReturns the data type of the layer- Returns:
- the data type of the layer
-
getLayerCellSize
Description copied from interface:ISextanteRasterLayerReturn the original cellsize of the layer. X and Y cellsizes are assumed to be equal- Returns:
- the original cellsize of the layer
-
getLayerGridExtent
Description copied from interface:ISextanteRasterLayerReturns the grid extent of the layer- Returns:
- the grid extent of the layer
-
getNoDataValue
public double getNoDataValue()Description copied from interface:ISextanteRasterLayerGets the no-data value of the layer- Returns:
- the no-data value of the layer
-
setCellValue
public void setCellValue(int x, int y, int band, double value) Description copied from interface:ISextanteRasterLayerSets the value at a cell- Parameters:
x- the x coordinate (cols)y- the y coordinate (rows)band- the band (zero-based)value- the new value
-
setNoDataValue
public void setNoDataValue(double noDataValue) Description copied from interface:ISextanteRasterLayerSets the no-data value of the layer- Parameters:
noDataValue- the new no-data value
-
getCRS
Description copied from interface:ISextanteLayerReturns an object with information about the CRS associated to this layer. The class of this object depends on the implementation of this interface- Returns:
- An object with information about the CRS used for this layer (i.e. a string with a EPSG code)
-
getFullExtent
Returns the extent covered by the layer- Returns:
- the extent of the layer
-
open
public void open()Description copied from interface:ISextanteDataObjectThis methods initialize the data object, so it is ready to be accessed -
close
public void close()Description copied from interface:ISextanteDataObjectThis method closes the data object, which was opened using the open() method. -
postProcess
Description copied from interface:ISextanteDataObjectThis method post-processes the object after it has been created. If, for instance, data are kept in memory before they are dumped to file, this method should write that file.- Throws:
Exception- if an Exception occurs during post-processing
-
getFilename
Description copied from interface:ISextanteDataObjectReturns the filename associated to this data object.- Returns:
- the filename associated to this data object. Can be null, since the object wrapped by this class doesn't have to be file-based.
-
getName
Description copied from interface:ISextanteDataObjectReturns the name of this data object- Returns:
- the name of this data object
-
setName
Description copied from interface:ISextanteDataObjectSets a new name for this object- Parameters:
sName- the new name
-