PolylineGeometry (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 PolylineGeometry

    java.lang.Object
      com.bbn.openmap.omGraphics.geom.BasicGeometry
          com.bbn.openmap.omGraphics.geom.PolygonGeometry
              com.bbn.openmap.omGraphics.geom.PolylineGeometry

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

    public abstract class PolylineGeometry

extends PolygonGeometry
implements java.io.Serializable, OMGeometry

Graphic object that represents a polygon.

All of the OMGraphics are moving to having their internal representation as java.awt.Shape objects. Unfortunately, this has the side effect of slowing OMPolys down, because the way that the projection classes handle transformations cause more objects to be allocated and more loops to be run through. So, by default, the OMPoly does NOT use Shape objects internally, to keep layers that throw down many, many polys running quickly. If you want to do some spatial analysis on an OMPoly, call setDoShapes(true) on it, then generate(Projection), and then call getShapes() to get the java.awt.Shape objects for the poly. You can then run the different Shape spatial analysis methods on the Shape objects.

### NOTES:

- See the RESTRICTIONS on Lat/Lon polygons/polylines. Not following the guidelines listed may result in ambiguous/undefined shapes! Similar assumptions apply to the other vector graphics that we define: circles, ellipses, rects, lines.
- LatLon OMPolys store latlon coordinates internally in radian format for efficiency in projecting. Subclasses should follow this model.
- Holes in the poly are not supported. If you want holes, use multiple PolyGeometrys in a OMGeometryList.

### TODO:

- Polar filled-polygon correction for Cylindrical projections (like OMCircle).

See Also:
  Serialized Form

Nested Class Summary
`static class` | `PolylineGeometry.LL`
`static class` | `PolylineGeometry.Offset`
`static class` | `PolylineGeometry.XY`

Field Summary

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
`PolylineGeometry()`

Method Summary
`float` | `distance(double x, double y)` Return the shortest distance from the graphic to an XY-point.

Methods inherited from class com.bbn.openmap.omGraphics.geom.PolygonGeometry
`createShape, 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, generate, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, getRenderType, 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, generate, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, getRenderType, getShape, isRenderable, isRenderable, isVisible, putAttribute, regenerate, removeAttribute, render, restore, select, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape, setVisible`

Constructor Detail

### PolylineGeometry

    public PolylineGeometry()

Method Detail

### distance

    public float distance(double x,
                          double y)

  Return the shortest distance from the graphic to an XY-point. This works if generate() has been successful.

  Specified by:
    `distance` in interface `OMGeometry`
  Overrides:
    `distance` in class `PolygonGeometry`
  Parameters:
    `x` - horizontal pixel location.
    `y` - vertical pixel location.
  Returns:
    the distance of the object to the location given.

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