public class ClippedFeatureCollection extends DecoratingSimpleFeatureCollection
Modifier and Type | Field and Description |
---|---|
protected Geometry |
clip |
protected boolean |
preserveZ |
protected SimpleFeatureType |
targetSchema |
delegate
Constructor and Description |
---|
ClippedFeatureCollection(SimpleFeatureCollection delegate,
Geometry clip,
boolean preserveZ) |
Modifier and Type | Method and Description |
---|---|
SimpleFeatureIterator |
features()
Obtain a SimpleFeatureIterator of the Features within this SimpleFeatureCollection.
|
SimpleFeatureType |
getSchema()
The schema for the child feature members of this collection.
|
int |
size()
Please note this operation may be expensive when working with remote content.
|
accepts, canDelegate, contains, containsAll, equals, getBounds, getID, hashCode, isEmpty, sort, subCollection, toArray, toArray
protected Geometry clip
protected SimpleFeatureType targetSchema
protected boolean preserveZ
public ClippedFeatureCollection(SimpleFeatureCollection delegate, Geometry clip, boolean preserveZ)
public SimpleFeatureType getSchema()
FeatureCollection
Represents the most general FeatureType in common to all the features in this collection.
getSchema
in interface FeatureCollection<SimpleFeatureType,SimpleFeature>
getSchema
in class DecoratingSimpleFeatureCollection
public SimpleFeatureIterator features()
SimpleFeatureCollection
The implementation of FeatureIterator must adhere to the rules of fail-fast concurrent
modification. In addition (to allow for resource backed collections) the
SimpleFeatureIterator.close()
method must be called.
Example use:
SimpleFeatureIterator iterator=collection.features();
try {
while( iterator.hasNext() ){
SimpleFeature feature = iterator.next();
System.out.println( feature.getID() );
}
}
finally {
iterator.close();
}
features
in interface SimpleFeatureCollection
features
in interface FeatureCollection<SimpleFeatureType,SimpleFeature>
features
in class DecoratingSimpleFeatureCollection
public int size()
FeatureCollection
size
in interface FeatureCollection<SimpleFeatureType,SimpleFeature>
size
in class DecoratingSimpleFeatureCollection
Collection.size()
Copyright © 1996–2023 Geotools. All rights reserved.