public class ReprojectFeatureIterator extends Object implements Iterator<SimpleFeature>, SimpleFeatureIterator
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 geometryConstructor and Description |
---|
ReprojectFeatureIterator(FeatureIterator<SimpleFeature> reader,
SimpleFeatureType schema,
MathTransform transform) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Implement close.
|
SimpleFeatureType |
getFeatureType()
Implement getFeatureType.
|
boolean |
hasNext()
Implement hasNext.
|
SimpleFeature |
next()
Implement next.
|
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public ReprojectFeatureIterator(FeatureIterator<SimpleFeature> reader, SimpleFeatureType schema, MathTransform transform)
public SimpleFeatureType getFeatureType()
Description ...
IllegalStateException
- DOCUMENT ME!FeatureReader.getFeatureType()
public SimpleFeature next() throws NoSuchElementException
Description ...
next
in interface Iterator<SimpleFeature>
next
in interface FeatureIterator<SimpleFeature>
IOException
IllegalAttributeException
NoSuchElementException
IllegalStateException
- DOCUMENT ME!DataSourceException
- DOCUMENT ME!FeatureReader.next()
public void remove()
remove
in interface Iterator<SimpleFeature>
public boolean hasNext()
Description ...
hasNext
in interface Iterator<SimpleFeature>
hasNext
in interface FeatureIterator<SimpleFeature>
IOException
IllegalStateException
- DOCUMENT ME!FeatureReader.hasNext()
public void close()
Description ...
close
in interface Closeable
close
in interface AutoCloseable
close
in interface FeatureIterator<SimpleFeature>
IOException
IllegalStateException
- DOCUMENT ME!FeatureReader.close()
Copyright © 1996–2019 Geotools. All rights reserved.