Proj (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.proj
Class Proj

    java.lang.Object
      com.bbn.openmap.proj.Proj

All Implemented Interfaces:
  Projection, java.io.Serializable, java.lang.Cloneable

Direct Known Subclasses:
  Cartesian, GeoProj

    public abstract class Proj

extends java.lang.Object
implements Projection, java.lang.Cloneable, java.io.Serializable

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:

- There are no assumption made as to the units of the values provided to the projection, each projection type has its own interpretation of what the values are.
- The order of coordinate parameters changes, depending on the convention of the superclass object of the one being referred to. Coordinate tuples referring to projected coordinates are generally x, y, those referring to unprojected coordinates are y, x (lat/lon).
- This class is not thread safe. If two or more threads are using the same Proj, then they could disrupt each other. Occasionally you may need to call a `set` method of this class. This might interfere with another thread that's using the same projection for `forwardPoly` or another Projection interface method. In general, you should not need to call any of the `set` methods directly, but let the MapBean do it for you.
- All the various `forwardOBJ()` methods for ArrayList graphics ultimately go through `forwardPoly()`.

See Also:
  `Cartesian`, `GeoProj`, Serialized Form

Field Summary
`protected double` | `centerX`
`protected double` | `centerY`
`protected int` | `height`
`protected double` | `maxscale`
`static int` | `MIN_HEIGHT` Minimum height of projection.
`static int` | `MIN_WIDTH` Minimum width of projection.
`protected double` | `minscale`
`protected java.lang.String` | `projID`
`protected double` | `rotationAngle` The rotation angle of the map is stored here so that non-rotating things can correct themselves.
`protected double` | `scale`
`protected Length` | `ucuom` The unprojected coordinates units of measure.
`protected int` | `width`

Constructor Summary
`Proj(java.awt.geom.Point2D center, float s, int w, int h)` Construct a projection.

Method Summary
`java.lang.Object` | `clone()` Copies this projection.
`protected abstract 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.
`boolean` | `equals(java.lang.Object o)` Test for equality.
`java.awt.geom.Point2D` | `forward(double lat, double lon)` Forward project y, x world coordinates into xy space.
`abstract java.awt.geom.Point2D` | `forward(double lat, double lon, java.awt.geom.Point2D pt)` Forward projects y, x world coordinates into XY space and returns a Point2D.
`java.awt.geom.Point2D` | `forward(float lat, float lon)` Forward project lat,lon coordinates.
`java.awt.geom.Point2D` | `forward(float lat, float lon, java.awt.geom.Point2D pt)` Forward projects y, x world coordinates into XY space and returns a Point2D.
`java.awt.geom.Point2D` | `forward(java.awt.geom.Point2D llp)` Forward project a LatLonPoint.
`java.awt.geom.Point2D` | `forward(java.awt.geom.Point2D llp, java.awt.geom.Point2D pt)` Forward projects a LatLonPoint into XY space and return a java.awt.geom.Point2D.
`java.util.ArrayList<float[]>` | `forwardLine(java.awt.geom.Point2D ll1, java.awt.geom.Point2D ll2)` Forward project a line defined by two coordinate end points.
`java.util.ArrayList<float[]>` | `forwardPoly(double[] rawllpts, boolean isFilled)` Forward project a polygon defined by the coordinates.
`java.util.ArrayList<float[]>` | `forwardPoly(float[] rawllpts, boolean isFilled)` Forward project a polygon defined by the coordinates.
`boolean` | `forwardRaw(double[] rawllpts, int rawoff, float[] xcoords, float[] ycoords, boolean[] visible, int copyoff, int copylen)` Forward project a raw array of points.
`boolean` | `forwardRaw(float[] rawllpts, int rawoff, float[] xcoords, float[] ycoords, boolean[] visible, int copyoff, int copylen)` Forward project a raw array of points.
`java.util.ArrayList<float[]>` | `forwardRect(java.awt.geom.Point2D ll1, java.awt.geom.Point2D ll2)` Forward project a rectangle.
`java.awt.Shape` | `forwardShape(java.awt.Shape shape)` Simple shape projection, doesn't take into account what kind of lines should be drawn between shape points, assumes they should be 2D lines as rendered in 2D space, not interpolated for accuracy as Great Circle/Rhumb lines on a globe..
`java.awt.geom.Point2D` | `getCenter()` Get center point of projection.
`
`<T extends java.awt.geom.Point2D> T`
` | `getCenter(T center)` Returns a center Point2D that was provided, with the location filled into the Point2D object.
`int` | `getHeight()` Get projection height.
`java.awt.geom.Point2D` | `getLowerRight()` Get the world coordinate of the lower right corner of the map.
`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.
`java.lang.String` | `getProjectionID()` Gets the projection ID used for determining equality.
`double` | `getRotationAngle()` Get the rotation setting of the view for this projection.
`float` | `getScale()` Get the scale of the projection.
`abstract 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.
`Length` | `getUcuom()` Get the unprojected coordinates units of measure.
`java.awt.geom.Point2D` | `getUpperLeft()` Get the world coordinate of the upper left corner of the map.
`int` | `getWidth()` Get projection width.
`int` | `hashCode()` Return hashcode value of projection.
`protected void` | `init()` Called after the center and scale is set in setParams, but before the scale is checked for legitimacy.
`java.awt.geom.Point2D` | `inverse(double x, double y)` Inverse project x,y coordinates.
`abstract
`<T extends java.awt.geom.Point2D> T`
` | `inverse(double x, double y, T llpt)` Inverse project x,y coordinates into world coordinates.
`java.awt.geom.Point2D` | `inverse(java.awt.geom.Point2D point)` Inverse project a Point2D from x,y space to coordinate space.
`
`<T extends java.awt.geom.Point2D> T`
` | `inverse(java.awt.geom.Point2D point, T llpt)` Inverse project a Point2D from map x/y space into world coordinates.
`java.awt.Shape` | `inverseShape(java.awt.Shape shape)` Simple shape inverse projection, converts the x,y values in the shape to the x, y values of the projection.
`boolean` | `isPlotable(double lat, double lon)` Checks if a location is plot-able.
`boolean` | `isPlotable(java.awt.geom.Point2D point)` Checks if a point is plot-able.
`Projection` | `makeClone()` Clone the projection.
`abstract void` | `pan(double Az)` Pan the map/projection.
`abstract void` | `pan(double Az, double c)` Pan the map/projection.
`void` | `panE()` pan the map east.
`void` | `panE(double c)`
`void` | `panN()` pan the map north.
`void` | `panN(double c)`
`void` | `panNE()` pan the map northeast.
`void` | `panNE(double c)`
`void` | `panNW()` pan the map northwest.
`void` | `panNW(double c)`
`void` | `panS()` pan the map south.
`void` | `panS(double c)`
`void` | `panSE()` pan the map southeast.
`void` | `panSE(double c)`
`void` | `panSW()` pan the map southwest.
`void` | `panSW(double c)`
`void` | `panW()` pan the map west.
`void` | `panW(double c)`
`void` | `setCenter(double y, double x)` Set center point of projection.
`void` | `setCenter(java.awt.geom.Point2D 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(java.awt.geom.Point2D center, float scale, int width, int height)` Sets all the projection variables at once before calling computeParameters().
`protected void` | `setProjectionID()` Sets the projection ID used for determining equality.
`void` | `setRotationAngle(double rotationAngle)` This setting is purely for informational purposes, as a way for the projection to pass along any rotation activity of the MapBean to OMGraphics.
`void` | `setScale(float s)` Set the scale of the projection.
`void` | `setUcuom(Length ucuom)` Set the unprojected coordinates units of measure.
`void` | `setWidth(int width)` Set projection width.
`java.lang.String` | `toString()` Stringify the projection.

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### 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

### width

    protected int width

### height

    protected int height

### minscale

    protected double minscale

### maxscale

    protected double maxscale

### scale

    protected double scale

### centerX

    protected double centerX

### centerY

    protected double centerY

### projID

    protected java.lang.String projID

### rotationAngle

    protected double rotationAngle

  The rotation angle of the map is stored here so that non-rotating things can correct themselves. Is not used for equality checks.

### ucuom

    protected Length ucuom

  The unprojected coordinates units of measure.

Constructor Detail

### Proj

    public Proj(java.awt.geom.Point2D center,
                float s,
                int w,
                int h)

  Construct a projection.

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

Method Detail

### 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:
    double scale value

### getMaxScale

    public float getMaxScale()

  Get the maximum scale of the projection.

  Specified by:
    `getMaxScale` in interface `Projection`
  Returns:
    double max scale value

### getMinScale

    public float getMinScale()

  Get minimum scale of the projection.

  Specified by:
    `getMinScale` in interface `Projection`
  Returns:
    double min scale value

### setCenter

    public void setCenter(java.awt.geom.Point2D pt)

  Set center point of projection.

  Parameters:
    `pt` - Point2D for center. Point2D values will be copied.

### setCenter

    public void setCenter(double y,
                          double x)

  Set center point of projection.

  Parameters:
    `y` - vertical value of center.
    `x` - horizontal value of center.

### getCenter

    public java.awt.geom.Point2D getCenter()

  Get center point of projection.

  Specified by:
    `getCenter` in interface `Projection`
  Returns:
    Point2D center of projection, created just for you.

### getCenter

    public <T extends java.awt.geom.Point2D> T getCenter(T center)

  Returns a center Point2D that was provided, with the location filled into the Point2D object. Calls Point2D.setLocation(x, y).

  Specified by:
    `getCenter` in interface `Projection`
  Parameters:
    `center` - the Point2D to fill in.
  Returns:
    center point provided.

### 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(java.awt.geom.Point2D 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

### init

    protected void init()

  Called after the center and scale is set in setParams, but before the scale is checked for legitimacy. This is an opportunity to set constants in subclasses before anything else gets called or checked for validity. This is different than computeParameters() which is called after some checks. This is a good time to pre-calculate constants and set maxscale and minscale.

  Make sure you call super.init() if you override this method.

### setProjectionID

    protected void setProjectionID()

  Sets the projection ID used for determining equality. The projection ID String is interned 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" parameters used in the forward() and inverse() calls.

### toString

    public java.lang.String toString()

  Stringify the projection.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    stringified projection
  See Also:
    `getProjectionID()`

### equals

    public boolean equals(java.lang.Object o)

  Test for equality.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `o` - Object to compare.
  Returns:
    boolean comparison

### hashCode

    public int hashCode()

  Return hashcode value of projection.

  Overrides:
    `hashCode` in class `java.lang.Object`
  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.

  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    a copy of this projection.

### forward

    public java.awt.geom.Point2D forward(java.awt.geom.Point2D llp)

  Forward project a LatLonPoint.

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

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

### forward

    public java.awt.geom.Point2D forward(java.awt.geom.Point2D llp,
                                         java.awt.geom.Point2D pt)

  Forward projects a LatLonPoint into XY space and return a java.awt.geom.Point2D.

  Specified by:
    `forward` in interface `Projection`
  Parameters:
    `llp` - LatLonPoint to be projected
    `pt` - Resulting XY Point2D
  Returns:
    Point2D pt

### forward

    public java.awt.geom.Point2D 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:
    Point2D (new)

### forward

    public java.awt.geom.Point2D forward(float lat,
                                         float lon,
                                         java.awt.geom.Point2D pt)

  Description copied from interface: `Projection`
  Forward projects y, x world coordinates into XY space and returns a Point2D.

  Specified by:
    `forward` in interface `Projection`
  Parameters:
    `lat` - float vertical location component (units depend on projection implementation).
    `lon` - float horizontal location component (units depend on projection implementation).
    `pt` - A Point2D object to load the result into, a new Point2D object will be created if this is null.
  Returns:
    Point2D The Point2D object provided (for convenience) or created with the result.

### forward

    public java.awt.geom.Point2D forward(double lat,
                                         double lon)

  Description copied from interface: `Projection`
  Forward project y, x world coordinates into xy space.

  Specified by:
    `forward` in interface `Projection`
  Parameters:
    `lat` - double vertical location component (units depend on projection implementation).
    `lon` - double horizontal location component (units depend on projection implementation).
  Returns:
    Point2D (new)

### forward

    public abstract java.awt.geom.Point2D forward(double lat,
                                                  double lon,
                                                  java.awt.geom.Point2D pt)

  Description copied from interface: `Projection`
  Forward projects y, x world coordinates into XY space and returns a Point2D.

  Specified by:
    `forward` in interface `Projection`
  Parameters:
    `lat` - double vertical location component (units depend on projection implementation).
    `lon` - double horizontal location component (units depend on projection implementation).
    `pt` - A Point2D object to load the result into, a new Point2D object will be created if this is null.
  Returns:
    Point2D The Point2D object provided (for convenience) or created with the result.

### inverse

    public <T extends java.awt.geom.Point2D> T inverse(java.awt.geom.Point2D point,
                                                       T llpt)

  Description copied from interface: `Projection`
  Inverse project a Point2D from map x/y space into world coordinates.

  Specified by:
    `inverse` in interface `Projection`
  Parameters:
    `point` - XY Point2D
    `llpt` - resulting Point2D object to load the result into, a new Point2D object will be created if this is null.
  Returns:
    Point2D Object containing result.

### inverse

    public java.awt.geom.Point2D inverse(java.awt.geom.Point2D point)

  Inverse project a Point2D from x,y space to coordinate space.

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

### inverse

    public java.awt.geom.Point2D inverse(double x,
                                         double 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(Point2D)`

### inverse

    public abstract <T extends java.awt.geom.Point2D> T inverse(double x,
                                                                double y,
                                                                T llpt)

  Description copied from interface: `Projection`
  Inverse project x,y coordinates into world coordinates.

  Specified by:
    `inverse` in interface `Projection`
  Parameters:
    `x` - integer x coordinate
    `y` - integer y coordinate
    `llpt` - Point2D to be loaded with the result. A new Point2D object will be created if this is null.
  Returns:
    Point2D llpt
  See Also:
    `inverse(Point2D)`

### inverseShape

    public java.awt.Shape inverseShape(java.awt.Shape shape)

  Simple shape inverse projection, converts the x,y values in the shape to the x, y values of the projection.

  Specified by:
    `inverseShape` in interface `Projection`
  Parameters:
    `shape` - projected shape.
  Returns:
    Shape containing source coordinates inversely projected.

### forwardShape

    public java.awt.Shape forwardShape(java.awt.Shape shape)

  Simple shape projection, doesn't take into account what kind of lines should be drawn between shape points, assumes they should be 2D lines as rendered in 2D space, not interpolated for accuracy as Great Circle/Rhumb lines on a globe..

  Specified by:
    `forwardShape` in interface `Projection`
  Parameters:
    `shape` - java.awt.Shape object to project.
  Returns:
    java.awt.Shape object defined for projection.

### forwardRaw

    public boolean forwardRaw(float[] rawllpts,
                              int rawoff,
                              float[] xcoords,
                              float[] ycoords,
                              boolean[] visible,
                              int copyoff,
                              int copylen)

  Forward project a raw array of points. This assumes nothing about the array of coordinates. In no way does it assume the points are connected or that the composite figure is to be filled.

  It does populate a visible array indicating whether the points are visible on the projected view of the world.

  Specified by:
    `forwardRaw` in interface `Projection`
  Parameters:
    `rawllpts` - array of y, x world coordinates.
    `rawoff` - offset into rawllpts.
    `xcoords` - x projected horizontal map coordinates.
    `ycoords` - y projected vertical map coordinates.
    `visible` - coordinates visible?
    `copyoff` - offset into x,y visible arrays.
    `copylen` - number of coordinates (coordinate arrays should be at least this long, rawllpts should be at least twice as long).
  Returns:
    boolean true if all points visible, false if some points not visible.

### forwardRaw

    public boolean forwardRaw(double[] rawllpts,
                              int rawoff,
                              float[] xcoords,
                              float[] ycoords,
                              boolean[] visible,
                              int copyoff,
                              int copylen)

  Forward project a raw array of points. This assumes nothing about the array of coordinates. In no way does it assume the points are connected or that the composite figure is to be filled.

  It does populate a visible array indicating whether the points are visible on the projected view of the world.

  Specified by:
    `forwardRaw` in interface `Projection`
  Parameters:
    `rawllpts` - array of y, x world coordinates.
    `rawoff` - offset into rawllpts.
    `xcoords` - x projected horizontal map coordinates.
    `ycoords` - y projected vertical map coordinates.
    `visible` - coordinates visible?
    `copyoff` - offset into x,y visible arrays.
    `copylen` - number of coordinates (coordinate arrays should be at least this long, rawllpts should be at least twice as long).
  Returns:
    boolean true if all points visible, false if some points not visible.

### forwardLine

    public java.util.ArrayList<float[]> forwardLine(java.awt.geom.Point2D ll1,
                                                    java.awt.geom.Point2D ll2)

  Description copied from interface: `Projection`
  Forward project a line defined by two coordinate end points.

  Returns a ArrayList int[] of (x[], y[]) coordinate pair(s) of the projected line(s).

  Specified by:
    `forwardLine` in interface `Projection`

### forwardRect

    public java.util.ArrayList<float[]> forwardRect(java.awt.geom.Point2D ll1,
                                                    java.awt.geom.Point2D ll2)

  Forward project a rectangle.

  Specified by:
    `forwardRect` in interface `Projection`
  Parameters:
    `ll1` - LatLonPoint
    `ll2` - LatLonPoint
  Returns:
    ArrayList

### forwardPoly

    public java.util.ArrayList<float[]> forwardPoly(float[] rawllpts,
                                                    boolean isFilled)

  Description copied from interface: `Projection`
  Forward project a polygon defined by the coordinates. The isFilled flag is only occasionally important, for certain projections in certain situations.

  Specified by:
    `forwardPoly` in interface `Projection`
  Parameters:
    `rawllpts` - a set of y, x coordinates.
    `isFilled` - true of is important to note the area of the poly, instead of just the edge.
  Returns:
    ArrayList float[] contains sets of float[]x, float[] y arrays.

### forwardPoly

    public java.util.ArrayList<float[]> forwardPoly(double[] rawllpts,
                                                    boolean isFilled)

  Description copied from interface: `Projection`
  Forward project a polygon defined by the coordinates. The isFilled flag is only occasionally important, for certain projections in certain situations.

  Specified by:
    `forwardPoly` in interface `Projection`
  Parameters:
    `rawllpts` - a set of y, x coordinates.
    `isFilled` - true of is important to note the area of the poly, instead of just the edge.
  Returns:
    ArrayList float[] contains sets of float[]x, float[] y arrays.

### pan

    public abstract void pan(double Az,
                             double c)

  Pan the map/projection.

  Example pans:

  - `pan(180, c)` pan south `c' degrees
  - `pan(-90, c)` pan west `c' degrees
  - `pan(0, c)` pan north `c' degrees
  - `pan(90, c)` pan east `c' degrees

  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 abstract void pan(double Az)

  Pan the map/projection.
  - `pan(180, c)` pan south
  - `pan(-90, c)` pan west
  - `pan(0, c)` pan north
  - `pan(90, c)` pan east

  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(double c)

### panN

    public final void panN()

  pan the map north.

### panN

    public final void panN(double c)

### panNE

    public final void panNE()

  pan the map northeast.

### panNE

    public final void panNE(double c)

### panE

    public final void panE()

  pan the map east.

### panE

    public final void panE(double c)

### panSE

    public final void panSE()

  pan the map southeast.

### panSE

    public final void panSE(double c)

### panS

    public final void panS()

  pan the map south.

### panS

    public final void panS(double c)

### panSW

    public final void panSW()

  pan the map southwest.

### panSW

    public final void panSW(double c)

### panW

    public final void panW()

  pan the map west.

### panW

    public final void panW(double c)

### isPlotable

    public boolean isPlotable(double lat,
                              double lon)

  Description copied from interface: `Projection`
  Checks if a location is plot-able.

  Call 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).

  Specified by:
    `isPlotable` in interface `Projection`
  Parameters:
    `lat` - vertical location component (units depend on the projection implementation).
    `lon` - horizontal location component (units depend on the projection implementation).
  Returns:
    boolean true of plotable.

### isPlotable

    public boolean isPlotable(java.awt.geom.Point2D point)

  Description copied from interface: `Projection`
  Checks if a point is plot-able.

  Call this to check and see if a point can be plotted. This is meant to be used for checking before projecting and rendering Point2D objects (bitmaps or text objects tacked at a specific location, for instance).

  Specified by:
    `isPlotable` in interface `Projection`
  Parameters:
    `point` - Point2D
  Returns:
    boolean

### drawBackground

    public void drawBackground(java.awt.Graphics2D g,
                               java.awt.Paint paint)

  Draw the background for the projection.

  Parameters:
    `g` - Graphics2D
    `paint` - java.awt.Paint to use for the background

### drawBackground

    public void drawBackground(java.awt.Graphics g)

  Draw the background for the projection. Assume that the Graphics has been set with the Paint/Color needed, just render the shape of the background.

  Parameters:
    `g` - Graphics

### getName

    public java.lang.String getName()

  Get the name string of the projection.

  Specified by:
    `getName` in interface `Projection`

### getScale

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

  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.geom.Point2D reflecting a pixel spot on the projection that matches the ll1 coordinate, the upper left corner of the area of interest. Note that this is the location where you want ll1 to go in the new projection scale, not where it is now.
    `point2` - a java.awt.geom.Point2D reflecting a pixel spot on the projection that matches the ll2 coordinate, usually the lower right corner of the area of interest. Note that this is the location where you want ll2 to go in the new projection, not where it is now.

### getUcuom

    public Length getUcuom()

  Get the unprojected coordinates units of measure.

  Specified by:
    `getUcuom` in interface `Projection`
  Returns:
    Length. May be null if unknown.
  See Also:
    `Length`

### setUcuom

    public void setUcuom(Length ucuom)

  Set the unprojected coordinates units of measure.

  Parameters:
    `ucuom` -

### getUpperLeft

    public java.awt.geom.Point2D getUpperLeft()

  Get the world coordinate of the upper left corner of the map.

  Specified by:
    `getUpperLeft` in interface `Projection`
  Returns:
    Point2D

### getLowerRight

    public java.awt.geom.Point2D getLowerRight()

  Get the world coordinate of the lower right corner of the map.

  Specified by:
    `getLowerRight` in interface `Projection`
  Returns:
    Point2D

### getRotationAngle

    public double getRotationAngle()

  Description copied from interface: `Projection`
  Get the rotation setting of the view for this projection. Provided here so that map objects manage their orientation if they want.

  Specified by:
    `getRotationAngle` in interface `Projection`
  Returns:
    the rotationAngle

### setRotationAngle

    public void setRotationAngle(double rotationAngle)

  This setting is purely for informational purposes, as a way for the projection to pass along any rotation activity of the MapBean to OMGraphics. Setting this value will not rotate the map. Rotating the map should be done directly to the MapBean.

  Parameters:
    `rotationAngle` - the rotationAngle to set, in RADIANS

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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