com.bbn.openmap.proj
Class Proj

java.lang.Object
  extended bycom.bbn.openmap.proj.Proj
All Implemented Interfaces:
java.lang.Cloneable, Projection, java.io.Serializable
Direct Known Subclasses:
AspectRatioProjection, Azimuth, Cylindrical, LambertConformal, UTMProjection

public abstract class Proj
extends java.lang.Object
implements Projection, java.lang.Cloneable

Proj is the base class of all Projections.

You probably don't want to use this class unless you are hacking your own projections, or need extended functionality. To be safe you will want to use the Projection interface.

Notes:

See Also:
Projection, Cylindrical, Mercator, CADRG, Azimuth, Orthographic, Planet, GreatCircle, OMPoly, Serialized Form

Field Summary
protected  float ctrLat
           
protected  float ctrLon
           
static float DATELINE
          Dateline longitude in radians.
protected  int height
           
protected  float maxscale
           
protected  Mercator mercator
           
static int MIN_HEIGHT
          Minimum height of projection.
static int MIN_WIDTH
          Minimum width of projection.
protected  float minscale
           
static float NORTH_POLE
          North pole latitude in radians.
protected static int NUM_DEFAULT_CIRCLE_VERTS
           
protected static int NUM_DEFAULT_GREAT_SEGS
           
protected  int pixelsPerMeter
           
protected  float planetPixelCircumference
           
protected  float planetPixelRadius
           
protected  float planetRadius
           
protected  java.lang.String projID
           
protected  float scale
           
protected  float scaled_radius
           
static float SOUTH_POLE
          South pole latitude in radians.
protected  int type
           
protected  int width
           
protected  int XSCALE_THRESHOLD
           
protected static int XTHRESHOLD
           
 
Constructor Summary
Proj(LatLonPoint center, float s, int w, int h, int type)
          Construct a projection.
 
Method Summary
protected abstract  java.util.ArrayList _forwardPoly(float[] rawllpts, int ltype, int nsegs, boolean isFilled)
          Forward project a lat/lon Poly.
 java.lang.Object clone()
          Copies this projection.
protected abstract  void computeParameters()
          Called when some fundamental parameters change.
protected  java.util.ArrayList doPolyDispatch(float[] rawllpts, int ltype, int nsegs, boolean isFilled)
          Generates a complicated poly.
abstract  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.
abstract  void drawBackground(java.awt.Graphics2D g, java.awt.Paint p)
          Draw the background for the projection.
 boolean equals(java.lang.Object o)
          Test for equality.
 java.awt.Point forward(float lat, float lon)
          Forward project lat,lon coordinates.
 java.awt.Point forward(LatLonPoint llp)
          Forward project a LatLonPoint.
 java.util.ArrayList forwardArc(LatLonPoint c, boolean radians, float radius, float start, float extent)
          Forward project an arc.
 java.util.ArrayList forwardArc(LatLonPoint c, boolean radians, float radius, int nverts, float start, float extent)
           
 java.util.ArrayList forwardArc(LatLonPoint c, boolean radians, float radius, int nverts, float start, float extent, int arcType)
          Forward project a Lat/Lon Arc.
 java.util.ArrayList forwardCircle(LatLonPoint c, boolean radians, float radius)
          Forward project a circle.
 java.util.ArrayList forwardCircle(LatLonPoint c, boolean radians, float radius, int nverts)
           
 java.util.ArrayList forwardCircle(LatLonPoint c, boolean radians, float radius, int nverts, boolean isFilled)
          Forward project a Lat/Lon Circle.
protected  java.util.ArrayList forwardGreatPoly(float[] rawllpts, int nsegs, boolean isFilled)
          Forward project a greatcircle poly.
 java.util.ArrayList forwardLine(LatLonPoint ll1, LatLonPoint ll2, int ltype)
          Forward project a lat/lon Line.
 java.util.ArrayList forwardLine(LatLonPoint ll1, LatLonPoint ll2, int ltype, int nsegs)
          Forward project a line.
 java.util.ArrayList forwardPoly(float[] rawllpts, int ltype, int nsegs)
           
 java.util.ArrayList forwardPoly(float[] rawllpts, int ltype, int nsegs, boolean isFilled)
          Forward project a lat/lon Poly.
 java.util.ArrayList forwardRaster(LatLonPoint llNW, LatLonPoint llSE, java.awt.Image image)
          Forward projects a raster.
 java.util.ArrayList forwardRect(LatLonPoint ll1, LatLonPoint ll2, int ltype)
          Forward project a lat/lon Rectangle.
 java.util.ArrayList forwardRect(LatLonPoint ll1, LatLonPoint ll2, int ltype, int nsegs)
           
 java.util.ArrayList forwardRect(LatLonPoint ll1, LatLonPoint ll2, int ltype, int nsegs, boolean isFilled)
          Forward project a rectangle.
