|
||||||||||
| 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.UTMProjection
public class UTMProjection
A OpenMap Projection class that uses the UTMPoint to do its
calculation.
| Field Summary | |
|---|---|
protected Ellipsoid |
ellps
|
protected static double |
epsilon
|
protected int |
half_world
|
protected double |
hy
|
protected boolean |
northern
|
protected double |
ppu
Pixel per map unit. |
protected java.awt.Point |
world
|
protected double |
wx
|
protected java.awt.geom.Point2D.Double |
xycenter
Center of view as xy coordinates relative to the underlying projection |
protected int |
zoneNumber
|
| 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 | |
|---|---|
UTMProjection(LatLonPoint center,
float s,
int w,
int h,
int zone_number,
boolean isnorthern,
Ellipsoid ellps)
|
|
| Method Summary | ||
|---|---|---|
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 |
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. |
|
void |
drawBackground(java.awt.Graphics2D g,
java.awt.Paint paint)
Draw the background for the projection. |
|
java.awt.geom.Point2D |
forward(double lat,
double lon,
java.awt.geom.Point2D pt,
boolean isRadian)
Project the point into view space. |
|
java.awt.geom.Point2D |
forward(double lat,
double lon,
java.awt.geom.Point2D pt,
boolean isRadian,
UTMPoint utmPoint)
|
|
java.awt.geom.Point2D |
forward(LatLonPoint llp,
java.awt.geom.Point2D pt)
|
|
boolean |
forwardRaw(float[] rawllpts,
int rawoff,
int[] xcoords,
int[] ycoords,
boolean[] visible,
int copyoff,
int copylen)
|
|
Ellipsoid |
getEllps()
|
|
UTMGCT |
getGCTForProjection()
Convenience method to create a GCT for this projection. |
|
LatLonPoint |
getLowerRight()
Get the world coordinate of the lower right corner of the map. |
|
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. |
|
LatLonPoint |
getUpperLeft()
Get the world coordinate of the upper left corner of the map. |
|
int |
getZoneNumber()
|
|
|
inverse(double x,
double y,
T llpt)
Inverse project x,y coordinates into world coordinates. |
|
boolean |
isNorthern()
|
|
boolean |
isPlotable(double lat,
double lon)
Checks if a location is plot-able. |
|
double |
normalizeLatitude(double lat)
Sets radian latitude to something sane. |
|
void |
setEllps(Ellipsoid ellps)
|
|
void |
setNorthern(boolean northern)
|
|
void |
setZoneNumber(int zoneNumber)
|
|
| 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, getPlanetPixelCircumference, getPlanetPixelRadius, getPlanetRadius, getPPM, getReferenceLon, getUcuom, init, inverse, inverse, isComplicatedLineType, isPlotable, normalize_latitude, normalizeLatitude, pan, pan, setCenter, setCenter, setCenter, setPlanetRadius, setPPM, setUcuom, toString, wrap_longitude, wrapLongitude, wrapLongitude, wrapLongitudeDeg |
| Methods inherited from class com.bbn.openmap.proj.Proj |
|---|
equals, forward, forward, forward, forwardLine, forwardPoly, forwardPoly, forwardRaw, forwardRaw, forwardRect, forwardShape, getHeight, getMaxScale, getMinScale, getName, 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 |
| Field Detail |
|---|
protected java.awt.geom.Point2D.Double xycenter
protected double hy
protected double wx
protected double ppu
protected java.awt.Point world
protected int half_world
protected int zoneNumber
protected boolean northern
protected Ellipsoid ellps
protected static double epsilon
| Constructor Detail |
|---|
public UTMProjection(LatLonPoint center,
float s,
int w,
int h,
int zone_number,
boolean isnorthern,
Ellipsoid ellps)
| Method Detail |
|---|
protected void computeParameters()
ProjEach 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 java.awt.geom.Point2D forward(LatLonPoint llp,
java.awt.geom.Point2D pt)
public java.awt.geom.Point2D forward(double lat,
double lon,
java.awt.geom.Point2D pt,
boolean isRadian)
GeoProj
forward in class GeoProjlat - latitudelon - longitudept - return pointisRadian - true if lat/lon are radians instead of decimal degrees
public java.awt.geom.Point2D forward(double lat,
double lon,
java.awt.geom.Point2D pt,
boolean isRadian,
UTMPoint utmPoint)
public <T extends java.awt.geom.Point2D> T inverse(double x,
double y,
T llpt)
Projection
inverse in interface Projectioninverse in class Projx - integer x coordinatey - integer y coordinatellpt - Point2D to be loaded with the result. A new Point2D object
will be created if this is null.
Proj.inverse(Point2D)
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 ProjectiongetScale in class GeoProjll1 - 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.
protected java.util.ArrayList<float[]> _forwardPoly(float[] rawllpts,
int ltype,
int nsegs,
boolean isFilled)
GeoProj
_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)
GeoProj
_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 void drawBackground(java.awt.Graphics2D g,
java.awt.Paint paint)
drawBackground in class Projg - Graphics2Dpaint - java.awt.Paint to use for the backgroundpublic void drawBackground(java.awt.Graphics g)
drawBackground in class Projg - Graphics
public boolean forwardRaw(float[] rawllpts,
int rawoff,
int[] xcoords,
int[] ycoords,
boolean[] visible,
int copyoff,
int copylen)
public LatLonPoint getLowerRight()
Proj
getLowerRight in interface ProjectiongetLowerRight in class Projpublic LatLonPoint getUpperLeft()
Proj
getUpperLeft in interface ProjectiongetUpperLeft in class Projpublic int getZoneNumber()
public void setZoneNumber(int zoneNumber)
public boolean isNorthern()
public void setNorthern(boolean northern)
public Ellipsoid getEllps()
public void setEllps(Ellipsoid ellps)
public double normalizeLatitude(double lat)
normalizeLatitude in class GeoProjlat - float latitude in radians
public boolean isPlotable(double lat,
double lon)
ProjectionCall this to check and see if a location can be plotted. This is meant to be used for checking before projecting and rendering Point2D objects (bitmaps or text objects tacked at a location, for instance).
isPlotable in interface ProjectionisPlotable in class Projlat - vertical location component (units depend on the projection
implementation).lon - horizontal location component (units depend on the projection
implementation).
public UTMGCT getGCTForProjection()
getGCTForProjection in class GeoProj
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||