GeoArray (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.geo
Interface GeoArray

All Known Subinterfaces:
  GeoArray.Mutable

All Known Implementing Classes:
  GeoArray.Adapter, GeoArray.Double, GeoArray.Float

    public interface GeoArray

A GeoArray is a interface that represents a set of Geo information. Rather than keeping a set of Geo[] around and managing the memory for all of those objects, the GeoArray provides an object that just holds onto the coordinates of those points.

Author:
  dietrick

Nested Class Summary
`static class` | `GeoArray.Adapter` An abstract parent implementation class of GeoArray that handles common methods.
`static class` | `GeoArray.Double` An implementation of GeoArray and GeoArray.Mutable that contains double-precision values.
`static class` | `GeoArray.Float` An implementation of GeoArray and GeoArray.Mutable that contains float-precision values.
`static interface` | `GeoArray.Mutable` A Mutable GeoArray is one where the points can be modified.

Method Summary
`double` | `area()` Compute the area of the GeoArray polygon on the surface of a unit sphere given an enumeration of its point.
`void` | `closeArray()` Ensure that the Geo array starts and ends with the same values.
`double` | `distance(Geo geo, Geo closestPoint)` Returns the perpendicular distance to the closest point on the edge of the polygon.
`boolean` | `equals(int index, Geo comp)`
`Geo` | `get(int i)` Get a Geo represented by the index i.
`Geo` | `get(int i, Geo ret)` Load the values for Geo at index i into ret.
`int` | `getSize()` Get the number of Geo points represented by this array.
`void` | `removeDups()` Modify, if needed, the Geo array with the duplicates removed.
`double[]` | `toLLDegrees()` Convert the GeoArray to an array of decimal degree values, alternating lat, lon, lat, lon.
`double[]` | `toLLRadians()` Convert the GeoArray to an array of radian values, alternating lat, lon, lat, lon.
`Geo[]` | `toPointArray()` Convert the GeoArray to an array of Geos.

Method Detail

### get

    Geo get(int i)

  Get a Geo represented by the index i.

  Parameters:
    `i` -
  Returns:
    Geo at index i

### get

    Geo get(int i,
            Geo ret)

  Load the values for Geo at index i into ret.

  Parameters:
    `i` -
    `ret` -
  Returns:
    ret filled in with values at index i

### getSize

    int getSize()

  Get the number of Geo points represented by this array.

  Returns:
    number of geo points

### toPointArray

    Geo[] toPointArray()

  Convert the GeoArray to an array of Geos.

  Returns:
    Geo array from values

### toLLDegrees

    double[] toLLDegrees()

  Convert the GeoArray to an array of decimal degree values, alternating lat, lon, lat, lon.

  Returns:
    lat,lon array representing decimal degrees of points.

### toLLRadians

    double[] toLLRadians()

  Convert the GeoArray to an array of radian values, alternating lat, lon, lat, lon.

  Returns:
    lat, lon array representing radians for points.

### equals

    boolean equals(int index,
                   Geo comp)

  Parameters:
    `index` - the index of the Geo in the GeoArray to compare.
    `comp` - the Geo to compare to the indexed value.
  Returns:
    true of x, y, and z of the Geos match.

### distance

    double distance(Geo geo,
                    Geo closestPoint)

  Returns the perpendicular distance to the closest point on the edge of the polygon.

  Parameters:
    `geo` - the point to test against the poly
    `closestPoint` - will be filled with location of poly edge point closest to geo.
  Returns:
    the distance in radians

### area

    double area()

  Compute the area of the GeoArray polygon on the surface of a unit sphere given an enumeration of its point. For a non unit sphere, multiply this by the radius of sphere squared.

  Returns:
    area value.

### closeArray

    void closeArray()

  Ensure that the Geo array starts and ends with the same values. Will replace the current coord array with one three floats longer if needed.

### removeDups

    void removeDups()

  Modify, if needed, the Geo array with the duplicates removed.

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