## com.bbn.openmap.util
Interface DataOrganizer

All Known Implementing Classes:
  QuadTree

public interface DataOrganizer

The DataOrganizer lets you organize objects in a way that will let you retrieve them based on a geographic query. It's an interface that lets you decide, with an implementation, the best way to manage and retrieve your data.

Method Summary
`void` `clear()` Clear the organizer.
`java.lang.Object` `get(float lat, float lon)` Find an object closest to a lat/lon.
`java.lang.Object` `get(float lat, float lon, double withinDistance)` Find an object closest to a lat/lon, within a given maximum.
`java.util.Vector` `get(float north, float west, float south, float east)` Find all the objects within a bounding box.
`boolean` `put(float lat, float lon, java.lang.Object obj)` Add a object into the organizer at a location.
`java.lang.Object` `remove(float lat, float lon, java.lang.Object obj)` Remove a object out of the organizer at a location.

Method Detail

### put

    public boolean put(float lat,
                       float lon,
                       java.lang.Object obj)

  Add a object into the organizer at a location.

  Parameters:
    `lat` - up-down location (latitude, y)
    `lon` - left-right location (longitude, x)
  Returns:
    true if the insertion worked.

### remove

    public java.lang.Object remove(float lat,
                                   float lon,
                                   java.lang.Object obj)

  Remove a object out of the organizer at a location.

  Parameters:
    `lat` - up-down location (latitude, y)
    `lon` - left-right location (longitude, x)
  Returns:
    the object removed, null if the object not found.

### clear

    public void clear()

  Clear the organizer.

### get

    public java.lang.Object get(float lat,
                                float lon)

  Find an object closest to a lat/lon.

  Parameters:
    `lat` - up-down location in QuadTree Grid (latitude, y)
    `lon` - left-right location in QuadTree Grid (longitude, x)
  Returns:
    the object that is closest to the lat/lon.

### get

    public java.lang.Object get(float lat,
                                float lon,
                                double withinDistance)

  Find an object closest to a lat/lon, within a given maximum.

  Parameters:
    `lat` - up-down location in QuadTree Grid (latitude, y)
    `lon` - left-right location in QuadTree Grid (longitude, x)
    `withinDistance` - maximum distance to have a hit.
  Returns:
    the object that is closest to the lat/lon, within the given distance.

### get

    public java.util.Vector get(float north,
                                float west,
                                float south,
                                float east)

  Find all the objects within a bounding box.

  Parameters:
    `north` - top location in QuadTree Grid (latitude, y)
    `west` - left location in QuadTree Grid (longitude, x)
    `south` - lower location in QuadTree Grid (latitude, y)
    `east` - right location in QuadTree Grid (longitude, x)
  Returns:
    Vector of objects.

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