Interface FeatureCollection
-
- All Known Implementing Classes:
FeatureCollectionWrapper
,FeatureDataset
,IndexedFeatureCollection
,ObservableFeatureCollection
,OneItemFeatureCollection
public interface FeatureCollection
A collection of Features, with a special method for querying the Features that lie within a given Envelope.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(Feature feature)
Adds a feature to this collection.void
addAll(Collection features)
Adds multiple features to this collection.void
clear()
Removes all features from this collection.org.locationtech.jts.geom.Envelope
getEnvelope()
Returns the bounds of this collection.List
getFeatures()
Returns an unmodifiable List of the features in this collectionFeatureSchema
getFeatureSchema()
Returns information about this FeatureCollectionboolean
isEmpty()
Returns whether this collection has no features.Iterator
iterator()
Returns an Iterator over the featuresList
query(org.locationtech.jts.geom.Envelope envelope)
A quick search for features, using an envelope comparison.Collection
remove(org.locationtech.jts.geom.Envelope env)
Removes the features which intersect the given envelopevoid
remove(Feature feature)
Removes a feature from this collection.void
removeAll(Collection features)
Removes multiple features from this collection.int
size()
Returns the number of features in this collection.
-
-
-
Method Detail
-
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
List getFeatures()
Returns an unmodifiable List of the features in this collection- Returns:
- a read-only view of all the features
-
iterator
Iterator iterator()
Returns an Iterator over the features- Returns:
- an Iterator over the features
-
query
List query(org.locationtech.jts.geom.Envelope envelope)
A quick search for features, using an envelope comparison.- Parameters:
envelope
- the envelope to query against- Returns:
- features whose envelopes intersect the given envelope
-
add
void add(Feature feature)
Adds a feature to this collection.- Parameters:
feature
- a Feature to add to the end of this collection
-
addAll
void addAll(Collection features)
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
void removeAll(Collection features)
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
void remove(Feature feature)
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
Collection remove(org.locationtech.jts.geom.Envelope env)
Removes the features which intersect the given envelope- Returns:
- the removed features
-
-