org.oscim.utils.SpatialIndex Maven / Gradle / Ivy
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();
}