protected  java.util.ArrayList forwardRhumbPoly(float[] rawllpts, int nsegs, boolean isFilled)
          Forward project a rhumbline poly.
 LatLonPoint getCenter()
          Get center point of projection.
 int getHeight()
          Get projection height.
 float getMaxScale()
          Get the maximum scale of the projection.
 float getMinScale()
          Get minimum scale of the projection.
 java.lang.String getName()
          Get the name string of the projection.
 float getPlanetPixelCircumference()
          Get the planet pixel circumference.
 float getPlanetPixelRadius()
          Get the planet pixel radius.
 float getPlanetRadius()
          Get the planet radius.
 int getPPM()
          Get the pixels-per-meter constant.
 java.lang.String getProjectionID()
          Gets the projection ID used for determining equality.
 int getProjectionType()
          Gets the projection type.
 float getScale()
          Get the scale of the projection.
 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.
 int getWidth()
          Get projection width.
 int hashCode()
          Return hashcode value of projection.
protected  void init()
          Moved the initialization of constants to this method so they would be set by the time computeParams gets called the first time.
 LatLonPoint inverse(int x, int y)
          Inverse project x,y coordinates.
 LatLonPoint inverse(java.awt.Point point)
          Inverse project a Point from x,y space to LatLon space.
 boolean isComplicatedLineType(int ltype)
          Check for complicated linetypes.
 boolean isPlotable(LatLonPoint llpoint)
          Checks if a LatLonPoint is plot-able.
 Projection makeClone()
          Clone the projection.
abstract  float normalize_latitude(float lat)
          Sets radian latitude to something sane.
 void pan(float Az)
          Pan the map/projection.
 void pan(float Az, float c)
          Pan the map/projection.
 void panE()
          pan the map east.
 void panE(float c)
           
 void panN()
          pan the map north.
 void panN(float c)
           
 void panNE()
          pan the map northeast.
 void panNE(float c)
           
 void panNW()
          pan the map northwest.
 void panNW(float c)
           
 void panS()
          pan the map south.
 void panS(float c)
           
 void panSE()
          pan the map southeast.
 void panSE(float c)
           
 void panSW()
          pan the map southwest.
 void panSW(float c)
           
 void panW()
          pan the map west.
 void panW(float c)
           
 void setCenter(float lat, float lon)
          Set center point of projection.
 void setCenter(LatLonPoint pt)
          Set center point of projection.
 void setHeight(int height)
          Set projection height.
 void setMaxScale(float s)
          Set the maximum scale of the projection.
 void setMinScale(float s)
          Set the minscale of the projection.
protected  void setParms(LatLonPoint center, float scale, int width, int height)
          Sets all the projection variables at once before calling computeParameters().
 void setPlanetRadius(float radius)
          Set the planet radius.
 void setPPM(int ppm)
          Set the pixels per meter constant.
protected  void setProjectionID()
          Sets the projection ID used for determining equality.
 void setScale(float s)
          Set the scale of the projection.
 void setWidth(int width)
          Set projection width.
 java.lang.String toString()
          Stringify the projection.
static float wrap_longitude(float lon)
          Sets radian longitude to something sane.
 
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, forwardRaw, getLowerRight, getUpperLeft, inverse, inverse, isPlotable
 

Field Detail

NORTH_POLE

public static final transient float NORTH_POLE
North pole latitude in radians.

See Also:
Constant Field Values

SOUTH_POLE

public static final transient float SOUTH_POLE
South pole latitude in radians.

See Also:
Constant Field Values

DATELINE

public static final transient float DATELINE
Dateline longitude in radians.

See Also:
Constant Field Values

MIN_WIDTH

public static final transient int MIN_WIDTH
Minimum width of projection.

See Also:
Constant Field Values

MIN_HEIGHT

public static final transient int MIN_HEIGHT
Minimum height of projection.

