|
|||||||||||
| 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.Cylindrical
|
+--com.bbn.openmap.proj.CADRG
Implements the CADRG projection. This is really an Equal Arc Projection with pixel spacings as dictated by the RPF specification.
| Field Summary | |
static java.lang.String |
CADRGName
The CADRG name. |
static int |
CADRGType
The CADRG type of projection. |
static float |
epsilon
|
| Fields inherited from class com.bbn.openmap.proj.Cylindrical |
half_world, 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 | |
CADRG(LatLonPoint center,
float scale,
int width,
int height)
Construct a CADRG projection. |
|
| Method Summary | |
protected void |
computeParameters()
Called when some fundamental parameters change. |
java.awt.Point |
forward(float lat,
float lon,
java.awt.Point ret_val)
Forward projects lat,lon coordinates. |
java.awt.Point |
forward(float lat,
float lon,
java.awt.Point ret_val,
boolean b)
Forward projects lat,lon into XY space and returns a Point. |
java.awt.Point |
forward(LatLonPoint pt,
java.awt.Point ret_val)
Projects a point from Lat/Lon space to X/Y space. |
float |
getLowerZoneExtent(int zone)
Returns the lower zone extent for the given zone at the current scale. |
java.lang.String |
getName()
Get the name string of the projection. |
float |
getPlanetPixelCircumference()
Get the planet pixel circumference. |
static int |
getProjZone(char asciiZone)
Given a letter for a zone, return the CADRG zone equivalent, |
float |
getScale(LatLonPoint ll1,
LatLonPoint ll2,
java.awt.Point point1,
java.awt.Point point2)
Given a couple of points representing a bounding box, find out what the scale should be in order to make those points appear at the corners of the projection. |
float |
getUpperZoneExtent(int zone)
Returns the upper zone extent for the given zone at the current scale. |
double |
getXPixConstant()
Returns the x pixel constant of the projection. |
double |
getYPixConstant()
Returns the y pixel constant of the projection. |
int |
getZone()
Returns the current zone of the projection. |
LatLonPoint |
inverse(int x,
int y,
LatLonPoint ret_val)
Inverse project x,y coordinates into a LatLonPoint. |
LatLonPoint |
inverse(java.awt.Point pt,
LatLonPoint ret_val)
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. |
int |
numHorizontalFrames()
Return the number of horizontal frame files that will fit around the world in the current zone. |
int |
numVerticalFrames()
Return the number of vertical frame files that will fit within the current zone, overlaps included. |
java.lang.String |
toString()
Return stringified description of this projection. |
| Methods inherited from class com.bbn.openmap.proj.Cylindrical |
_forwardPoly, drawBackground, drawBackground, forwardRaw, getLowerRight, getUpperLeft, pan |
| 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, getPlanetPixelRadius, getPlanetRadius, getPPM, getProjectionID, getProjectionType, 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 |
| Methods inherited from interface com.bbn.openmap.proj.Projection |
forward, forward, forwardArc, forwardCircle, forwardLine, forwardPoly, forwardRaster, forwardRaw, forwardRect, getCenter, getHeight, getLowerRight, getMaxScale, getMinScale, getProjectionID, getProjectionType, getScale, getUpperLeft, getWidth, inverse, inverse, isPlotable, makeClone, pan, pan |
| Field Detail |
public static final transient java.lang.String CADRGName
public static final transient int CADRGType
public static final transient float epsilon
| Constructor Detail |
public CADRG(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 float normalize_latitude(float lat)
normalize_latitude in class Projlat - float latitude in radians
LatLonPoint.normalize_latitude(float)public java.lang.String toString()
toString in class CylindricalProjection.getProjectionID()public int getZone()
public static int getProjZone(char asciiZone)
public float getPlanetPixelCircumference()
getPlanetPixelCircumference in class Projpublic double getXPixConstant()
getXPixConstant in interface EqualArcpublic double getYPixConstant()
getYPixConstant in interface EqualArcpublic float getUpperZoneExtent(int zone)
public float getLowerZoneExtent(int zone)
public int numHorizontalFrames()
public int numVerticalFrames()
public boolean isPlotable(float lat,
float lon)
A point is plot-able in the CADRG projection if it is within the North and South zone limits.
isPlotable in interface Projectionlat - float latitude in decimal degreeslon - float longitude in decimal degrees
public java.awt.Point forward(LatLonPoint pt,
java.awt.Point ret_val)
forward in interface Projectionpt - LatLonPointret_val - Point retval
public java.awt.Point forward(float lat,
float lon,
java.awt.Point ret_val,
boolean b)
forward in interface Projectionlat - float latitude in radianslon - float longitude in radiansret_val - Resulting XY Pointb - placeholder argument indicating that lat,lon
arguments are in radians (can be true or false)
Projection.forward(float,float,Point)
public java.awt.Point forward(float lat,
float lon,
java.awt.Point ret_val)
forward in interface Projectionlat - raw latitude in decimal degreeslon - raw longitude in decimal degreesret_val - Resulting XY Point
public LatLonPoint inverse(java.awt.Point pt,
LatLonPoint ret_val)
inverse in interface Projectionpt - x,y Pointret_val - resulting LatLonPoint
public LatLonPoint inverse(int x,
int y,
LatLonPoint ret_val)
inverse in interface Projectionx - integer x coordinatey - integer y coordinateret_val - LatLonPoint
Proj.inverse(Point)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 Cylindricalpublic java.lang.String getName()
getName in interface ProjectiongetName in class Cylindrical
public float getScale(LatLonPoint ll1,
LatLonPoint ll2,
java.awt.Point point1,
java.awt.Point point2)
getScale in interface ProjectiongetScale in class Projll1 - the upper left coordinates of the bounding box.ll2 - the lower right coordinates of the bounding box.point1 - a java.awt.Point reflecting a pixel spot on the
projection that matches the ll1 coordinate, the upper
left corner of the area of interest.point2 - a java.awt.Point reflecting a pixel spot on the
projection that matches the ll2 coordinate, usually the
lower right corner of the area of interest.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||