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.geo
Class ConvexHull

    java.lang.Object
      com.bbn.openmap.geo.ConvexHull

public class ConvexHull
extends java.lang.Object

This class contains static methods that can be used to create convex hull GeoRegions from arrays of Geos. The only algorithm implemented is Graham's, where the highest point is selected (called the pivot), the other points are sorted according to their relative azimuths from the pivot, and then a path is created around the other points. Any right turn encountered traversing the points means that point should be skipped when creating the convex hull.

Author:
  dietrick

Nested Class Summary
`protected static class` | `ConvexHull.PivotAngleComparator`

Method Summary
`protected static Geo` | `findHighest(Geo[] geos)`
`static GeoRegion` | `getRegion(Geo[] geos)` Using Graham's scan.
`static Geo[]` | `hull(Geo[] geos)` Using Graham's scan.

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

Method Detail

### getRegion

    public static final GeoRegion getRegion(Geo[] geos)

  Using Graham's scan.

  Parameters:
    `geos` -
  Returns:
    GeoRegion outlining the convex hull of the geos

### hull

    public static final Geo[] hull(Geo[] geos)

  Using Graham's scan.

  Parameters:
    `geos` -
  Returns:
    a convex hull of the geos

### findHighest

    protected static Geo findHighest(Geo[] geos)

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