public class Gnomonic extends Azimuth
Azimuth.AzimuthVar
Modifier and Type | Field and Description |
---|---|
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 |
clockwise, spaceColor, world
DATELINE, mercator, NORTH_POLE, NUM_DEFAULT_CIRCLE_VERTS, NUM_DEFAULT_GREAT_SEGS, pixelsPerMeter, planetPixelCircumference, planetPixelRadius, planetRadius, scaled_radius, SOUTH_POLE, XSCALE_THRESHOLD, XTHRESHOLD
Constructor and Description |
---|
Gnomonic(LatLonPoint center,
float scale,
int width,
int height)
Construct a Mercator projection.
|
Modifier and Type | Method and Description |
---|---|
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) |
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.
|
protected void |
init()
Called after the center and scale is set in setParams, but before the
scale is checked for legitimacy.
|
<T extends java.awt.geom.Point2D> |
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.
|
_forwardPoly, _forwardPoly, _panE, _panN, _panNE, _panNW, _panS, _panSE, _panSW, _panW, forward, forwardRaw, forwardRaw, getSpaceColor, isClockwiseTraversal, overNorthPole, overPoint, overSouthPole, pan, setClockwiseTraversal, setSpaceColor
assertLatLonPoint, clone, doPolyDispatch, doPolyDispatch, forward, forward, forward, forward, forwardArc, forwardArc, forwardArc, forwardCircle, forwardCircle, forwardCircle, forwardGreatPoly, forwardGreatPoly, forwardLine, forwardLine, forwardLLPoly, forwardPoly, forwardPoly, forwardRect, forwardRect, forwardRect, forwardRhumbPoly, forwardRhumbPoly, getCenter, getCenter, getGCTForProjection, getPlanetPixelCircumference, getPlanetPixelRadius, getPlanetRadius, getPPM, getReferenceLon, getScale, getUcuom, inverse, inverse, isComplicatedLineType, isPlotable, normalize_latitude, normalizeLatitude, pan, setCenter, setCenter, setCenter, setPlanetRadius, setPPM, setUcuom, wrap_longitude, wrapLongitude, wrapLongitude, wrapLongitudeDeg
drawBackground, equals, forward, forward, forward, forwardLine, forwardPoly, forwardPoly, forwardRect, forwardShape, getHeight, getMaxScale, getMinScale, getProjectionID, getScale, getWidth, hashCode, inverse, isPlotable, makeClone, panE, panE, panN, panN, panNE, panNE, panNW, panNW, panS, panS, panSE, panSE, panSW, panSW, panW, panW, setCenter, setHeight, setMaxScale, setMinScale, setParms, setProjectionID, setScale, setWidth
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
public Gnomonic(LatLonPoint center, float scale, int width, int height)
center
- LatLonPoint center of projectionscale
- float scale of projectionwidth
- width of screenheight
- height of screenpublic 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.
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 radianspublic static final float hemisphere_distance(float phi1, float lambda0, float phi, float lambda)
phi1
- latitudelambda0
- longitudephi
- latitudelambda
- longitudepublic 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
- longitudepublic 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.
lat
- float latitude in decimal degreeslon
- float longitude in decimal degreesprotected 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 nullprotected java.awt.geom.Point2D _forward(double phi, double lambda, java.awt.geom.Point2D p, Azimuth.AzimuthVar azVar)
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
- LatLonPointProj.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
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details