|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.gce.arcgrid.ArcGridRaster
Class user for parsing an ArcGrid header (.arc, .asc) file.
Field Summary | |
protected double |
cellSize
|
static java.lang.String |
CELLSIZE
cell size tag in the header file |
protected double |
maxValue
max value found in the file |
protected double |
minValue
min value found in the file |
protected int |
nCols
|
static java.lang.String |
NCOLS
Column number tag in the header file |
protected double |
noData
|
static java.lang.String |
NODATA_VALUE
no data tag in the header file |
protected int |
nRows
|
static java.lang.String |
NROWS
Row number tag in the header file |
protected double |
xllCorner
|
static java.lang.String |
XLLCORNER
x corner coordinate tag in the header file |
protected double |
yllCorner
|
static java.lang.String |
YLLCORNER
y corner coordinate tag in the header file |
Constructor Summary | |
ArcGridRaster(java.io.PrintWriter writer)
Creates a new instance of ArcGridRaster. |
|
ArcGridRaster(java.io.Reader reader,
boolean compress)
Creates a new instance of ArcGridRaster. |
|
ArcGridRaster(java.net.URL srcURL)
Creates a new instance of ArcGridRaster. |
Method Summary | |
double |
getCellSize()
Returns the cell size. |
double |
getMaxValue()
Max value. |
double |
getMinValue()
Min value. |
int |
getNCols()
Returns the number of columns contained in the file. |
double |
getNoData()
Returns the no data (null) value. |
int |
getNRows()
Returns the number of rows contained in the file. |
double |
getXlCorner()
Returns the x cordinate of the lower left corner. |
double |
getYlCorner()
Returns the y cordinate of the lower left corner. |
protected java.io.Reader |
openReader()
Obtain the best reader for the situation |
protected java.io.PrintWriter |
openWriter(boolean compress)
Open the best writer for the situation. |
void |
parseHeader()
Parses the reader for the known properties. |
protected void |
parseHeader(java.io.StreamTokenizer st)
Parse the header of an ascii grid file. |
protected double |
readHeaderDouble(java.io.StreamTokenizer st)
|
java.awt.image.WritableRaster |
readRaster()
Returns the WritableRaster of the raster. |
protected void |
spaces(java.io.PrintWriter p,
int n)
Print n spaces to the PrintWriter |
java.lang.String |
toString()
|
void |
writeRaster(java.awt.image.Raster raster,
double xl,
double yl,
double cellsize,
boolean compress)
Write out the given raster.. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String NCOLS
public static final java.lang.String NROWS
public static final java.lang.String XLLCORNER
public static final java.lang.String YLLCORNER
public static final java.lang.String CELLSIZE
public static final java.lang.String NODATA_VALUE
protected double maxValue
protected double minValue
protected double xllCorner
protected double yllCorner
protected double cellSize
protected double noData
protected int nCols
protected int nRows
Constructor Detail |
public ArcGridRaster(java.net.URL srcURL)
srcURL
- URL of a ArcGridRaster.
java.io.IOException
- DOCUMENT ME!public ArcGridRaster(java.io.Reader reader, boolean compress)
reader
- reader to be used for reading the Raster.compress
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!public ArcGridRaster(java.io.PrintWriter writer)
writer
- writer to be used for writing the Raster.
java.io.IOException
- DOCUMENT ME!Method Detail |
public double getMaxValue()
public double getMinValue()
public int getNRows()
public int getNCols()
public double getXlCorner()
public double getYlCorner()
public double getCellSize()
public double getNoData()
public void parseHeader() throws java.io.IOException
java.io.IOException
- for reading errorsprotected void parseHeader(java.io.StreamTokenizer st) throws java.io.IOException
st
- StringTokenizer to be used to parse this header.
java.io.IOException
protected double readHeaderDouble(java.io.StreamTokenizer st) throws java.io.IOException
java.io.IOException
protected java.io.Reader openReader() throws java.io.IOException
java.io.IOException
- DOCUMENT ME!protected java.io.PrintWriter openWriter(boolean compress) throws java.io.IOException
compress
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!public java.awt.image.WritableRaster readRaster() throws java.io.IOException
java.io.IOException
- DOCUMENT ME!protected void spaces(java.io.PrintWriter p, int n)
p
- DOCUMENT ME!n
- DOCUMENT ME!public void writeRaster(java.awt.image.Raster raster, double xl, double yl, double cellsize, boolean compress) throws java.io.IOException
raster
- DOCUMENT ME!xl
- DOCUMENT ME!yl
- DOCUMENT ME!cellsize
- DOCUMENT ME!compress
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |