|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.dataanalysis.geo.utils.AscRaster
public class AscRaster
Represents my best guess at the ESRI ASCII raster format. I couldn't find any sensible documentation, so it supports the following features:
| Field Summary | |
|---|---|
protected double |
cellsize
|
protected int |
cols
|
protected double[][] |
data
|
static String |
DEFAULT_NODATA
|
protected String |
NDATA
|
protected int |
rows
|
protected double |
xll
|
protected double |
yll
|
| Constructor Summary | |
|---|---|
AscRaster()
Creates an empty raster |
|
AscRaster(double[][] data,
double cellsize,
double xll,
double yll)
Creates a raster from the given data |
|
AscRaster(double cellsize,
double xll,
double yll)
Creates a raster from the given data |
|
AscRaster(int[][] data,
double cellsize,
double xll,
double yll)
Creates a raster from the given data |
|
| Method Summary | |
|---|---|
double |
getCellsize()
|
int |
getCols()
|
double[][] |
getData()
Returns the underlying data array - NOTE: this is *NOT* a copy, if you change it, you change the data |
String |
getNDATA()
|
int |
getRows()
|
static AscRaster |
getTempRaster(double[][] data,
double xll,
double yll,
double size)
|
static AscRaster |
getTempRaster(double[][] data,
double xll,
double yll,
double size,
String ndata)
|
double |
getValue(int row,
int column)
|
double |
getXll()
|
double |
getYll()
|
void |
init(AscRaster other)
Sets the parameters of this raster (rows, columns, corner, cellsize, NDATA etc) to be the same as the other raster. |
void |
initData()
Initialises the Raster to Double.NaN (i.e. |
void |
initData(double value)
Initialises the raster so the entire data array contains 'value' |
void |
print()
|
void |
setCellsize(double cellsize)
|
void |
setData(double[][] data)
Copies the given data into the underlying data array. |
void |
setData(int[][] data)
Copies the given data into the underlying data array. |
void |
setNDATA(String nDATA)
|
void |
setSize(int nrows,
int columns)
Sets the size of the raster, and also initialises the array with NDATA |
void |
setValue(int row,
int column,
double value)
|
void |
setXll(double xll)
|
void |
setYll(double yll)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double[][] data
protected double xll
protected double yll
protected double cellsize
protected int cols
protected int rows
protected String NDATA
public static final String DEFAULT_NODATA
| Constructor Detail |
|---|
public AscRaster()
public AscRaster(double cellsize,
double xll,
double yll)
cellsize - xll - yll -
public AscRaster(double[][] data,
double cellsize,
double xll,
double yll)
data - cellsize - xll - yll -
public AscRaster(int[][] data,
double cellsize,
double xll,
double yll)
data - cellsize - xll - yll - | Method Detail |
|---|
public void print()
public static AscRaster getTempRaster(double[][] data,
double xll,
double yll,
double size)
public static AscRaster getTempRaster(double[][] data,
double xll,
double yll,
double size,
String ndata)
public void init(AscRaster other)
other - public void initData()
public void initData(double value)
value - public double[][] getData()
public void setValue(int row,
int column,
double value)
public double getValue(int row,
int column)
public void setData(double[][] data)
data - public void setData(int[][] data)
data - public double getXll()
public void setXll(double xll)
public double getYll()
public void setYll(double yll)
public double getCellsize()
public void setCellsize(double cellsize)
public int getCols()
public int getRows()
public void setSize(int nrows,
int columns)
nrows - columns - public String getNDATA()
public void setNDATA(String nDATA)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||