com.bbn.openmap.dataAccess.shape
Class ShapeGeoIndex
java.lang.Object
java.util.AbstractCollection
com.bbn.openmap.geo.ExtentIndex.AbstractExtentIndex
com.bbn.openmap.geo.ExtentIndex.ArrayListExtentIndexImpl
com.bbn.openmap.dataAccess.shape.ShapeGeoIndex
- All Implemented Interfaces:
- ExtentIndex, java.lang.Iterable, java.util.Collection
public class ShapeGeoIndex
- extends ExtentIndex.ArrayListExtentIndexImpl
A GeoExtentIndex that knows how to work with Shape files. Plots the shape
file contents in memory in lat/lon space, can then be used with the
Intersection class to do spatial analysis on the shape file contents.
- Author:
- ddietrick
Methods inherited from class com.bbn.openmap.geo.ExtentIndex.AbstractExtentIndex |
add, addExtent, bucketFor, clear, indexHorizontalRange, iterator, iterator, lookup, lookup, lookupByBoundingCircle, lookupByPath, lookupBySegment, makeBucket, normalizeLon, normalizeLons, removeExtent, size, toString |
Methods inherited from class java.util.AbstractCollection |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
addAll, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray |
omgraphics
protected java.util.HashMap<java.lang.Object,OMGraphic> omgraphics
getForID
public OMGraphic getForID(java.lang.Object id)
- After you test for intersections with some GeoExtent, you get an iterator of GeoExtents. You can get the ID
from each of those, which will in turn allow you to ask for the OMGraphic representing the shape from the given
file. The ID is an integer index into the shape file and attribute dbf file, btw.
- Parameters:
id
- The id provided by the extent in the intersection test.
- Returns:
- OMGraphic or null (if not found).
load
public void load(EsriGraphicList list)
getIntersections
public java.util.Iterator getIntersections(GeoExtent extent)
- Get an iterator with all of the objects in this ShapeGeoIndex that
intersect with the given extent.
- Parameters:
extent
- GeoExtent (GeoPoint, GeoPath, GeoRegion) to test against.
- Returns:
- Iterator over intersecting shape objects.
getIntersections
public java.util.Iterator getIntersections(GeoExtent extent,
MatchFilter filter,
MatchCollector collector)
- Get an iterator with all of the objects in this ShapeGeoIndex that
intersect with the given extent.
- Parameters:
extent
- GeoExtext (GeoPoint, GeoPath, GeoRegion) to test against.filter
- MatchFilter a MatchFilter can eliminatecollector
-
- Returns:
- Iterator over intersecting shape objects.
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details