PolygonGeometry.Offset (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.omGraphics.geom
Class PolygonGeometry.Offset

    java.lang.Object
      com.bbn.openmap.omGraphics.geom.BasicGeometry
          com.bbn.openmap.omGraphics.geom.PolygonGeometry
              com.bbn.openmap.omGraphics.geom.PolygonGeometry.XY
                  com.bbn.openmap.omGraphics.geom.PolygonGeometry.Offset

All Implemented Interfaces:
  OMGeometry, OMGraphicConstants, java.io.Serializable

Direct Known Subclasses:
  PolylineGeometry.Offset

Enclosing class:
  PolygonGeometry

    public static class PolygonGeometry.Offset

extends PolygonGeometry.XY

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class com.bbn.openmap.omGraphics.geom.PolygonGeometry
`PolygonGeometry.LL, PolygonGeometry.Offset, PolygonGeometry.XY`

Field Summary
`protected int` | `coordMode` Type of offset.
`static int` | `COORDMODE_ORIGIN` Translation offsets.
`static int` | `COORDMODE_PREVIOUS` Delta offsets.
`protected double` | `lat` The latitude of the starting point of the poly.
`protected double` | `lon` The longitude of the starting point of the poly.

Fields inherited from class com.bbn.openmap.omGraphics.geom.PolygonGeometry.XY
`xs, ys`

Fields inherited from class com.bbn.openmap.omGraphics.geom.PolygonGeometry
`doShapes, isPolygon, xpoints, ypoints`

Fields inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry
`attributes, lineType, needToRegenerate, shape, visible`

Fields inherited from interface com.bbn.openmap.omGraphics.OMGraphicConstants
`ADD_GRAPHIC_MASK, APP_OBJECT, BASIC_STROKE, CHANGE_APPEARANCE, clear, DECIMAL_DEGREES, DECLUTTERTYPE_LINE, DECLUTTERTYPE_MOVE, DECLUTTERTYPE_NONE, DECLUTTERTYPE_SPACE, DEFAULT_ROTATIONANGLE, DELETE_GRAPHIC_MASK, DESELECT_GRAPHIC_MASK, DESELECTALL_GRAPHIC_MASK, GRAPHICTYPE_ARC, GRAPHICTYPE_BITMAP, GRAPHICTYPE_CIRCLE, GRAPHICTYPE_ELLIPSE, GRAPHICTYPE_GRAPHIC, GRAPHICTYPE_GRID, GRAPHICTYPE_LINE, GRAPHICTYPE_POINT, GRAPHICTYPE_POLY, GRAPHICTYPE_RASTER, GRAPHICTYPE_RECTANGLE, GRAPHICTYPE_TEXT, INDEX, INFOLINE, LABEL, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, LINETYPE_STRAIGHT, LINETYPE_UNKNOWN, LOWER_GRAPHIC_MASK, LOWER_TO_BOTTOM_GRAPHIC_MASK, NO_ROTATE, OMGRAPHIC_ELT, OMGRAPHIC_TYPE_ATTR, RADIANS, RAISE_GRAPHIC_MASK, RAISE_TO_TOP_GRAPHIC_MASK, REMOVABLE, RENDERTYPE_LATLON, RENDERTYPE_OFFSET, RENDERTYPE_UNKNOWN, RENDERTYPE_XY, SELECT_GRAPHIC_MASK, SORT_GRAPHICS_MASK, TOOLTIP, UPDATE_GRAPHIC_MASK, UPDATED`

Constructor Summary
`PolygonGeometry.Offset(double latPoint, double lonPoint, float[] xPoints, float[] yPoints, int cMode)` Create an x/y OMPoly at an offset from lat/lon.
`PolygonGeometry.Offset(double latPoint, double lonPoint, float[] xypoints, int cMode)` Create an x/y OMPoly at an offset from lat/lon.

Method Summary
`boolean` | `generate(Projection proj)` Prepare the geometry for rendering.
`int` | `getCoordMode()` Type of offset.
`double` | `getLat()` Get the latitude of the offset point, in decimal degrees.
`double` | `getLon()` Get the longitude of the offset point, in decimal degrees.
`int` | `getRenderType()` Return the render type.
`void` | `setCoordMode(int coordMode)` Type of offset.
`void` | `setLat(double lat)` Set the latitude of the offset point, in decimal degrees.
`void` | `setLocation(double latPoint, double lonPoint, int units, float[] xypoints)` Set the location based on a latitude, longitude, and some xy points.
`void` | `setLocation(double latPoint, double lonPoint, int units, float[] xPoints, float[] yPoints)` Set the location based on a latitude, longitude, and some xy points.
`void` | `setLon(double lon)` Set the longitude of the offset point, in decimal degrees.

Methods inherited from class com.bbn.openmap.omGraphics.geom.PolygonGeometry.XY
`createShape, getXs, getYs, setLocation, setLocation, setXs, setYs`

Methods inherited from class com.bbn.openmap.omGraphics.geom.PolygonGeometry
`distance, getDoShapes, getIsPolygon, getShape, setDoShapes, setIsPolygon`

Methods inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry
`_distance, appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, clearAttributes, contains, createAttributeMap, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, deselect, distanceToEdge, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, isRenderable, isRenderable, isVisible, putAttribute, regenerate, removeAttribute, render, restore, select, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape, setVisible`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.bbn.openmap.omGraphics.OMGeometry
`clearAttributes, contains, deselect, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, isRenderable, isRenderable, isVisible, putAttribute, regenerate, removeAttribute, render, restore, select, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape, setVisible`

Field Detail

### COORDMODE_ORIGIN

    public static final int COORDMODE_ORIGIN

  Translation offsets. The xy points are relative to the position of fixed latlon point.

  See Also:
    Constant Field Values

### COORDMODE_PREVIOUS

    public static final int COORDMODE_PREVIOUS

  Delta offsets. Each xy point in the array is relative to the previous point, and the first point is relative to the fixed latlon point.

  See Also:
    Constant Field Values

### lat

    protected double lat

  The latitude of the starting point of the poly. Stored as radians!

### lon

    protected double lon

  The longitude of the starting point of the poly. Stored as radians!

### coordMode

    protected int coordMode

  Type of offset.

  See Also:
    `COORDMODE_ORIGIN`, `COORDMODE_PREVIOUS`

Constructor Detail

### PolygonGeometry.Offset

    public PolygonGeometry.Offset(double latPoint,
                                  double lonPoint,
                                  float[] xypoints,
                                  int cMode)

  Create an x/y OMPoly at an offset from lat/lon. If you want the poly to be connected, you need to ensure that the first and last coordinate pairs are the same.

  Parameters:
    `latPoint` - latitude in decimal degrees
    `lonPoint` - longitude in decimal degrees
    `xypoints` - float[] of x,y pairs
    `cMode` - offset coordinate mode

### PolygonGeometry.Offset

    public PolygonGeometry.Offset(double latPoint,
                                  double lonPoint,
                                  float[] xPoints,
                                  float[] yPoints,
                                  int cMode)

  Create an x/y OMPoly at an offset from lat/lon. If you want the poly to be connected, you need to ensure that the first and last coordinate pairs are the same.

  Parameters:
    `latPoint` - latitude in decimal degrees
    `lonPoint` - longitude in decimal degrees
    `xPoints` - float[] of x coordinates
    `yPoints` - float[] of y coordinates
    `cMode` - offset coordinate mode

Method Detail

### setLocation

    public void setLocation(double latPoint,
                            double lonPoint,
                            int units,
                            float[] xypoints)

  Set the location based on a latitude, longitude, and some xy points. The coordinate mode and the polygon setting are the same as in the constructor used.

  Parameters:
    `latPoint` - latitude in decimal degrees.
    `lonPoint` - longitude in decimal degrees.
    `units` - radians or decimal degrees. Use OMGraphic.RADIANS or OMGraphic.DECIMAL_DEGREES
    `xypoints` - array of x/y points, arranged x, y, x, y, etc.

### setLocation

    public void setLocation(double latPoint,
                            double lonPoint,
                            int units,
                            float[] xPoints,
                            float[] yPoints)

  Set the location based on a latitude, longitude, and some xy points. The coordinate mode and the polygon setting are the same as in the constructor used.

  Parameters:
    `latPoint` - latitude in decimal degrees
    `lonPoint` - longitude in decimal degrees
    `units` - radians or decimal degrees. Use OMGraphic.RADIANS or OMGraphic.DECIMAL_DEGREES
    `xPoints` - float[] of x coordinates
    `yPoints` - float[] of y coordinates

### setCoordMode

    public void setCoordMode(int coordMode)

  Type of offset.

  See Also:
    `COORDMODE_ORIGIN`, `COORDMODE_PREVIOUS`

### getCoordMode

    public int getCoordMode()

  Type of offset.

  See Also:
    `COORDMODE_ORIGIN`, `COORDMODE_PREVIOUS`

### setLat

    public void setLat(double lat)

  Set the latitude of the offset point, in decimal degrees.

### getLat

    public double getLat()

  Get the latitude of the offset point, in decimal degrees.

### setLon

    public void setLon(double lon)

  Set the longitude of the offset point, in decimal degrees.

### getLon

    public double getLon()

  Get the longitude of the offset point, in decimal degrees.

### generate

    public boolean generate(Projection proj)

  Description copied from class: `BasicGeometry`
  Prepare the geometry for rendering. This must be done before calling `render()`! If a vector graphic has lat-lon components, then we project these vertices into x-y space. For raster graphics we prepare in a different fashion.

  If the generate is unsuccessful, it's usually because of some oversight, (for instance if `proj` is null), and if debugging is enabled, a message may be output to the controlling terminal.

  Specified by:
    `generate` in interface `OMGeometry`
  Overrides:
    `generate` in class `PolygonGeometry.XY`
  Parameters:
    `proj` - Projection
  Returns:
    boolean true if successful, false if not.
  See Also:
    `BasicGeometry.regenerate(com.bbn.openmap.proj.Projection)`

### getRenderType

    public int getRenderType()

  Description copied from class: `BasicGeometry`
  Return the render type.

  Specified by:
    `getRenderType` in interface `OMGeometry`
  Overrides:
    `getRenderType` in class `PolygonGeometry.XY`
  Returns:
    the rendertype of the object - RENDERTYPE_LATLON, RENDERTYPE_XY, RENDERTYPE_OFFSET and RENDERTYPE_UNKNOWN.

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