org.oscim.utils.SpatialIndex Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vtm Show documentation
Show all versions of vtm Show documentation
OpenGL vector map library written in Java - running on Android, iOS, Desktop and within the browser.
package org.oscim.utils;
import org.oscim.core.Box;
import org.oscim.core.Point;
import java.util.List;
public interface SpatialIndex {
public interface SearchCb {
/**
* TODO should be able to return 'continue', 'stop',
* 'remove-current'
*
* @return false to stop search
*/
boolean call(T item, Object context);
}
public void insert(Box box, T item);
public boolean remove(Box box, T item);
public List search(Box bbox, List results);
public boolean search(Box bbox, SearchCb cb, Object context);
public List searchKNearestNeighbors(Point center, int k, double maxDistance, List results);
public void searchKNearestNeighbors(Point center, int k, double maxDistance, SearchCb cb, Object context);
public int size();
public void clear();
}