Interface FeatureCollection
- All Known Implementing Classes:
CachingFeatureCollection, DynamicFeatureCollection, FeatureCollectionWrapper, FeatureDataset, IndexedFeatureCollection, ObservableFeatureCollection, OneItemFeatureCollection, PirolFeatureCollection, ThreadSafeFeatureCollectionWrapper
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a feature to this collection.voidaddAll(Collection<Feature> features) Adds multiple features to this collection.voidclear()Removes all features from this collection.org.locationtech.jts.geom.EnvelopeReturns the bounds of this collection.Returns an unmodifiable List of the features in this collectionReturns information about this FeatureCollectionbooleanisEmpty()Returns whether this collection has no features.iterator()Returns an Iterator over the featuresquery(org.locationtech.jts.geom.Envelope envelope) A quick search for features, using an envelope comparison.voidRemoves a feature from this collection.remove(org.locationtech.jts.geom.Envelope env) Removes the features which intersect the given envelopevoidremoveAll(Collection<Feature> features) Removes multiple features from this collection.intsize()Returns the number of features in this collection.Methods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
getFeatureSchema
FeatureSchema getFeatureSchema()Returns information about this FeatureCollection- Returns:
- the types of the attributes of the features in this collection
-
getEnvelope
org.locationtech.jts.geom.Envelope getEnvelope()Returns the bounds of this collection.- Returns:
- the smallest Envelope enclosing all the Features in this collection
-
size
int size()Returns the number of features in this collection.- Returns:
- the number of features in this collection
-
isEmpty
boolean isEmpty()Returns whether this collection has no features.- Returns:
- whether or not the size of this collection is 0
-
getFeatures
-
iterator
-
query
-
add
Adds a feature to this collection.- Parameters:
feature- a Feature to add to the end of this collection
-
addAll
Adds multiple features to this collection. To be preferred over #add for adding multiple features, because in some systems (like the JUMP Workbench) fewer events will be fired. -
removeAll
Removes multiple features from this collection. To be preferred over #remove for removing multiple features, because in some systems (like the JUMP Workbench) fewer events will be fired. -
remove
Removes a feature from this collection.- Parameters:
feature- a Feature to remove from this collection
-
clear
void clear()Removes all features from this collection. -
remove
Removes the features which intersect the given envelope- Returns:
- the removed features
-