public class IndexedFeatureCollection extends FeatureCollectionWrapper
Constructor and Description |
---|
IndexedFeatureCollection(FeatureCollection fc)
Constructs an IndexedFeatureCollection wrapping the given FeatureCollection
and using the default spatial index.
|
IndexedFeatureCollection(FeatureCollection fc,
com.vividsolutions.jts.index.SpatialIndex spatialIndex)
Constructs an IndexedFeatureCollection wrapping the given FeatureCollection
and using the given empty spatial index.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Feature feature)
Adds a feature to this collection.
|
void |
addAll(java.util.Collection features)
Adds multiple features to this collection.
|
java.util.List |
query(com.vividsolutions.jts.geom.Envelope env)
A quick search for features, using an envelope comparison.
|
java.util.Collection |
remove(com.vividsolutions.jts.geom.Envelope env)
Removes the features which intersect the given envelope
|
void |
remove(Feature feature)
Removes a feature from this collection.
|
void |
removeAll(java.util.Collection features)
Removes multiple features from this collection.
|
checkNotWrappingSameClass, clear, getEnvelope, getFeatureCollection, getFeatures, getFeatureSchema, getUltimateWrappee, getWrappee, hasWrapper, isEmpty, iterator, setFeatureCollection, size
public IndexedFeatureCollection(FeatureCollection fc)
public IndexedFeatureCollection(FeatureCollection fc, com.vividsolutions.jts.index.SpatialIndex spatialIndex)
public void add(Feature feature)
FeatureCollection
add
in interface FeatureCollection
add
in class FeatureCollectionWrapper
feature
- a Feature to add to the end of this collectionpublic void remove(Feature feature)
FeatureCollection
remove
in interface FeatureCollection
remove
in class FeatureCollectionWrapper
feature
- a Feature to remove from this collectionpublic java.util.List query(com.vividsolutions.jts.geom.Envelope env)
FeatureCollection
query
in interface FeatureCollection
query
in class FeatureCollectionWrapper
env
- the envelope to query againstpublic void addAll(java.util.Collection features)
FeatureCollection
addAll
in interface FeatureCollection
addAll
in class FeatureCollectionWrapper
public java.util.Collection remove(com.vividsolutions.jts.geom.Envelope env)
FeatureCollection
remove
in interface FeatureCollection
remove
in class FeatureCollectionWrapper
public void removeAll(java.util.Collection features)
FeatureCollection
removeAll
in interface FeatureCollection
removeAll
in class FeatureCollectionWrapper