|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--auc.geom.Grid2D
The grid structure. Use this class to generate the list points in the grid within a field.
| Field Summary | |
protected Vector2D |
cellLat
Latitude size and direction ("horizontal") of the grid cell. |
protected Vector2D |
cellLong
Longitude size and direction ("vertical") of the grid cell. |
protected Vector2D |
gridZero
The grid zero point is the Descartes coordinates of (0,0) point in the grid. |
| Constructor Summary | |
Grid2D(Vector2D zero,
Vector2D cellLatitude,
Vector2D cellLongitude)
Constructs the initial (complete and infinite) grid. |
|
| Method Summary | |
Vector2D |
crosses(Segment segment)
Special method for the evaluator to calculate how many columns and rows of the (crop) grid the route segment crosses. |
Vector2D[][] |
getArray(Polygon2D poly)
|
Vector2D |
getCellLat()
|
Vector2D |
getCellLong()
|
Vector2D |
getPoint(int latitude,
int longitude)
|
java.util.Vector |
getPoints(Polygon2D boundary)
Generates a list of points in the grid of given parameters. |
Vector2D |
getZeroPoint()
Gets the grid zero point vector for the grid member [0,0] |
void |
setCellLat(Vector2D cLat)
Sets the latitude size and direction ("horizontal") vector for the grid cell |
void |
setCellLong(Vector2D cLong)
Sets the longitude size and direction ("vertical") vector for the grid cell |
void |
setZeroPoint(Vector2D zero)
Sets the grid zero point vector for the grid member [0,0] |
Vector2D |
toGridCoord(Vector2D descCoord)
Method transforms the grid coordinates to the Descartes coordinates. |
Vector2D |
toRealCoord(Vector2D gridCoord)
Method transforms the grid coordinates to the Descartes coordinates. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Vector2D gridZero
protected Vector2D cellLat
protected Vector2D cellLong
| Constructor Detail |
public Grid2D(Vector2D zero,
Vector2D cellLatitude,
Vector2D cellLongitude)
| Method Detail |
public void setCellLat(Vector2D cLat)
cLat - the latitude vector for the grid cell dimention (Descartes coordinates).public Vector2D getCellLat()
public void setCellLong(Vector2D cLong)
cLong - the longitude vector for the grid cell dimention (Descartes coordinates).public Vector2D getCellLong()
public void setZeroPoint(Vector2D zero)
zero - the vector for the grid starting point (Descartes coordinates).gridZeropublic Vector2D getZeroPoint()
gridZeropublic Vector2D toGridCoord(Vector2D descCoord)
descCoord - the Descartes coordinates (from real world).public Vector2D toRealCoord(Vector2D gridCoord)
gridCoord - the coordinates which tell the point position in grid.public java.util.Vector getPoints(Polygon2D boundary)
start - The starting point of the grid. It always belongs to the grid unless it is outside the field.horiz - The horizontal (relatively) vector of the grid. The length means the width of grid cellvert - The vertical (relatively) vector of the grid. The length means height of grid cell.public Vector2D[][] getArray(Polygon2D poly)
public Vector2D getPoint(int latitude,
int longitude)
public Vector2D crosses(Segment segment)
segment - route segment must have at least two points!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||