gtmig.org.geotools.gce.arcgrid
Class ArcGridRaster

java.lang.Object
  extended by gtmig.org.geotools.gce.arcgrid.ArcGridRaster

Deprecated. 
Class user for parsing an ArcGrid header (.arc, .asc) file.

public class ArcGridRaster
extends Object

Martin Schmitz (2009-09-02):
This class is taken 1:1 from gt2-2.3.0-M0 because of the following reasons:

Nevertheless we will try to avoid this class... but later.

Author:
Christiaan ten Klooster, Andrea Aime, Simone Giannecchini (simboss)

Field Summary
protected  double cellSize
          Deprecated.  
static String CELLSIZE
          Deprecated. cell size tag in the header file
protected  double maxValue
          Deprecated. max value found in the file
protected  double minValue
          Deprecated. min value found in the file
protected  int nCols
          Deprecated.  
static String NCOLS
          Deprecated. Column number tag in the header file
protected  double noData
          Deprecated.  
static String NODATA_VALUE
          Deprecated. no data tag in the header file
protected  int nRows
          Deprecated.  
static String NROWS
          Deprecated. Row number tag in the header file
protected  double xllCorner
          Deprecated.  
static String XLLCORNER
          Deprecated. x corner coordinate tag in the header file
protected  double yllCorner
          Deprecated.  
static String YLLCORNER
          Deprecated. y corner coordinate tag in the header file
 
Constructor Summary
ArcGridRaster(PrintWriter writer)
          Deprecated. Creates a new instance of ArcGridRaster.
ArcGridRaster(Reader reader, boolean compress)
          Deprecated. Creates a new instance of ArcGridRaster.
ArcGridRaster(URL srcURL)
          Deprecated. Creates a new instance of ArcGridRaster.
 
Method Summary
 double getCellSize()
          Deprecated. Returns the cell size.
 double getMaxValue()
          Deprecated. Max value.
 double getMinValue()
          Deprecated. Min value.
 int getNCols()
          Deprecated. Returns the number of columns contained in the file.
 double getNoData()
          Deprecated. Returns the no data (null) value.
 int getNRows()
          Deprecated. Returns the number of rows contained in the file.
 double getXlCorner()
          Deprecated. Returns the x cordinate of the lower left corner.
 double getYlCorner()
          Deprecated. Returns the y cordinate of the lower left corner.
protected  Reader openReader()
          Deprecated. Obtain the best reader for the situation
protected  PrintWriter openWriter(boolean compress)
          Deprecated. Open the best writer for the situation.
 void parseHeader()
          Deprecated. Parses the reader for the known properties.
protected  void parseHeader(StreamTokenizer st)
          Deprecated. Parse the header of an ascii grid file.
protected  double readHeaderDouble(StreamTokenizer st)
          Deprecated.  
 WritableRaster readRaster()
          Deprecated. Returns the WritableRaster of the raster.
protected  void spaces(PrintWriter p, int n)
          Deprecated. Print n spaces to the PrintWriter
 String toString()
          Deprecated.  
 void writeRaster(Raster raster, double xl, double yl, double cellsize, boolean compress)
          Deprecated. Write out the given raster..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NCOLS

public static final String NCOLS
Deprecated. 
Column number tag in the header file

See Also:
Constant Field Values

NROWS

public static final String NROWS
Deprecated. 
Row number tag in the header file

See Also:
Constant Field Values

XLLCORNER

public static final String XLLCORNER
Deprecated. 
x corner coordinate tag in the header file

See Also:
Constant Field Values

YLLCORNER

public static final String YLLCORNER
Deprecated. 
y corner coordinate tag in the header file

See Also:
Constant Field Values

CELLSIZE

public static final String CELLSIZE
Deprecated. 
cell size tag in the header file

See Also:
Constant Field Values

NODATA_VALUE

public static final String NODATA_VALUE
Deprecated. 
no data tag in the header file

See Also:
Constant Field Values

maxValue

protected double maxValue
Deprecated. 
max value found in the file


minValue

protected double minValue
Deprecated. 
min value found in the file


xllCorner