See Also:
Constant Field Values

NUM_DEFAULT_CIRCLE_VERTS

protected static transient int NUM_DEFAULT_CIRCLE_VERTS

NUM_DEFAULT_GREAT_SEGS

protected static transient int NUM_DEFAULT_GREAT_SEGS

pixelsPerMeter

protected int pixelsPerMeter

planetRadius

protected float planetRadius

planetPixelRadius

protected float planetPixelRadius

planetPixelCircumference

protected float planetPixelCircumference

width

protected int width

height

protected int height

minscale

protected float minscale

maxscale

protected float maxscale

scale

protected float scale

scaled_radius

protected float scaled_radius

ctrLat

protected float ctrLat

ctrLon

protected float ctrLon

type

protected int type

projID

protected java.lang.String projID

mercator

protected Mercator mercator

XTHRESHOLD

protected static transient int XTHRESHOLD

XSCALE_THRESHOLD

protected transient int XSCALE_THRESHOLD
Constructor Detail

Proj

public Proj(LatLonPoint center,
            float s,
            int w,
            int h,
            int type)
Construct a projection.

Parameters:
center - LatLonPoint center of projection
s - float scale of projection
w - width of screen
h - height of screen
type - projection type
See Also:
ProjectionFactory
Method Detail

init

protected void init()
Moved the initialization of constants to this method so they would be set by the time computeParams gets called the first time.


setPPM

public void setPPM(int ppm)
Set the pixels per meter constant.

Parameters:
ppm - int Pixels Per Meter scale-factor constant

getPPM

public int getPPM()
Get the pixels-per-meter constant.

Returns:
int Pixels Per Meter scale-factor constant

setPlanetRadius

public void setPlanetRadius(float radius)
Set the planet radius.

Parameters:
radius - float planet radius in meters

getPlanetRadius

public float getPlanetRadius()
Get the planet radius.

Returns:
float radius of planet in meters

getPlanetPixelRadius

public float getPlanetPixelRadius()
Get the planet pixel radius.

Returns:
float radius of planet in pixels

getPlanetPixelCircumference

public float getPlanetPixelCircumference()
Get the planet pixel circumference.

Returns:
float circumference of planet in pixels

setScale

public void setScale(float s)
Set the scale of the projection.

Sets the projection to the scale 1:s iff minscale < s < maxscale.
If s < minscale, sets the projection to minscale.
If s > maxscale, sets the projection to maxscale.

Parameters:
s - float scale

setMinScale

public void setMinScale(float s)
Set the minscale of the projection.

Usually you will not need to do this.

Parameters:
s - float minscale

setMaxScale

public void setMaxScale(float s)
Set the maximum scale of the projection.

Usually you will not need to do this.

Parameters:
s - float minscale

getScale

public float getScale()
Get the scale of the projection.

Specified by:
getScale in interface Projection
Returns:
float scale value

getMaxScale

public float getMaxScale()
Get the maximum scale of the projection.

Specified by:
getMaxScale in interface Projection
Returns:
float max scale value

getMinScale

public float getMinScale()
Get minimum scale of the projection.

Specified by:
getMinScale in interface Projection
Returns:
float min scale value

setCenter

public void setCenter(float lat,
                      float lon)
Set center point of projection.

Parameters:
lat - float latitude in decimal degrees
lon - float longitude in decimal degrees

setCenter

public void setCenter(LatLonPoint pt)
Set center point of projection.

Parameters:
pt - LatLonPoint

getCenter

public LatLonPoint getCenter()
Get center point of projection.

Specified by:
getCenter in interface Projection
Returns:
LatLonPoint center of projection

setWidth

public void setWidth(int width)
Set projection width.

Parameters:
width - width of projection screen

setHeight

public void setHeight(int height)
Set projection height.

Parameters:
height - height of projection screen

getWidth

public int getWidth()
Get projection width.

Specified by:
getWidth in interface Projection
Returns:
width of projection screen

getHeight

public int getHeight()
Get projection height.

Specified by:
getHeight in interface Projection
Returns:
height of projection screen

setParms

protected void setParms(LatLonPoint center,
                        float scale,
                        int width,
                        int height)
Sets all the projection variables at once before calling computeParameters().

Parameters:
center - LatLonPoint center
scale - float scale
width - width of screen
height - height of screen

getProjectionType

