|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sim.field.geo.GeomField sim.field.geo.GeomGridField
public class GeomGridField
A georeferenced area represented by a grid The associated GeomField.MBR defines the area the grid maps to.
Nested Class Summary | |
---|---|
static class |
GeomGridField.GridDataType
Used to determine the GeomGridField storage type. |
Field Summary |
---|
Fields inherited from class sim.field.geo.GeomField |
---|
drawX, drawY, fieldHeight, fieldWidth, MBR |
Constructor Summary | |
---|---|
GeomGridField()
|
|
GeomGridField(sim.field.grid.Grid2D wrappedGrid)
|
Method Summary | |
---|---|
void |
clear()
delete contents |
sim.field.grid.Grid2D |
getGrid()
|
GeomGridField.GridDataType |
getGridDataType()
|
int |
getGridHeight()
By contrast, super.getHeight() returns width in spatial reference context. |
int |
getGridWidth()
Returns width of grid in pixels. |
double |
getPixelHeight()
Height of pixels in units of the underlying coordinate reference system |
double |
getPixelWidth()
Width of pixels in units of the underlying coordinate reference system |
boolean |
isInGrid(int x,
int y)
|
void |
setGrid(sim.field.grid.Grid2D newGrid)
|
void |
setMBR(com.vividsolutions.jts.geom.Envelope MBR)
Set the MBR |
void |
setPixelHeight(double pixelHeight)
Set heigh of pixels in units of the underlying coordinate reference system |
void |
setPixelWidth(double pixelWidth)
Set pixel width in units of underlying coordinate reference system |
com.vividsolutions.jts.geom.Point |
toPoint(int x,
int y)
Return a Point corresponding to center of grid cell |
com.vividsolutions.jts.geom.Polygon |
toPolygon(int x,
int y)
Return a Polygon corresponding to the grid cell perimeter |
int |
toXCoord(double x)
|
int |
toXCoord(com.vividsolutions.jts.geom.Point p)
|
int |
toYCoord(double y)
|
int |
toYCoord(com.vividsolutions.jts.geom.Point p)
|
Methods inherited from class sim.field.geo.GeomField |
---|
getFieldHeight, getFieldWidth, getHeight, getMBR, getWidth, setFieldHeight, setFieldWidth |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeomGridField()
public GeomGridField(sim.field.grid.Grid2D wrappedGrid)
Method Detail |
---|
public GeomGridField.GridDataType getGridDataType()
public double getPixelHeight()
public void setPixelHeight(double pixelHeight)
public double getPixelWidth()
public void setPixelWidth(double pixelWidth)
public final sim.field.grid.Grid2D getGrid()
public final void setGrid(sim.field.grid.Grid2D newGrid)
public final int getGridWidth()
By contrast, super.getWidth() returns width in spatial reference context.
java.lang.NullPointerException
- if grid not assignedpublic final int getGridHeight()
java.lang.NullPointerException
- if grid not assignedpublic void clear()
GeomField
clear
in class GeomField
public void setMBR(com.vividsolutions.jts.geom.Envelope MBR)
GeomField
setMBR
in class GeomField
public boolean isInGrid(int x, int y)
public int toXCoord(com.vividsolutions.jts.geom.Point p)
p
- point
public int toXCoord(double x)
x
- Coordinate in base projection
public int toYCoord(com.vividsolutions.jts.geom.Point p)
p
- point
public int toYCoord(double y)
y
- coordinate in base projection
public com.vividsolutions.jts.geom.Point toPoint(int x, int y)
x
- in pixel coordinatesy
- in pixel coordinates
public com.vividsolutions.jts.geom.Polygon toPolygon(int x, int y)
x
- in pixel coordinatesy
- in pixel coordinates
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |