|
|||||||||||
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.LambertConformal
Implements the LambertConformalConic projection.
NOTE: This implementation only works for the northern
hemisphere.
Needs to be modified for use in the southern hemesphere.
Field Summary | |
static java.lang.String |
LambertConformalName
The LambertCC name. |
static int |
LambertConformalType
The LambertCC type of projection. |
protected java.awt.Point |
plotablePoint
|
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 | |
protected |
LambertConformal(LatLonPoint center,
float scale,
int width,
int height)
Construct a Lambert projection. |
|
LambertConformal(LatLonPoint center,
float scale,
int width,
int height,
double centralMeridian,
double sp_one,
double sp_two,
double reference_latitude,
double falseEasting,
double falseNorthing)
Constructor for the lambert conformal projection. |
protected |
LambertConformal(LatLonPoint center,
float scale,
int width,
int height,
float centralMeridian,
float sp_one,
float sp_two)
Constructor for the lambert conformal projection. |
Method Summary | |
protected java.util.ArrayList |
_forwardPoly(float[] rawllpts,
int ltype,
int nsegs,
boolean isFilled)
Forward project a lat/lon Poly. |
void |
computeParameters()
Called when some fundamental parameters change. |
void |
drawBackground(java.awt.Graphics g)
Draw the background for the projection. |
void |
drawBackground(java.awt.Graphics2D g,
java.awt.Paint paint)
Draw the background for the projection. |
java.awt.Point |
forward(float lat,
float lon,
java.awt.Point p)
Forward projects a lat,lon coordinates. |
java.awt.Point |
forward(float lat,
float lon,
java.awt.Point p,
boolean isRadian)
Forward projects lat,lon into XY space and returns a Point. |
java.awt.Point |
forward(LatLonPoint pt,
java.awt.Point p)
Projects a point from Lat/Lon space to X/Y space. |
boolean |
forwardRaw(float[] rawllpts,
int rawoff,
int[] xcoords,
int[] ycoords,
boolean[] visible,
int copyoff,
int copylen)
Forward project a raw array of radian points. |
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 (northwest) point of the projection. |
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)
Determine if the location is plotable on the screen. |
boolean |
isPlotable(LatLonPoint llpoint)
Determine if the location is plotable |
java.awt.Point |
LLToPixel(double lat,
double lon,
java.awt.Point p)
|
java.awt.geom.Point2D |
LLToWorld(double lat,
double lon,
java.awt.geom.Point2D lp)
|
static void |
main(java.lang.String[] argv)
test method |
float |
normalize_latitude(float lat)
Sets radian latitude to something sane. |
void |
pan(float Az)
Pan the map/projection. |
LatLonPoint |
pixelToLL(int xabs,
int yabs,
LatLonPoint llp)
|
LatLonPoint |
worldToLL(double x,
double y,
LatLonPoint llp)
|
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, init, inverse, inverse, isComplicatedLineType, 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, toString, 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 LambertConformalName
public static final transient int LambertConformalType
protected java.awt.Point plotablePoint
Constructor Detail |
protected LambertConformal(LatLonPoint center, float scale, int width, int height)
center
- LatLonPoint center of projectionscale
- float scale of projectionwidth
- width of screenheight
- height of screenprotected LambertConformal(LatLonPoint center, float scale, int width, int height, float centralMeridian, float sp_one, float sp_two)
center
- center location for projectionsscale
- scale of projectionwidth
- width of projectionheight
- height of projectioncentralMeridian
- the Central Meridian in degrees.sp_one
- Standard Parallel One in degrees.sp_two
- Standard Parallel Two in degrees.public LambertConformal(LatLonPoint center, float scale, int width, int height, double centralMeridian, double sp_one, double sp_two, double reference_latitude, double falseEasting, double falseNorthing)
center
- center location for projectionsscale
- scale of projectionwidth
- width of projectionheight
- height of projectioncentralMeridian
- the Central Meridian in degrees.sp_one
- Standard Parallel One in degrees.sp_two
- Standard Parallel Two in degrees.reference_latitude
- the latitude for the origin of the
projectionfalseEasting
- number of meters added as buffer to origin
E/W.falseNorthing
- number of meters added as buffer to origin
for N/S.Method Detail |
public 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 Proj
public float normalize_latitude(float lat)
normalize_latitude
in class Proj
lat
- float latitude in radians
LatLonPoint.normalize_latitude(float)
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
pan
in interface Projection
pan
in class Proj
Az
- azimuth "east of north" in decimal degrees:
-180 <= Az <= 180
public java.awt.geom.Point2D LLToWorld(double lat, double lon, java.awt.geom.Point2D lp)
public java.awt.Point LLToPixel(double lat, double lon, java.awt.Point p)
public LatLonPoint worldToLL(double x, double y, LatLonPoint llp)
public LatLonPoint pixelToLL(int xabs, int yabs, LatLonPoint llp)
public boolean isPlotable(float lat, float lon)
lat
- latitude in degreeslon
- longitude in degrees
public boolean isPlotable(LatLonPoint llpoint)
isPlotable
in interface Projection
isPlotable
in class Proj
llpoint
- location to check
public java.awt.Point forward(LatLonPoint pt, java.awt.Point p)
pt
- LatLonPointp
- Point retval
public java.awt.Point forward(float lat, float lon, java.awt.Point p)
lat
- raw latitude in decimal degreeslon
- raw longitude in decimal degreesp
- Resulting XY Point
public java.awt.Point forward(float lat, float lon, java.awt.Point p, boolean isRadian)
lat
- latitudelon
- longitudep
- Resulting XY PointisRadian
- indicates that lat,lon arguments are in radians
Projection.forward(float,float,Point)
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
- Pointllp
- resulting LatLonPoint
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.
public java.lang.String getName()
getName
in interface Projection
getName
in class Proj
public boolean forwardRaw(float[] rawllpts, int rawoff, int[] xcoords, int[] 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.
rawllpts
- 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).
protected java.util.ArrayList _forwardPoly(float[] rawllpts, int ltype, int nsegs, boolean isFilled)
_forwardPoly
in class Proj
rawllpts
- 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? this is currently ignored for
cylindrical projections.
public void drawBackground(java.awt.Graphics2D g, java.awt.Paint paint)
drawBackground
in class Proj
g
- Graphics2Dpaint
- java.awt.Paint to use for the backgroundpublic void drawBackground(java.awt.Graphics g)
drawBackground
in class Proj
g
- Graphicspublic static void main(java.lang.String[] argv)
argv
- command line parameters
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |