|
Jeospace API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jeospace.projection.Equirectangular
A simple Cylindrical Equidistant Projection of the world. This class provides utility methods for translating geographic coordinates to 2D points in the projection area and vice versa. This Equirectangular Projection differs slightly from the standard projection model in that it maps the 2D ( x, y ) points to a typical computer oriented two-dimensional projection coordinate system with the origin (0,0) at the top left corner and with ( x, y ) values increasing to the right and downward respectively.
prime meridian
(0 degrees longitude)
( x=0, y=0 ) ^
o-------------------|-------------------|
| | |
| | |
| | |
| | | equator
|-------------------|-------------------| > (0 degrees latitude)
| | |
| | |
| | |
| | |
|-------------------|-------------------o
( x=width, y=height )
| Constructor Summary | |
Equirectangular(int width,
int height)
Constructor |
|
| Method Summary | |
int[][] |
createLineIndices(Ellipsoidal[] coordinate,
int points_per_revolution_hint)
Create 2D line segment points for the given set of coordinates. |
int[][] |
createPolyIndices(Ellipsoidal[] coordinate,
boolean top)
Create polygon indices for the given set of coordinates. |
int |
getHeight()
Return the vertical (latitude) dimension of the projection. |
int |
getWidth()
Return the horizontal (longitude) dimension of the projection. |
Spherical |
toCoordinate(int x,
int y)
Translate the argument 2D point into a 2 dimensional geographic coordinate corresponding to the point location on the projection. |
int[] |
toPoint(Polar p)
Translate the coordinate to a point in the projection. |
int |
toPoint(Polar p,
int[] val,
int index)
Translate the coordinate to a point in the projection and append it to the argument array at the specified index. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Equirectangular(int width,
int height)
width - The total span in points along the horizontal
(longitude) dimension of the projection.height - The total span in points along the vertical
(latitude) dimension of the projection.| Method Detail |
public int getWidth()
public int getHeight()
public int[] toPoint(Polar p)
p - The coordinate to translate to a point in the
projection.
public int toPoint(Polar p,
int[] val,
int index)
p - The coordinate to translate to a point in the
projection.val - An array for appending the translated pointindex - The index within the array for the first (x)
coordinate to be appended.
public Spherical toCoordinate(int x,
int y)
x - The x or horizontal dimension in the projection.y - The y or vertical dimension in the projection.
public int[][] createLineIndices(Ellipsoidal[] coordinate,
int points_per_revolution_hint)
coordinate - An array of the sequence of Polar coordinates that defines
the line to be drawn.points_per_revolution_hint - A hint to the point generator
describing how many coordinates will constitute a single line segment.
public int[][] createPolyIndices(Ellipsoidal[] coordinate,
boolean top)
coordinate - An array of the sequence of Polar coordinates that defines
the line to be drawn.top - Flag indicating which horizontal edge of the projection should be
used to complete the polygon in the case that it extends over a polar region
|
Jeospace API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||