|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bbn.openmap.proj.Proj
com.bbn.openmap.proj.GeoProj
com.bbn.openmap.proj.Azimuth
com.bbn.openmap.proj.Gnomonic
public class Gnomonic
Implements the Gnomonic projection.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.bbn.openmap.proj.Azimuth |
---|
Azimuth.AzimuthVar |
Field Summary | |
---|---|
protected double |
cosCtrLat
|
static double |
epsilon
|
static java.lang.String |
GnomonicName
The Gnomonic name. |
static double |
HEMISPHERE_EDGE
|
static double |
hPrime
|
protected double |
hy
|
protected static float |
NORTH_BOUNDARY
|
protected double |
sinCtrLat
|
protected static float |
SOUTH_BOUNDARY
|
protected double |
wx
|
Fields inherited from class com.bbn.openmap.proj.Azimuth |
---|
clockwise, spaceColor, world |
Fields inherited from class com.bbn.openmap.proj.GeoProj |
---|
DATELINE, mercator, NORTH_POLE, NUM_DEFAULT_CIRCLE_VERTS, NUM_DEFAULT_GREAT_SEGS, pixelsPerMeter, planetPixelCircumference, planetPixelRadius, planetRadius, scaled_radius, SOUTH_POLE, XSCALE_THRESHOLD, XTHRESHOLD |
Fields inherited from class com.bbn.openmap.proj.Proj |
---|
centerX, centerY, height, maxscale, MIN_HEIGHT, MIN_WIDTH, minscale, projID, rotationAngle, scale, ucuom, width |
Constructor Summary | |
---|---|
Gnomonic(LatLonPoint center,
float scale,
int width,
int height)
Construct a Mercator projection. |
Method Summary | ||
---|---|---|
protected java.awt.geom.Point2D |
_forward(double phi,
double lambda,
java.awt.geom.Point2D p,
Azimuth.AzimuthVar azVar)
Forward project a point. |
|
protected java.awt.geom.Point2D |
_forward(float phi,
float lambda,
java.awt.geom.Point2D p,
Azimuth.AzimuthVar azVar)
Forward project a point. |
|
protected void |
computeParameters()
Called when some fundamental parameters change. |
|
void |
drawBackground(java.awt.Graphics g)
Assume that the Graphics has been set with the Paint/Color needed, just render the shape of the background. |
|
LatLonPoint |
getLowerRight()
Get the lower right (southeast) point of the projection. |
|
java.lang.String |
getName()
Get the name string of the projection. |
|
LatLonPoint |
getUpperLeft()
Get the upper left (northernmost and westernmost) point of the projection. |
|
static boolean |
hemisphere_clip(double phi1,
double lambda0,
double phi,
double lambda)
|
|
static boolean |
hemisphere_clip(float phi1,
float lambda0,
float phi,
float lambda)
Check if a given lat/lon is within the visible hemisphere. |
|
static double |
hemisphere_distance(double phi1,
double lambda0,
double phi,
double lambda)
|
|
protected void |
init()
Called after the center and scale is set in setParams, but before the scale is checked for legitimacy. |
|
|
inverse(double x,
double y,
T llp)
Inverse project x,y coordinates into a LatLonPoint. |
|
boolean |
isPlotable(double lat,
double lon)
Checks if a LatLonPoint is plot-able. |
|
double |
normalizeLatitude(double lat)
Sets radian latitude to something sane. |
|
boolean |
overEquator()
Check if equator is visible on screen. |
|
java.lang.String |
toString()
Return stringified description of this projection. |
Methods inherited from class com.bbn.openmap.proj.Azimuth |
---|
_forwardPoly, _forwardPoly, _panE, _panN, _panNE, _panNW, _panS, _panSE, _panSW, _panW, forward, forwardRaw, forwardRaw, getSpaceColor, isClockwiseTraversal, overNorthPole, overPoint, overSouthPole, pan, setClockwiseTraversal, setSpaceColor |
Methods inherited from class com.bbn.openmap.proj.Proj |
---|
drawBackground, equals, forward, forward, forward, forwardLine, forwardPoly, forwardPoly, forwardRect, forwardShape, getHeight, getMaxScale, getMinScale, getProjectionID, getRotationAngle, getScale, getWidth, hashCode, inverse, inverseShape, makeClone, panE, panE, panN, panN, panNE, panNE, panNW, panNW, panS, panS, panSE, panSE, panSW, panSW, panW, panW, setCenter, setHeight, setMaxScale, setMinScale, setParms, setProjectionID, setRotationAngle, setScale, setWidth |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final transient java.lang.String GnomonicName
protected double hy
protected double wx
protected double cosCtrLat
protected double sinCtrLat
public static final transient double epsilon
public static final transient double HEMISPHERE_EDGE
public static final transient double hPrime
protected static final float NORTH_BOUNDARY
protected static final float SOUTH_BOUNDARY
Constructor Detail |
---|
public Gnomonic(LatLonPoint center, float scale, int width, int height)
center
- LatLonPoint center of projectionscale
- float scale of projectionwidth
- width of screenheight
- height of screenMethod Detail |
---|
public java.lang.String toString()
toString
in class Azimuth
Projection.getProjectionID()
protected void init()
Proj
Make sure you call super.init() if you override this method.
init
in class Azimuth
protected void computeParameters()
Each projection will decide how to respond to this change. For instance, they may need to recalculate "constant" parameters used in the forward() and inverse() calls.
computeParameters
in class Azimuth
public void drawBackground(java.awt.Graphics g)
drawBackground
in class Azimuth
g
- Graphicspublic double normalizeLatitude(double lat)
normalizeLatitude
in class GeoProj
lat
- float latitude in radians
public static final double hemisphere_distance(double phi1, double lambda0, double phi, double lambda)
public static final boolean hemisphere_clip(float phi1, float lambda0, float phi, float lambda)
phi1
- latitudelambda0
- longitudephi
- latitudelambda
- longitude
public static final boolean hemisphere_clip(double phi1, double lambda0, double phi, double lambda)
public boolean isPlotable(double lat, double lon)
A point is plot-able if it is within the visible hemisphere.
isPlotable
in interface Projection
isPlotable
in class Proj
lat
- float latitude in decimal degreeslon
- float longitude in decimal degrees
protected java.awt.geom.Point2D _forward(float phi, float lambda, java.awt.geom.Point2D p, Azimuth.AzimuthVar azVar)
phi
- float latitude in radianslambda
- float longitude in radiansp
- Point2DazVar
- AzimuthVar or null
protected java.awt.geom.Point2D _forward(double phi, double lambda, java.awt.geom.Point2D p, Azimuth.AzimuthVar azVar)
_forward
in class Azimuth
phi
- double latitude in radianslambda
- double longitude in radiansp
- Point2DazVar
- AzimuthVar or null
public <T extends java.awt.geom.Point2D> T inverse(double x, double y, T llp)
inverse
in interface Projection
inverse
in class Proj
x
- integer x coordinatey
- integer y coordinatellp
- LatLonPoint
Proj.inverse(Point2D)
public boolean overEquator()
public LatLonPoint getUpperLeft()
Returns the upper left point (or closest equivalent) of the projection based on the center point and height and width of screen.
getUpperLeft
in interface Projection
getUpperLeft
in class Proj
public LatLonPoint getLowerRight()
Returns the lower right point (or closest equivalent) of the projection based on the center point and height and width of screen.
This is trivial for most cylindrical projections, but much more complicated for azimuthal projections.
getLowerRight
in interface Projection
getLowerRight
in class Proj
public java.lang.String getName()
getName
in interface Projection
getName
in class Azimuth
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |