|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.space.RasterSpace
public class RasterSpace
A class that represents a raster image as a space. This is designed to be
used in conjunction with a GIS system such as ESRI ArcGis or GRASS.
The raster image is treated as a continuous system of coordinates with
cells that hold values underlying. Much of the code for reading the
ESRI ASCII Raster format is based on code by Ian Turton Centre for Computational
Geography University of Leeds, LS2 9Jt, 1998.
i.turton@geog.leeds.ac.uk, as
included in GeoTools, an open
source gis visualization framework.
| Field Summary |
|---|
| Fields inherited from interface uchicago.src.sim.space.Discrete2DSpace |
|---|
MOORE, VON_NEUMANN |
| Constructor Summary | |
|---|---|
RasterSpace(double left,
double bottom,
double right,
double top,
double cellSize,
int w,
int h)
Constructs an empty RasterSpace. |
|
RasterSpace(double top,
double left,
double cellSize,
int w,
int h)
Constructs an empty RasterSpace. |
|
RasterSpace(java.io.InputStream stream)
Creates a RasterSpace from an ESRI ASCII Raster file connected to the specified input stream. |
|
RasterSpace(java.lang.String name)
Creates a RasterSpace from an ESRI ASCII Raster file. |
|
| Method Summary | |
|---|---|
int |
getCellCol(double x)
|
int |
getCellRow(double y)
|
double |
getCellSize()
|
BaseMatrix |
getMatrix()
Gets the matrix collection class that contains all the values |
java.lang.Object |
getObjectAt(double x,
double y)
Return the object at a coordinate point. |
java.lang.Object |
getObjectAt(int x,
int y)
Return the object at an integer point. |
double |
getOriginX()
|
double |
getOriginY()
|
java.awt.Dimension |
getSize()
Gets the dimension of the space |
int |
getSizeX()
Gets the size of the x dimension |
int |
getSizeY()
Gets the size of the y dimension |
double |
getTermX()
|
double |
getTermY()
|
double |
getValueAt(double x,
double y)
Get the value at a coordinate point. |
double |
getValueAt(int x,
int y)
Get the value at an integer point. |
boolean |
onSurface(double x,
double y)
Determines if a set of coordinates is on the raster. |
void |
putObjectAt(double x,
double y,
java.lang.Object object)
Put an object at a coordinate point. |
void |
putObjectAt(int x,
int y,
java.lang.Object object)
Put an object at an integer point. |
void |
putValueAt(double x,
double y,
double value)
Put a value at a coordinate point. |
void |
putValueAt(int x,
int y,
double value)
Put a value at an integer point. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RasterSpace(double top,
double left,
double cellSize,
int w,
int h)
top - The uppermost y coordinateleft - The leftmost x coordinatecellSize - The size of a raster cellh - The height of the spacew - The width of the space
public RasterSpace(double left,
double bottom,
double right,
double top,
double cellSize,
int w,
int h)
left - The westernmost x coordinatebottom - The southernmost y coordinateright - The easternmost x coordinatetop - The northernmost y coordinatecellSize - The size of the raster cell
public RasterSpace(java.lang.String name)
throws java.io.IOException
name - The name of the ESRI ASCII raster file.
java.io.IOException - if there is a problem reading the file
public RasterSpace(java.io.InputStream stream)
throws java.io.IOException
stream - The input stream for the raster file of the ESRI
ASCII raster file.
java.io.IOException - if there is a problem reading from the
stream| Method Detail |
|---|
public final boolean onSurface(double x,
double y)
public final int getCellRow(double y)
public final int getCellCol(double x)
public BaseMatrix getMatrix()
Discrete2DSpace
getMatrix in interface Discrete2DSpacepublic double getOriginX()
public double getOriginY()
public double getTermX()
public double getTermY()
public java.lang.Object getObjectAt(int x,
int y)
getObjectAt in interface Discrete2DSpacex - The columny - The Row
public java.lang.Object getObjectAt(double x,
double y)
x - The x coordinatey - The y cooredinatepublic java.awt.Dimension getSize()
Discrete2DSpace
getSize in interface Discrete2DSpacepublic int getSizeX()
Discrete2DSpace
getSizeX in interface Discrete2DSpacepublic int getSizeY()
Discrete2DSpace
getSizeY in interface Discrete2DSpace
public double getValueAt(int x,
int y)
getValueAt in interface Discrete2DSpacex - The columny - The row
public double getValueAt(double x,
double y)
x - The x coordinatey - The y coordinate
public void putObjectAt(int x,
int y,
java.lang.Object object)
putObjectAt in interface Discrete2DSpacex - The columny - The rowobject - the object to put
public void putObjectAt(double x,
double y,
java.lang.Object object)
x - The x coordinatey - The y coordinate
public void putValueAt(int x,
int y,
double value)
putValueAt in interface Discrete2DSpacex - The columny - The rowvalue - the value to put at x,y
public void putValueAt(double x,
double y,
double value)
x - The x coordinatey - The y coordinatepublic double getCellSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||