|
||||||||||
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.GeoProj com.bbn.openmap.proj.Cylindrical com.bbn.openmap.proj.CADRG
public class 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 double |
epsilon
|
Fields inherited from class com.bbn.openmap.proj.Cylindrical |
---|
half_world, 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 | |
---|---|
CADRG(LatLonPoint center,
float scale,
int width,
int height)
Construct a CADRG projection. |
Method Summary | ||
---|---|---|
protected void |
computeParameters()
Called when some fundamental parameters change. |
|
static CADRG |
convertProjection(Projection proj)
|
|
java.awt.geom.Point2D |
forward(double lat,
double lon,
java.awt.geom.Point2D ret_val,
boolean isRadians)
Forward projects lat,lon into XY space and returns a Point2D. |
|
double |
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. |
|
double |
getPlanetPixelCircumference()
Get the planet pixel circumference. |
|
static int |
getProjZone(char asciiZone)
Given a letter for a zone, return the CADRG zone equivalent, |
|
float |
getScale(java.awt.geom.Point2D ll1,
java.awt.geom.Point2D ll2,
java.awt.geom.Point2D point1,
java.awt.geom.Point2D 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. |
|
double |
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. |
|
protected int |
getZone(double lat,
double y_pix_constant)
Returns the zone based on the y_pix_constant and a latitude. |
|
|
inverse(double x,
double y,
T ret_val)
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. |
|
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, _forwardPoly, dumpPoly, dumpPoly, forwardRaw, forwardRaw, getLowerRight, getUpperLeft, init |
Methods inherited from class com.bbn.openmap.proj.GeoProj |
---|
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, getPlanetPixelRadius, getPlanetRadius, getPPM, getReferenceLon, getUcuom, inverse, inverse, isComplicatedLineType, isPlotable, normalize_latitude, normalizeLatitude, pan, pan, setCenter, setCenter, setCenter, setPlanetRadius, setPPM, setUcuom, wrap_longitude, wrapLongitude, wrapLongitude, wrapLongitudeDeg |
Methods inherited from class com.bbn.openmap.proj.Proj |
---|
drawBackground, 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 |
Methods inherited from interface com.bbn.openmap.proj.Projection |
---|
forward, forward, forward, forward, forward, forward, forwardLine, forwardPoly, forwardPoly, forwardRaw, forwardRaw, forwardRect, forwardShape, getCenter, getCenter, getHeight, getLowerRight, getMaxScale, getMinScale, getProjectionID, getRotationAngle, getScale, getUcuom, getUpperLeft, getWidth, inverse, inverse, inverse, inverseShape, isPlotable, makeClone, pan, pan |
Field Detail |
---|
public static final transient java.lang.String CADRGName
public static final transient double 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 screenMethod Detail |
---|
public double normalizeLatitude(double lat)
normalizeLatitude
in class GeoProj
lat
- float latitude in radians
public java.lang.String toString()
toString
in class Cylindrical
Projection.getProjectionID()
public int getZone()
public static int getProjZone(char asciiZone)
public double getPlanetPixelCircumference()
getPlanetPixelCircumference
in class GeoProj
protected int getZone(double lat, double y_pix_constant)
HACK: latitude in decimal degrees DO THE CONSTANTS DEPEND ON THIS?!!
lat
- latitudey_pix_constant
- pixel constantpublic double getXPixConstant()
getXPixConstant
in interface EqualArc
public double getYPixConstant()
getYPixConstant
in interface EqualArc
public double getUpperZoneExtent(int zone)
public double getLowerZoneExtent(int zone)
public int numHorizontalFrames()
public int numVerticalFrames()
public boolean isPlotable(double lat, double lon)
A point is plot-able in the CADRG projection if it is within the North and South zone limits.
isPlotable
in interface Projection
isPlotable
in class Proj
lat
- float latitude in decimal degreeslon
- float longitude in decimal degrees
public java.awt.geom.Point2D forward(double lat, double lon, java.awt.geom.Point2D ret_val, boolean isRadians)
forward
in class GeoProj
lat
- float latitude in radianslon
- float longitude in radiansret_val
- Resulting XY Point2DisRadians
- true if lat/lon are radians instead of decimal degrees
public <T extends java.awt.geom.Point2D> T inverse(double x, double y, T ret_val)
inverse
in interface Projection
inverse
in class Proj
x
- integer x coordinatey
- integer y coordinateret_val
- LatLonPoint
Proj.inverse(Point2D)
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 Cylindrical
public java.lang.String getName()
getName
in interface Projection
getName
in class Cylindrical
public float getScale(java.awt.geom.Point2D ll1, java.awt.geom.Point2D ll2, java.awt.geom.Point2D point1, java.awt.geom.Point2D point2)
getScale
in interface Projection
getScale
in class GeoProj
ll1
- the upper left coordinates of the bounding box.ll2
- the lower right coordinates of the bounding box.point1
- a Point2D reflecting a pixel spot on the projection that
matches the ll1 coordinate, the upper left corner of the area of
interest.point2
- a Point2D reflecting a pixel spot on the projection that
matches the ll2 coordinate, usually the lower right corner of the
area of interest.public static CADRG convertProjection(Projection proj)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |