org.geotools.gce.arcgrid
Class GRASSArcGridRaster

java.lang.Object
  extended byorg.geotools.gce.arcgrid.ArcGridRaster
      extended byorg.geotools.gce.arcgrid.GRASSArcGridRaster

public class GRASSArcGridRaster
extends ArcGridRaster

ArcGridRaster sub-instance that handles the "ArcGrid" format that GRASS outputs (a variation of the original format...)

Author:
aaime, Simone Giannecchini (simboss)

Field Summary
static java.lang.String COLS
          Column number tag in the header file
static java.lang.String EAST
          y corner coordinate tag in the header file
static java.lang.String NO_DATA_MARKER
           
static java.lang.String NORTH
          x corner coordinate tag in the header file
static java.lang.String ROWS
          Row number tag in the header file
static java.lang.String SOUTH
          y corner coordinate tag in the header file
static java.lang.String WEST
          y corner coordinate tag in the header file
 
Fields inherited from class org.geotools.gce.arcgrid.ArcGridRaster
cellSize, CELLSIZE, maxValue, minValue, nCols, NCOLS, noData, NODATA_VALUE, nRows, NROWS, xllCorner, XLLCORNER, yllCorner, YLLCORNER
 
Constructor Summary
GRASSArcGridRaster(java.io.PrintWriter writer)
           
GRASSArcGridRaster(java.io.Reader reader, boolean compress)
           
GRASSArcGridRaster(java.net.URL srcURL)
          Creates a new instance of ArcGridRaster
 
Method Summary
protected  void parseHeader(java.io.StreamTokenizer st)
          Parse the header of an ascii grid file.
 java.awt.image.WritableRaster readRaster()
          Returns the WritableRaster of the raster
 void writeRaster(java.awt.image.Raster raster, double xl, double yl, double cellsize, boolean compress)
          Write out the given raster.
 
Methods inherited from class org.geotools.gce.arcgrid.ArcGridRaster
getCellSize, getMaxValue, getMinValue, getNCols, getNoData, getNRows, getXlCorner, getYlCorner, openReader, openWriter, parseHeader, readHeaderDouble, spaces, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COLS

public static final java.lang.String COLS
Column number tag in the header file

See Also:
Constant Field Values

ROWS

public static final java.lang.String ROWS
Row number tag in the header file

See Also:
Constant Field Values

NORTH

public static final java.lang.String NORTH
x corner coordinate tag in the header file

See Also:
Constant Field Values

SOUTH

public static final java.lang.String SOUTH
y corner coordinate tag in the header file

See Also:
Constant Field Values

EAST

public static final java.lang.String EAST
y corner coordinate tag in the header file

See Also:
Constant Field Values

WEST

public static final java.lang.String WEST
y corner coordinate tag in the header file

See Also:
Constant Field Values

NO_DATA_MARKER

public static final java.lang.String NO_DATA_MARKER
See Also:
Constant Field Values
Constructor Detail

GRASSArcGridRaster

public GRASSArcGridRaster(java.net.URL srcURL)
                   throws java.io.IOException
Creates a new instance of ArcGridRaster

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

GRASSArcGridRaster

public GRASSArcGridRaster(java.io.Reader reader,
                          boolean compress)
                   throws java.io.IOException

GRASSArcGridRaster

public GRASSArcGridRaster(java.io.PrintWriter writer)
                   throws java.io.IOException
Method Detail

parseHeader

protected void parseHeader(java.io.StreamTokenizer st)
                    throws java.io.IOException
Description copied from class: ArcGridRaster
Parse the header of an ascii grid file.

Overrides:
parseHeader in class ArcGridRaster
Parameters:
st - StringTokenizer to be used to parse this header.
Throws:
java.io.IOException

readRaster

public java.awt.image.WritableRaster readRaster()
                                         throws java.io.IOException
Returns the WritableRaster of the raster

Overrides:
readRaster in class ArcGridRaster
Returns:
RenderedImage
Throws:
java.io.IOException - DOCUMENT ME!

writeRaster

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

Overrides:
writeRaster in class ArcGridRaster
Parameters:
raster - DOCUMENT ME!
xl - DOCUMENT ME!
yl - DOCUMENT ME!
cellsize - DOCUMENT ME!
compress - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!


Copyright © GeoTools. All Rights Reserved.