protected double xllCorner
Deprecated. 

yllCorner

protected double yllCorner
Deprecated. 

cellSize

protected double cellSize
Deprecated. 

noData

protected double noData
Deprecated. 

nCols

protected int nCols
Deprecated. 

nRows

protected int nRows
Deprecated. 
Constructor Detail

ArcGridRaster

public ArcGridRaster(URL srcURL)
Deprecated. 
Creates a new instance of ArcGridRaster.

Parameters:
srcURL - URL of a ArcGridRaster.
Throws:
IOException - DOCUMENT ME!

ArcGridRaster

public ArcGridRaster(Reader reader,
                     boolean compress)
Deprecated. 
Creates a new instance of ArcGridRaster. Used Exclusively by ArcGridReader.

Parameters:
reader - reader to be used for reading the Raster.
compress - DOCUMENT ME!
Throws:
IOException - DOCUMENT ME!

ArcGridRaster

public ArcGridRaster(PrintWriter writer)
Deprecated. 
Creates a new instance of ArcGridRaster. Used Exclusively by ArcGridWriter.

Parameters:
writer - writer to be used for writing the Raster.
Throws:
IOException - DOCUMENT ME!
Method Detail

getMaxValue

public double getMaxValue()
Deprecated. 
Max value.

Returns:
the max value contained in the data file

getMinValue

public final double getMinValue()
Deprecated. 
Min value.

Returns:
the min value contained in the data file

getNRows

public final int getNRows()
Deprecated. 
Returns the number of rows contained in the file.

Returns:
number of rows

getNCols

public final int getNCols()
Deprecated. 
Returns the number of columns contained in the file.

Returns:
number of columns

getXlCorner

public final double getXlCorner()
Deprecated. 
Returns the x cordinate of the lower left corner.

Returns:
x cordinate of the lower left corner.

getYlCorner

public final double getYlCorner()
Deprecated. 
Returns the y cordinate of the lower left corner.

Returns:
y cordinate of the lower left corner.

getCellSize

public final double getCellSize()
Deprecated. 
Returns the cell size.

Returns:
cell size

getNoData

public final double getNoData()
Deprecated. 
Returns the no data (null) value.

Returns:
no data (null) value.

parseHeader

public final void parseHeader()
                       throws IOException
Deprecated. 
Parses the reader for the known properties.

Throws:
IOException - for reading errors

parseHeader

protected void parseHeader(StreamTokenizer st)
                    throws IOException
Deprecated. 
Parse the header of an ascii grid file.

Parameters:
st - StringTokenizer to be used to parse this header.
Throws:
IOException

readHeaderDouble

protected double readHeaderDouble(StreamTokenizer st)
                           throws IOException
Deprecated. 
Throws:
IOException

openReader

protected Reader openReader()
                     throws IOException
Deprecated. 
Obtain the best reader for the situation

Returns:
A reader to read this file.
Throws:
IOException - DOCUMENT ME!

openWriter

protected PrintWriter openWriter(boolean compress)
                          throws IOException
Deprecated. 
Open the best writer for the situation.

Parameters:
compress - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
IOException - DOCUMENT ME!

readRaster

public WritableRaster readRaster()
                          throws IOException
Deprecated. 
Returns the WritableRaster of the raster. This method first parses the header then reads all the data.

Returns:
RenderedImage
Throws:
IOException - DOCUMENT ME!

spaces

protected void spaces(PrintWriter p,
                      int n)
Deprecated. 
Print n spaces to the PrintWriter

Parameters:
p - DOCUMENT ME!
n - DOCUMENT ME!

writeRaster

public void writeRaster(Raster raster,
                        double xl,
                        double yl,
                        double cellsize,
                        boolean compress)
                 throws IOException
Deprecated. 
Write out the given raster..

Parameters:
raster - DOCUMENT ME!
xl - DOCUMENT ME!
yl - DOCUMENT ME!
cellsize - DOCUMENT ME!
compress - DOCUMENT ME!
Throws:
IOException - DOCUMENT ME!

toString

public String toString()
Deprecated. 
Overrides:
toString in class Object