public int getProjectionType()
Gets the projection type.

Specified by:
getProjectionType in interface Projection
Returns:
int projection type

setProjectionID

protected void setProjectionID()
Sets the projection ID used for determining equality. The projection ID String is intern()ed for efficient comparison.


getProjectionID

public java.lang.String getProjectionID()
Gets the projection ID used for determining equality.

Specified by:
getProjectionID in interface Projection
Returns:
the projection ID, as an intern()ed String

computeParameters

protected abstract void computeParameters()
Called when some fundamental parameters change.

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.


normalize_latitude

public abstract float normalize_latitude(float lat)
Sets radian latitude to something sane.

Normalizes the latitude according to the particular projection.

Parameters:
lat - float latitude in radians
Returns:
float latitude (-PI/2 <= y <= PI/2)
See Also:
ProjMath.normalize_latitude(float, float), LatLonPoint.normalize_latitude(float)

wrap_longitude

public static final float wrap_longitude(float lon)
Sets radian longitude to something sane.

Parameters:
lon - float longitude in radians
Returns:
float longitude (-PI <= x < PI)
See Also:
ProjMath.wrap_longitude(float), LatLonPoint.wrap_longitude(float)

toString

public java.lang.String toString()
Stringify the projection.

Returns:
stringified projection
See Also:
getProjectionID()

equals

public boolean equals(java.lang.Object o)
Test for equality.

Parameters:
o - Object to compare.
Returns:
boolean comparison

hashCode

public int hashCode()
Return hashcode value of projection.

Returns:
int hashcode

makeClone

public Projection makeClone()
Clone the projection.

Specified by:
makeClone in interface Projection
Returns:
Projection clone of this one.

clone

public java.lang.Object clone()
Copies this projection.

Returns:
a copy of this projection.

isPlotable

public boolean isPlotable(LatLonPoint llpoint)
Checks if a LatLonPoint is plot-able.

Call this to check and see if a LatLonPoint can be plotted. This is meant to be used for checking before projecting and rendering Point objects (bitmaps for instance).

Specified by:
isPlotable in interface Projection
Parameters:
llpoint - LatLonPoint
Returns:
boolean

forward

public final java.awt.Point forward(LatLonPoint llp)
Forward project a LatLonPoint.

Forward projects a LatLon point into XY space. Returns a Point.

Specified by:
forward in interface Projection
Parameters:
llp - LatLonPoint to be projected
Returns:
Point (new)

forward

public final java.awt.Point forward(float lat,
                                    float lon)
Forward project lat,lon coordinates.

Specified by:
forward in interface Projection
Parameters:
lat - float latitude in decimal degrees
lon - float longitude in decimal degrees
Returns:
Point (new)

inverse

public final LatLonPoint inverse(java.awt.Point point)
Inverse project a Point from x,y space to LatLon space.

Specified by:
inverse in interface Projection
Parameters:
point - x,y Point
Returns:
LatLonPoint (new)

inverse

public final LatLonPoint inverse(int x,
                                 int y)
Inverse project x,y coordinates.

Specified by:
inverse in interface Projection
Parameters:
x - integer x coordinate
y - integer y coordinate
Returns:
LatLonPoint (new)
See Also:
inverse(Point)

forwardLine

public java.util.ArrayList forwardLine(LatLonPoint ll1,
                                       LatLonPoint ll2,
                                       int ltype,
                                       int nsegs)
Forward project a line.

Specified by:
forwardLine in interface Projection
Parameters:
ll1 - LatLonPoint
ll2 - LatLonPoint
ltype - LineType
nsegs - number of segments
Returns:
ArrayList
See Also:
LineType.Straight, LineType.Rhumb, LineType.GreatCircle

forwardLine

public java.util.ArrayList forwardLine(LatLonPoint ll1,
                                       LatLonPoint ll2,
                                       int ltype)
Forward project a lat/lon Line.

See Also:
forwardLine(LatLonPoint, LatLonPoint, int, int)

forwardRect

public java.util.ArrayList forwardRect(LatLonPoint ll1,
                                       LatLonPoint ll2,
                                       int ltype,
                                       int nsegs,
                                       boolean isFilled)
Forward project a rectangle.

Specified by:
forwardRect in interface Projection
Parameters:
ll1 - LatLonPoint
ll2 - LatLonPoint
ltype - LineType
nsegs - number of segments
isFilled - filled poly?
Returns:
ArrayList
See Also:
Projection.forwardPoly(float[], int, int, boolean)

