Package org.geotools.feature.collection
Class ClippedFeatureCollection
- Object
- 
- DecoratingSimpleFeatureCollection
- 
- ClippedFeatureCollection
 
 
- 
- All Implemented Interfaces:
- SimpleFeatureCollection,- FeatureCollection<SimpleFeatureType,SimpleFeature>
 
 public class ClippedFeatureCollection extends DecoratingSimpleFeatureCollection SimpleFeatureCollection wrapper that clip (crops) features according to the clip geometry passed. Can preserve the Z dimension.- Author:
- Andrea Aime - GeoSolutions
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected Geometryclipprotected booleanpreserveZprotected SimpleFeatureTypetargetSchema- 
Fields inherited from class DecoratingSimpleFeatureCollectiondelegate
 
- 
 - 
Constructor SummaryConstructors Constructor Description ClippedFeatureCollection(SimpleFeatureCollection delegate, Geometry clip, boolean preserveZ)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleFeatureIteratorfeatures()Obtain a SimpleFeatureIterator of the Features within this SimpleFeatureCollection.SimpleFeatureTypegetSchema()The schema for the child feature members of this collection.intsize()Please note this operation may be expensive when working with remote content.- 
Methods inherited from class DecoratingSimpleFeatureCollectionaccepts, canDelegate, contains, containsAll, equals, getBounds, getID, hashCode, isEmpty, sort, subCollection, toArray, toArray
 
- 
 
- 
- 
- 
Field Detail- 
clipprotected Geometry clip 
 - 
targetSchemaprotected SimpleFeatureType targetSchema 
 - 
preserveZprotected boolean preserveZ 
 
- 
 - 
Constructor Detail- 
ClippedFeatureCollectionpublic ClippedFeatureCollection(SimpleFeatureCollection delegate, Geometry clip, boolean preserveZ) 
 
- 
 - 
Method Detail- 
getSchemapublic SimpleFeatureType getSchema() Description copied from interface:FeatureCollectionThe schema for the child feature members of this collection.Represents the most general FeatureType in common to all the features in this collection. - For a collection backed by a shapefiles (or database tables) the FeatureType returned by getSchema() will complete describe each and every child in the collection.
- For mixed content FeatureCollections you will need to check the FeatureType of each Feature as it is retrived from the collection
- The degenerate case returns the "_Feature" FeatureType, where the only thing known is that the contents are Features.
 - Specified by:
- getSchemain interface- FeatureCollection<SimpleFeatureType,SimpleFeature>
- Overrides:
- getSchemain class- DecoratingSimpleFeatureCollection
- Returns:
- FeatureType describing the "common" schema to all child features of this collection
 
 - 
featurespublic SimpleFeatureIterator features() Description copied from interface:SimpleFeatureCollectionObtain a SimpleFeatureIterator of the Features within this 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(); }- Specified by:
- featuresin interface- FeatureCollection<SimpleFeatureType,SimpleFeature>
- Specified by:
- featuresin interface- SimpleFeatureCollection
- Overrides:
- featuresin class- DecoratingSimpleFeatureCollection
- Returns:
- A FeatureIterator.
 
 - 
sizepublic int size() Description copied from interface:FeatureCollectionPlease note this operation may be expensive when working with remote content.- Specified by:
- sizein interface- FeatureCollection<SimpleFeatureType,SimpleFeature>
- Overrides:
- sizein class- DecoratingSimpleFeatureCollection
- See Also:
- Collection.size()
 
 
- 
 
-