Package org.geotools.data.crs
Class ReprojectFeatureIterator
Object
ReprojectFeatureIterator
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<SimpleFeature>,SimpleFeatureIterator,FeatureIterator<SimpleFeature>
public class ReprojectFeatureIterator
extends Object
implements Iterator<SimpleFeature>, SimpleFeatureIterator
ReprojectFeatureReader provides a reprojection for FeatureTypes.
ReprojectFeatureReader is a wrapper used to reproject GeometryAttributes to a user supplied CoordinateReferenceSystem from the original CoordinateReferenceSystem supplied by the original FeatureReader.
Example Use:
ReprojectFeatureReader reader =
new ReprojectFeatureReader( originalReader, reprojectCS );
CoordinateReferenceSystem originalCS =
originalReader.getFeatureType().getDefaultGeometry().getCoordinateSystem();
CoordinateReferenceSystem newCS =
reader.getFeatureType().getDefaultGeometry().getCoordinateSystem();
assertEquals( reprojectCS, newCS );
TODO: handle the case where there is more than one geometry and the other geometries have a different CS than the
default geometry- Author:
- jgarnett, Refractions Research, Inc., aaime, $Author: jive $ (last modification)
-
Constructor Summary
ConstructorsConstructorDescriptionReprojectFeatureIterator(FeatureIterator<SimpleFeature> reader, SimpleFeatureType schema, MathTransform transform) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Constructor Details
-
ReprojectFeatureIterator
public ReprojectFeatureIterator(FeatureIterator<SimpleFeature> reader, SimpleFeatureType schema, MathTransform transform)
-
-
Method Details
-
getFeatureType
Implement getFeatureType.Description ...
- See Also:
-
next
Implement next.Description ...
- Specified by:
nextin interfaceFeatureIterator<SimpleFeature>- Specified by:
nextin interfaceIterator<SimpleFeature>- Returns:
- The next Feature
- Throws:
NoSuchElementException- If no more Features exist.- See Also:
-
remove
public void remove()- Specified by:
removein interfaceIterator<SimpleFeature>
-
hasNext
public boolean hasNext()Implement hasNext.Description ...
- Specified by:
hasNextin interfaceFeatureIterator<SimpleFeature>- Specified by:
hasNextin interfaceIterator<SimpleFeature>- Returns:
- true if more Features exist, false otherwise.
- See Also:
-
close
public void close()Implement close.Description ...
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceFeatureIterator<SimpleFeature>- See Also:
-