forwardRect

public java.util.ArrayList forwardRect(LatLonPoint ll1,
                                       LatLonPoint ll2,
                                       int ltype,
                                       int nsegs)

forwardRect

public java.util.ArrayList forwardRect(LatLonPoint ll1,
                                       LatLonPoint ll2,
                                       int ltype)
Forward project a lat/lon Rectangle.

See Also:
forwardRect(LatLonPoint, LatLonPoint, int, int)

forwardArc

public java.util.ArrayList forwardArc(LatLonPoint c,
                                      boolean radians,
                                      float radius,
                                      float start,
                                      float extent)
Forward project an arc.

Parameters:
c - LatLonPoint center
radians - boolean radius in radians?
radius - radius in radians or decimal degrees
start - the starting angle of the arc, zero being North up. Units are dependent on radians parameter - the start paramter is in radians if radians equals true, decimal degrees if not.
extent - the angular extent angle of the arc, zero being no length. Units are dependent on radians parameter - the extent paramter is in radians if radians equals true, decimal degrees if not.

forwardArc

public java.util.ArrayList forwardArc(LatLonPoint c,
                                      boolean radians,
                                      float radius,
                                      int nverts,
                                      float start,
                                      float extent)

forwardArc

public java.util.ArrayList forwardArc(LatLonPoint c,
                                      boolean radians,
                                      float radius,
                                      int nverts,
                                      float start,
                                      float extent,
                                      int arcType)
Forward project a Lat/Lon Arc.

Arcs have the same restrictions as polys .

Specified by:
forwardArc in interface Projection
Parameters:
c - LatLonPoint center of circle
radians - radius in radians or decimal degrees?
radius - radius of circle (0 < radius < 180)
nverts - number of vertices of the circle poly.
start - the starting angle of the arc, zero being North up. Units are dependent on radians parameter - the start paramter is in radians if radians equals true, decimal degrees if not.
extent - the angular extent angle of the arc, zero being no length. Units are dependent on radians parameter - the extent paramter is in radians if radians equals true, decimal degrees if not.
arcType - type of arc to create - see java.awt.geom.Arc2D for (OPEN, CHORD, PIE). Arc2D.OPEN means that the just the points for the curved edge will be provided. Arc2D.PIE means that addition lines from the edge of the curve to the center point will be added. Arc2D.CHORD means a single line from each end of the curve will be drawn.
See Also:
Projection.forwardPoly(float[], int, int, boolean)

forwardCircle

public java.util.ArrayList forwardCircle(LatLonPoint c,
                                         boolean radians,
                                         float radius)
Forward project a circle.

Parameters:
c - LatLonPoint center
radians - boolean radius in radians?
radius - radius in radians or decimal degrees

forwardCircle

public java.util.ArrayList forwardCircle(LatLonPoint c,
                                         boolean radians,
                                         float radius,
                                         int nverts)

forwardCircle

public java.util.ArrayList forwardCircle(LatLonPoint c,
                                         boolean radians,
                                         float radius,
                                         int nverts,
                                         boolean isFilled)
Forward project a Lat/Lon Circle.

Circles have the same restrictions as polys .

Specified by:
forwardCircle in interface Projection
Parameters:
c - LatLonPoint center of circle
radians - radius in radians or decimal degrees?
radius - radius of circle (0 < radius < 180)
nverts - number of vertices of the circle poly.
isFilled - filled poly?
See Also:
Projection.forwardPoly(float[], int, int, boolean)

forwardPoly

public java.util.ArrayList forwardPoly(float[] rawllpts,
                                       int ltype,
                                       int nsegs)

forwardPoly

public java.util.ArrayList forwardPoly(float[] rawllpts,
                                       int ltype,
                                       int nsegs,
                                       boolean isFilled)
Forward project a lat/lon Poly.

Delegates to _forwardPoly(), and may do additional clipping for Java XWindows problem. Remember to specify vertices in radians!

Specified by:
forwardPoly in interface Projection
Parameters:
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?
Returns:
ArrayList of x[], y[], x[], y[], ... projected poly
See Also:
Projection.forwardRaw(float[], int, int[], int[], boolean[], int, int), LineType.Straight, LineType.Rhumb, LineType.GreatCircle

