|
|||||||||||
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.Conic
Base of all conic projections.
LambertConformalConic
,
MassStatePlane
,
Serialized FormField Summary | |
protected static java.awt.Color |
backgroundColor
|
protected float |
eastBorder
|
protected float |
northBorder
|
protected LatLonPoint |
origin
|
protected LatLonPoint |
parallel1
|
protected LatLonPoint |
parallel2
|
protected float |
southBorder
|
protected float |
westBorder
|
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 | |
Conic(LatLonPoint center,
float scale,
int width,
int height,
int type)
Construct a conic projection. |
Method Summary | |
protected java.util.Vector |
_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)
Draw the background for the projection. |
boolean |
forwardRaw(float[] rawllpts,
int rawoff,
int[] xcoords,
int[] 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. |
protected void |
setBorders(float north,
float east,
float south,
float west)
Sets the limits of the border parameters to make sure the coordinates make sense for the version of the plane used. |
void |
setCenter(float lat,
float lon)
Checks the border parameters to make sure the coordinates make sense for the version of the plane used. |
java.lang.String |
toString()
Return stringified description of this projection. |
Methods inherited from class com.bbn.openmap.proj.Proj |
clone, doPolyDispatch, drawBackground, 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, inverse, inverse, isComplicatedLineType, isPlotable, makeClone, normalize_latitude, pan, pan, panE, panE, panN, panN, panNE, panNE, panNW, panNW, panS, panS, panSE, panSE, panSW, panSW, panW, panW, 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, forward, getLowerRight, getUpperLeft, inverse, inverse, isPlotable |
Field Detail |
protected LatLonPoint origin
protected LatLonPoint parallel1
protected LatLonPoint parallel2
protected float eastBorder
protected float westBorder
protected float northBorder
protected float southBorder
protected static java.awt.Color backgroundColor
Constructor Detail |
public Conic(LatLonPoint center, float scale, int width, int height, int type)
center
- LatLonPoint center of projectionscale
- float scale of projectionwidth
- width of screenheight
- height of screentype
- projection typeMethod Detail |
public java.lang.String toString()
toString
in class Proj
Projection.getProjectionID()
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 Proj
protected void setBorders(float north, float east, float south, float west)
If you don't want a limit on any one of these parametes, pass in the vaue Float.NaN. Otherwise, the numbers are decimal degrees.
north
- float latitude in decimal degreeseast
- float longitude in decimal degreessouth
- float latitude in decimal degreeswest
- float longitude in decimal degreespublic void setCenter(float lat, float lon)
setCenter
in class Proj
lat
- float latitude in decimal degreeslon
- float longitude in decimal degreespublic 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.Vector _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.Graphics g)
drawBackground
in class Proj
g
- Graphicspublic java.lang.String getName()
getName
in interface Projection
getName
in class Proj
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |