## com.bbn.openmap.proj
Class Conic

    java.lang.Object
      |
      +--com.bbn.openmap.proj.Proj
            |
            +--com.bbn.openmap.proj.Conic

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

Direct Known Subclasses:
  LambertConformalConic

public abstract class Conic
extends Proj

Base of all conic projections.

See Also:
  `LambertConformalConic`, `MassStatePlane`, Serialized Form

Field 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

### origin

    protected LatLonPoint origin

### parallel1

    protected LatLonPoint parallel1

### parallel2

    protected LatLonPoint parallel2

### eastBorder

    protected float eastBorder

### westBorder

    protected float westBorder

### northBorder

    protected float northBorder

### southBorder

    protected float southBorder

### backgroundColor

    protected static java.awt.Color backgroundColor

Constructor Detail

### Conic

    public Conic(LatLonPoint center,
                 float scale,
                 int width,
                 int height,
                 int type)

  Construct a conic projection.

Parameters:
  `center` - LatLonPoint center of projection
  `scale` - float scale of projection
  `width` - width of screen
  `height` - height of screen
  `type` - projection type

Method Detail

### toString

    public java.lang.String toString()

  Return stringified description of this projection.

  Overrides:
    `toString` in class `Proj`
  Returns:
    String
  See Also:
    `Projection.getProjectionID()`

### computeParameters

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

  Specified by:
    `computeParameters` in class `Proj`

### setBorders

    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.

  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.

  Parameters:
    `north` - float latitude in decimal degrees
    `east` - float longitude in decimal degrees
    `south` - float latitude in decimal degrees
    `west` - float longitude in decimal degrees

### setCenter

    public void setCenter(float lat,
                          float lon)

  Checks the border parameters to make sure the coordinates make sense for the version of the plane used.

  Overrides:
    `setCenter` in class `Proj`
  Parameters:
    `lat` - float latitude in decimal degrees
    `lon` - float longitude in decimal degrees

### forwardRaw

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

  Forward project a raw array of radian 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.

  Parameters:
    `rawllpts` - array of lat,lon,... in radians
    `rawoff` - offset into rawllpts
    `xcoords` - x coordinates
    `ycoords` - y 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.

### _forwardPoly

    protected java.util.Vector _forwardPoly(float[] rawllpts,
                                            int ltype,
                                            int nsegs,
                                            boolean isFilled)

  Forward project a lat/lon Poly. Remember to specify vertices in radians!

  Specified by:
    `_forwardPoly` in class `Proj`
  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? this is currently ignored for cylindrical projections.
  Returns:
    Vector of x[], y[], x[], y[], ... projected poly

### drawBackground

    public void drawBackground(java.awt.Graphics g)

  Draw the background for the projection.

  Specified by:
    `drawBackground` in class `Proj`
  Parameters:
    `g` - Graphics

### getName

    public java.lang.String getName()

  Get the name string of the projection.

  Specified by:
    `getName` in interface `Projection`
  Overrides:
    `getName` in class `Proj`

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