_forwardPoly

protected abstract java.util.ArrayList _forwardPoly(float[] rawllpts,
                                                    int ltype,
                                                    int nsegs,
                                                    boolean isFilled)
Forward project a lat/lon Poly. Remember to specify vertices in radians!

Parameters:
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?
Returns:
ArrayList of x[], y[], x[], y[], ... projected poly

forwardRhumbPoly

protected java.util.ArrayList forwardRhumbPoly(float[] rawllpts,
                                               int nsegs,
                                               boolean isFilled)
Forward project a rhumbline poly.

Draws rhumb lines between vertices of poly. Remember to specify vertices in radians! Check in-code comments for details about the algorithm.

Parameters:
rawllpts - float[] of lat,lon,lat,lon,... in RADIANS!
nsegs - number of segments to draw for greatcircle or rhumb lines (if < 1, this value is generated internally).
isFilled - filled poly?
Returns:
ArrayList of x[], y[], x[], y[], ... projected poly
See Also:
Projection.forwardPoly(float[], int, int, boolean)

forwardGreatPoly

protected java.util.ArrayList forwardGreatPoly(float[] rawllpts,
                                               int nsegs,
                                               boolean isFilled)
Forward project a greatcircle poly.

Draws great circle lines between vertices of poly. Remember to specify vertices in radians!

Parameters:
rawllpts - float[] of lat,lon,lat,lon,... in RADIANS!
nsegs - number of segments to draw for greatcircle or rhumb lines (if < 1, this value is generated internally).
isFilled - filled poly?
Returns:
ArrayList of x[], y[], x[], y[], ... projected poly
See Also:
Projection.forwardPoly(float[], int, int, boolean)

forwardRaster

public java.util.ArrayList forwardRaster(LatLonPoint llNW,
                                         LatLonPoint llSE,
                                         java.awt.Image image)
Forward projects a raster.

HACK: not implemented yet.

Specified by:
forwardRaster in interface Projection
Parameters:
llNW - LatLonPoint of NorthWest corner of Image
llSE - LatLonPoint of SouthEast corner of Image
image - raster image

isComplicatedLineType

public boolean isComplicatedLineType(int ltype)
Check for complicated linetypes.

This depends on the line and this projection.

Parameters:
ltype - int LineType
Returns:
boolean

doPolyDispatch

protected java.util.ArrayList doPolyDispatch(float[] rawllpts,
                                             int ltype,
                                             int nsegs,
                                             boolean isFilled)
Generates a complicated poly.

Parameters:
rawllpts - LatLonPoint[]
ltype - line type
nsegs - number of segments to draw for greatcircle or rhumb lines (if < 1, this value is generated internally).
isFilled - filled poly?
Returns:
ArrayList
See Also:
Projection.forwardPoly(float[], int, int, boolean)

pan

public void pan(float Az,
                float c)
Pan the map/projection.

Example pans:

Specified by:
pan in interface Projection
Parameters:
Az - azimuth "east of north" in decimal degrees: -180 <= Az <= 180
c - arc distance in decimal degrees

pan

public void pan(float Az)
Pan the map/projection.

Specified by:
pan in interface Projection
Parameters:
Az - azimuth "east of north" in decimal degrees: -180 <= Az <= 180

panNW

public final void panNW()
pan the map northwest.


panNW

public final void panNW(float c)

panN

public final void panN()
pan the map north.


panN

public final void panN(float c)

panNE

public final void panNE()
pan the map northeast.


panNE

public final void panNE(float c)

panE

public final void panE()
pan the map east.


panE

public final void panE(float c)

panSE

public final void panSE()
pan the map southeast.


panSE

public final void panSE(float c)

panS

public final void panS()
pan the map south.


panS

public final void panS(float c)

panSW

public final void panSW()
pan the map southwest.


panSW

public final void panSW(float c)

panW

public final void panW()
pan the map west.


panW

public final void panW(float c)

drawBackground

public abstract void drawBackground(java.awt.Graphics2D g,
                                    java.awt.Paint p)
Draw the background for the projection.

Parameters:
g - Graphics2D
p - Paint to use for the background

drawBackground

public abstract 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.


getName

public java.lang.String getName()
Get the name string of the projection.

Specified by:
getName in interface Projection

getScale

public 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.

Specified by:
getScale in interface Projection
Parameters:
ll1 - 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.


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details