public class ReprojectFeatureResults extends AbstractFeatureCollection
ReprojectFeatureResults is a wrapper used to reproject GeometryAttributes to a user supplied CoordinateReferenceSystem from the original CoordinateReferenceSystem supplied by the original FeatureResults.
Example Use:
ReprojectFeatureResults results =
new ReprojectFeatureResults( originalResults, reprojectCS );
CoordinateReferenceSystem originalCS =
originalResults.getFeatureType().getDefaultGeometry().getCoordinateSystem();
CoordinateReferenceSystem newCS =
results.getFeatureType().getDefaultGeometry().getCoordinateSystem();
assertEquals( reprojectCS, newCS );
id, schema| Constructor and Description |
|---|
ReprojectFeatureResults(FeatureCollection<SimpleFeatureType,SimpleFeature> results,
CoordinateReferenceSystem destinationCS)
Creates a new reprojecting feature results
|
| Modifier and Type | Method and Description |
|---|---|
void |
accepts(FeatureVisitor visitor,
ProgressListener progress)
Visit the contents of a feature collection.
|
protected boolean |
canDelegate(FeatureVisitor visitor) |
void |
closeIterator(Iterator close) |
ReferencedEnvelope |
getBounds()
This method computes reprojected bounds the hard way, but computing them feature by feature.
|
FeatureCollection<SimpleFeatureType,SimpleFeature> |
getOrigin()
Returns the feature results wrapped by this reprojecting feature results
|
Iterator |
openIterator()
Factory method used to open an iterator over collection contents for use by
AbstractFeatureCollection.iterator() and AbstractFeatureCollection.features(). |
int |
size()
Returns the number of elements in this collection.
|
contains, containsAll, features, getID, getSchema, isEmpty, iterator, sort, subCollection, toArray, toArraypublic ReprojectFeatureResults(FeatureCollection<SimpleFeatureType,SimpleFeature> results, CoordinateReferenceSystem destinationCS) throws IOException, SchemaException, TransformException, OperationNotFoundException, NoSuchElementException, FactoryException
results - destinationCS - IOExceptionSchemaExceptionTransformExceptionFactoryExceptionNoSuchElementExceptionOperationNotFoundExceptionCannotCreateTransformExceptionNullPointerException - DOCUMENT ME!IllegalArgumentExceptionpublic Iterator openIterator()
AbstractFeatureCollectionAbstractFeatureCollection.iterator() and AbstractFeatureCollection.features().
If you return an instance of FeatureIterator some effort is taken to call the FeatureIterator.close() internally, however we cannot offer any assurance that client code
using AbstractFeatureCollection.iterator() will perform the same check.
openIterator in class AbstractFeatureCollectionpublic void closeIterator(Iterator close)
public int size()
AbstractFeatureCollectionsize in interface FeatureCollection<SimpleFeatureType,SimpleFeature>size in class AbstractFeatureCollectionCollection.size()public ReferencedEnvelope getBounds()
getBounds in interface FeatureCollection<SimpleFeatureType,SimpleFeature>getBounds in class AbstractFeatureCollectionorg.geotools.data.FeatureResults#getBounds()public FeatureCollection<SimpleFeatureType,SimpleFeature> getOrigin()
public void accepts(FeatureVisitor visitor, ProgressListener progress) throws IOException
FeatureCollectionThe order of traversal is dependent on the FeatureCollection implementation; some collections are able to make efficient use of an internal index in order to quickly visit features located in the same region.
accepts in interface FeatureCollection<SimpleFeatureType,SimpleFeature>accepts in class AbstractFeatureCollectionvisitor - Closure applied to each feature in turn.progress - Used to report progress, may be used to interrupt the operationIOExceptionprotected boolean canDelegate(FeatureVisitor visitor)
Copyright © 1996–2019 Geotools. All rights reserved.