|
||||||||||
| 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
public abstract class Azimuth
Base of all azimuthal projections.
Orthographic,
Gnomonic,
Serialized Form| Nested Class Summary | |
|---|---|
protected static class |
Azimuth.AzimuthVar
|
| Field Summary | |
|---|---|
protected boolean |
clockwise
Traverse poly vertices in clockwise order. |
protected java.awt.Color |
spaceColor
|
protected java.awt.Point |
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 | |
|---|---|
Azimuth(LatLonPoint center,
float scale,
int width,
int height)
Construct an azimuthal projection. |
|
| Method Summary | |
|---|---|
protected abstract java.awt.geom.Point2D |
_forward(double lat,
double lon,
java.awt.geom.Point2D pt,
Azimuth.AzimuthVar azVar)
Forward project a point. |
protected java.util.ArrayList<float[]> |
_forwardPoly(double[] rawllpts,
int ltype,
int nsegs,
boolean isFilled)
Forward project a lat/lon Poly. |
protected java.util.ArrayList<float[]> |
_forwardPoly(float[] rawllpts,
int ltype,
int nsegs,
boolean isFilled)
Forward project a lat/lon Poly. |
protected void |
_panE()
Pan the map east. |
protected void |
_panN()
Pan the map north. |
protected void |
_panNE()
Pan the map northeast. |
protected void |
_panNW()
Pan the map northwest. |
protected void |
_panS()
Pan the map south. |
protected void |
_panSE()
Pan the map southeast. |
protected void |
_panSW()
Pan the map southwest. |
protected void |
_panW()
Pan the map west. |
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. |
java.awt.geom.Point2D |
forward(double lat,
double lon,
java.awt.geom.Point2D pt,
boolean isRadian)
Forward project a point. |
boolean |
forwardRaw(double[] rawllpts,
int rawoff,
float[] xcoords,
float[] ycoords,
boolean[] visible,
int copyoff,
int copylen)
Forward project a raw array of radian points. |
boolean |
forwardRaw(float[] rawllpts,
int rawoff,
float[] xcoords,
float[] ycoords,
boolean[] visible,
int copyoff,
int copylen)
Forward project a raw array of radian points. |
java.lang.String |
getName()
Get the name string of the projection. |
java.awt.Color |
getSpaceColor()
|
protected void |
init()
Called after the center and scale is set in setParams, but before the scale is checked for legitimacy. |
boolean |
isClockwiseTraversal()
Get poly-traversal setting (clockwise or counter-clockwise). |
boolean |
overNorthPole()
Checks if the north pole is visible on the screen. |
boolean |
overPoint(float lat,
float lon)
Checks if the point is visible on the screen. |
boolean |
overSouthPole()
Checks if the south pole is visible on the screen. |
void |
pan(float Az)
Pan the map/projection. |
void |
setClockwiseTraversal(boolean value)
Toggle clockwise traversal of poly vertices. |
void |
setSpaceColor(java.awt.Color spaceColor)
|
java.lang.String |
toString()
Return stringified description of this projection. |
| Methods inherited from class com.bbn.openmap.proj.Proj |
|---|
drawBackground, equals, forward, forward, forward, forwardLine, forwardPoly, forwardPoly, forwardRect, forwardShape, getHeight, getLowerRight, getMaxScale, getMinScale, getProjectionID, getRotationAngle, getScale, getUpperLeft, getWidth, hashCode, inverse, inverse, inverseShape, isPlotable, 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 |
|---|
protected transient java.awt.Point world
protected boolean clockwise
protected java.awt.Color spaceColor
| Constructor Detail |
|---|
public Azimuth(LatLonPoint center,
float scale,
int width,
int height)
center - LatLonPoint center of projectionscale - float scale of projectionwidth - width of screenheight - height of screen| Method Detail |
|---|
public java.lang.String toString()
toString in class GeoProjProjection.getProjectionID()protected void init()
ProjMake sure you call super.init() if you override this method.
init in class GeoProjprotected 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 Projpublic void setClockwiseTraversal(boolean value)
value - booleanpublic boolean isClockwiseTraversal()
public final java.awt.geom.Point2D forward(double lat,
double lon,
java.awt.geom.Point2D pt,
boolean isRadian)
forward in class GeoProjlat - latitudelon - longitudept - return pointisRadian - true if lat/lon are radians instead of decimal degrees
protected abstract java.awt.geom.Point2D _forward(double lat,
double lon,
java.awt.geom.Point2D pt,
Azimuth.AzimuthVar azVar)
lat - latitude in radianslon - longitude in radianspt - Point2DazVar - AzimuthVar or null
public void pan(float Az)
pan(180, c) pan south
pan(-90, c) pan west
pan(0, c) pan north
pan(90, c) pan east
Az - azimuth "east of north" in decimal degrees:
-180 <= Az <= 180protected void _panNW()
protected void _panN()
protected void _panNE()
protected void _panE()
protected void _panSE()
protected void _panS()
protected void _panSW()
protected void _panW()
public boolean overNorthPole()
public boolean overSouthPole()
public boolean overPoint(float lat,
float lon)
lat - latitude in radianslon - longitude in radians
protected java.util.ArrayList<float[]> _forwardPoly(float[] rawllpts,
int ltype,
int nsegs,
boolean isFilled)
_forwardPoly in class GeoProjrawllpts - float[] of lat,lon,lat,lon,... in RADIANS!ltype - line type (straight, rhumbline, greatcircle)nsegs - number of segment points (only for greatcircle or rhumbline
line types, and if < 1, this value is generated internally)isFilled - filled poly?
protected java.util.ArrayList<float[]> _forwardPoly(double[] rawllpts,
int ltype,
int nsegs,
boolean isFilled)
_forwardPoly in class GeoProjrawllpts - double[] of lat,lon,lat,lon,... in RADIANS!ltype - line type (straight, rhumbline, greatcircle)nsegs - number of segment points (only for greatcircle or rhumbline
line types, and if < 1, this value is generated internally)isFilled - filled poly?
public boolean forwardRaw(float[] rawllpts,
int rawoff,
float[] xcoords,
float[] ycoords,
boolean[] visible,
int copyoff,
int copylen)
It does populate a visible array indicating whether the points are visible on the projected view of the world.
forwardRaw in interface ProjectionforwardRaw in class Projrawllpts - array of lat,lon,... in radiansrawoff - offset into rawllptsxcoords - x coordinatesycoords - y coordinatesvisible - coordinates visible?copyoff - offset into x,y,visible arrayscopylen - number of coordinates (coordinate arrays should be at
least this long, rawllpts should be at least twice as long).
public boolean forwardRaw(double[] rawllpts,
int rawoff,
float[] xcoords,
float[] ycoords,
boolean[] visible,
int copyoff,
int copylen)
It does populate a visible array indicating whether the points are visible on the projected view of the world.
forwardRaw in interface ProjectionforwardRaw in class Projrawllpts - array of lat,lon,... in radiansrawoff - offset into rawllptsxcoords - x coordinatesycoords - y coordinatesvisible - coordinates visible?copyoff - offset into x,y,visible arrayscopylen - number of coordinates (coordinate arrays should be at
least this long, rawllpts should be at least twice as long).
public void drawBackground(java.awt.Graphics g)
drawBackground in class Projg - Graphicspublic java.lang.String getName()
getName in interface ProjectiongetName in class Projpublic java.awt.Color getSpaceColor()
public void setSpaceColor(java.awt.Color spaceColor)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||