|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.proj.Proj | +--com.bbn.openmap.proj.Azimuth | +--com.bbn.openmap.proj.Gnomonic
Implements the Gnomonic projection.
Nested Class Summary |
Nested classes inherited from class com.bbn.openmap.proj.Azimuth |
Azimuth.AzimuthVar |
Field Summary | |
protected float |
cosCtrLat
|
static float |
epsilon
|
static java.lang.String |
GnomonicName
The Gnomonic name. |
static int |
GnomonicType
The Gnomonic type of projection. |
static float |
HEMISPHERE_EDGE
|
static float |
hPrime
|
protected int |
hy
|
protected static float |
NORTH_BOUNDARY
|
protected float |
sinCtrLat
|
protected static float |
SOUTH_BOUNDARY
|
protected int |
wx
|
Fields inherited from class com.bbn.openmap.proj.Azimuth |
clockwise, spaceColor, world |
Fields inherited from class com.bbn.openmap.proj.Proj |
ctrLat, ctrLon, DATELINE, height, maxscale, mercator, MIN_HEIGHT, MIN_WIDTH, minscale, NORTH_POLE, NUM_DEFAULT_CIRCLE_VERTS, NUM_DEFAULT_GREAT_SEGS, pixelsPerMeter, planetPixelCircumference, planetPixelRadius, planetRadius, projID, scale, scaled_radius, SOUTH_POLE, type, width, XSCALE_THRESHOLD, XTHRESHOLD |
Constructor Summary | |
Gnomonic(LatLonPoint center,
float scale,
int width,
int height)
Construct a Mercator projection. |
Method Summary | |
protected java.awt.Point |
_forward(float phi,
float lambda,
java.awt.Point 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. |
void |
drawBackground(java.awt.Graphics2D g,
java.awt.Paint paint)
Draw the background for the projection. |
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(float phi1,
float lambda0,
float phi,
float lambda)
Check if a given lat/lon is within the visible hemisphere. |
static float |
hemisphere_distance(float phi1,
float lambda0,
float phi,
float lambda)
Get the distance c of the point from the center of the hemisphere. |
LatLonPoint |
inverse(int x,
int y,
LatLonPoint llp)
Inverse project x,y coordinates into a LatLonPoint. |
LatLonPoint |
inverse(java.awt.Point pt,
LatLonPoint llp)
Inverse project a Point. |
boolean |
isPlotable(float lat,
float lon)
Checks if a LatLonPoint is plot-able. |
float |
normalize_latitude(float 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, _panE, _panN, _panNE, _panNW, _panS, _panSE, _panSW, _panW, forward, forward, forward, forwardRaw, isClockwiseTraversal, overNorthPole, overPoint, overSouthPole, pan, setClockwiseTraversal |
Methods inherited from class com.bbn.openmap.proj.Proj |
clone, doPolyDispatch, equals, forward, forward, forwardArc, forwardArc, forwardArc, forwardCircle, forwardCircle, forwardCircle, forwardGreatPoly, forwardLine, forwardLine, forwardPoly, forwardPoly, forwardRaster, forwardRect, forwardRect, forwardRect, forwardRhumbPoly, getCenter, getHeight, getMaxScale, getMinScale, getPlanetPixelCircumference, getPlanetPixelRadius, getPlanetRadius, getPPM, getProjectionID, getProjectionType, getScale, getScale, getWidth, hashCode, inverse, inverse, isComplicatedLineType, isPlotable, makeClone, pan, panE, panE, panN, panN, panNE, panNE, panNW, panNW, panS, panS, panSE, panSE, panSW, panSW, panW, panW, setCenter, setCenter, setHeight, setMaxScale, setMinScale, setParms, setPlanetRadius, setPPM, setProjectionID, setScale, setWidth, wrap_longitude |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final transient java.lang.String GnomonicName
public static final transient int GnomonicType
protected int hy
protected int wx
protected float cosCtrLat
protected float sinCtrLat
public static final transient float epsilon
public static final transient float HEMISPHERE_EDGE
public static final transient float 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 computeParameters()
Each projection will decide how to respond to this change. For instance, they may need to recalculate "constant" paramters used in the forward() and inverse() calls.
computeParameters
in class Azimuth
public void drawBackground(java.awt.Graphics2D g, java.awt.Paint paint)
drawBackground
in class Azimuth
g
- Graphics2Dpaint
- java.awt.Paint to use for the backgroundpublic void drawBackground(java.awt.Graphics g)
drawBackground
in class Azimuth
public float normalize_latitude(float lat)
normalize_latitude
in class Proj
lat
- float latitude in radians
LatLonPoint.normalize_latitude(float)
public static final float hemisphere_distance(float phi1, float lambda0, float phi, float lambda)
phi1
- latitudelambda0
- longitudephi
- latitudelambda
- longitude
public static final boolean hemisphere_clip(float phi1, float lambda0, float phi, float lambda)
phi1
- latitudelambda0
- longitudephi
- latitudelambda
- longitude
public boolean isPlotable(float lat, float lon)
A point is plot-able if it is within the visible hemisphere.
lat
- float latitude in decimal degreeslon
- float longitude in decimal degrees
protected java.awt.Point _forward(float phi, float lambda, java.awt.Point p, Azimuth.AzimuthVar azVar)
_forward
in class Azimuth
phi
- float latitude in radianslambda
- float longitude in radiansp
- PointazVar
- AzimuthVar or null
public LatLonPoint inverse(int x, int y, LatLonPoint llp)
x
- integer x coordinatey
- integer y coordinatellp
- LatLonPoint
Proj.inverse(Point)
public LatLonPoint inverse(java.awt.Point pt, LatLonPoint llp)
pt
- x,y Pointllp
- resulting LatLonPoint
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.
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.
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 |