Permalink
Browse files

QA check on FeatureCollection.accepts combined with utility method Da…

…taUtilities.visit( collection, visitor, progress )
  • Loading branch information...
1 parent 9c9d5b7 commit a534e4507adb32d0b23481e47e235fe7224fd1b6 @jodygarnett jodygarnett committed Nov 4, 2012
Showing with 110 additions and 293 deletions.
  1. +2 −18 ...nsion/app-schema/app-schema/src/main/java/org/geotools/data/complex/MappingFeatureCollection.java
  2. +1 −3 ...-schema/sample-data-access/src/main/java/org/geotools/data/SampleDataAccessFeatureCollection.java
  3. +10 −2 modules/library/data/src/main/java/org/geotools/data/store/ContentFeatureSource.java
  4. +58 −4 modules/library/main/src/main/java/org/geotools/data/DataUtilities.java
  5. +8 −1 modules/library/main/src/main/java/org/geotools/data/collection/SpatialIndexFeatureCollection.java
  6. +2 −21 modules/library/main/src/main/java/org/geotools/data/collection/TreeSetFeatureCollection.java
  7. +2 −5 modules/library/main/src/main/java/org/geotools/data/memory/MemoryFeatureCollection.java
  8. +3 −21 modules/library/main/src/main/java/org/geotools/data/store/DataFeatureCollection.java
  9. +3 −23 modules/library/main/src/main/java/org/geotools/feature/DefaultFeatureCollection.java
  10. +4 −25 modules/library/main/src/main/java/org/geotools/feature/collection/AbstractFeatureCollection.java
  11. +2 −21 modules/library/main/src/main/java/org/geotools/feature/collection/AdaptorFeatureCollection.java
  12. +1 −24 modules/library/main/src/main/java/org/geotools/feature/collection/BaseFeatureCollection.java
  13. +4 −24 modules/library/main/src/main/java/org/geotools/feature/collection/DecoratingFeatureCollection.java
  14. +3 −24 ...library/main/src/main/java/org/geotools/feature/collection/DecoratingSimpleFeatureCollection.java
  15. +2 −21 ...n/feature-pregeneralized/src/main/java/org/geotools/data/gen/PreGeneralizedFeatureCollection.java
  16. +2 −2 ...ported/geogit-versioned/src/main/java/org/geotools/data/geogit/GeoGitSimpleFeatureCollection.java
  17. +2 −21 ...ioned/src/main/java/org/geotools/data/versioning/decorator/DefaultVersionedFeatureCollection.java
  18. +1 −33 ...s/unsupported/process-feature/src/main/java/org/geotools/process/vector/ProcessingCollection.java
View
20 ...p-schema/app-schema/src/main/java/org/geotools/data/complex/MappingFeatureCollection.java
@@ -21,6 +21,7 @@
import java.util.Collection;
import java.util.Iterator;
+import org.geotools.data.DataUtilities;
import org.geotools.data.Query;
import org.geotools.data.crs.ReprojectFeatureResults;
import org.geotools.feature.CollectionListener;
@@ -78,24 +79,7 @@ public void setUnrolledFilter(Filter unrolledFilter) {
* org.opengis.util.ProgressListener)
*/
public void accepts(FeatureVisitor visitor, ProgressListener progress) throws IOException {
- FeatureIterator iterator = null;
- if( progress == null ) progress = new NullProgressListener();
- try{
- progress.started();
- for( iterator = features(); !progress.isCanceled() && iterator.hasNext();){
- try {
- Feature feature = iterator.next();
- visitor.visit(feature);
- }
- catch( Exception erp ){
- progress.exceptionOccurred( erp );
- }
- }
- }
- finally {
- progress.complete();
- iterator.close();
- }
+ DataUtilities.visit(this, visitor, progress);
}
/**
View
4 ...sample-data-access/src/main/java/org/geotools/data/SampleDataAccessFeatureCollection.java
@@ -52,9 +52,7 @@
* org.opengis.util.ProgressListener)
*/
public void accepts(FeatureVisitor visitor, ProgressListener progress) throws IOException {
- for (Feature feature : this) {
- visitor.visit(feature);
- }
+ DataUtilities.visit(this, visitor, progress);
}
/**
View
12 modules/library/data/src/main/java/org/geotools/data/store/ContentFeatureSource.java
@@ -682,13 +682,21 @@ public void accepts( Query query, org.opengis.feature.FeatureVisitor visitor,
float position = 0;
progress.started();
while( reader.hasNext() ){
+ SimpleFeature feature = null;
if (size > 0) progress.progress( position++/size );
try {
- SimpleFeature feature = reader.next();
+ feature = reader.next();
visitor.visit(feature);
}
- catch( Exception erp ){
+ catch( IOException erp ){
progress.exceptionOccurred( erp );
+ throw erp;
+ }
+ catch( Exception unexpected ){
+ progress.exceptionOccurred( unexpected );
+ String fid = feature == null ? "feature" : feature.getIdentifier().toString();
+ throw new IOException("Problem visiting " + query.getTypeName() + " visiting " + fid
+ + ":" + unexpected, unexpected);
}
}
}
View
62 modules/library/main/src/main/java/org/geotools/data/DataUtilities.java
@@ -91,6 +91,7 @@
import org.geotools.resources.i18n.ErrorKeys;
import org.geotools.resources.i18n.Errors;
import org.geotools.util.Converters;
+import org.geotools.util.NullProgressListener;
import org.geotools.util.Utilities;
import org.opengis.coverage.grid.GridCoverage;
import org.opengis.feature.Feature;
@@ -117,6 +118,7 @@
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.ReferenceIdentifier;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.util.ProgressListener;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Envelope;
@@ -2649,8 +2651,9 @@ static AttributeDescriptor createAttribute(String typeSpec) throws SchemaExcepti
}
/**
- * Manually count the number of features from the provided FeatureIterator
- *
+ * Manually count the number of features from the provided FeatureIterator.
+ * This implementation is intended for FeatureCollection implementors and test case
+ * verification. Client code should always call {@link FeatureCollection#size()}
* @param collection
* @return number of featuers in feature collection
*/
@@ -2674,6 +2677,8 @@ public static int count( FeatureIterator<?> iterator) {
/**
* Manually count the number of features in a feature collection using using {@link FeatureCollection#features()}.
*
+ * This implementation is intended for FeatureCollection implementors and test case
+ * verification. Client code should always call {@link FeatureCollection#size()}
* @param collection
* @return number of featuers in feature collection
*/
@@ -2696,7 +2701,10 @@ public static int count(
}
}
/**
- * Manually calculate the bounds from the provided FeatureIteator
+ * Manually calculate the bounds from the provided FeatureIteator.
+ * This implementation is intended for FeatureCollection implementors and test case
+ * verification. Client code should always call {@link FeatureCollection#getBounds()}.
+ *
* @param iterator
* @return
*/
@@ -2728,7 +2736,10 @@ public static ReferencedEnvelope bounds( FeatureIterator<?> iterator ){
}
/**
* Manually calculates the bounds of a feature collection using {@link FeatureCollection#features()}.
- *
+ * <p>
+ * This implementation is intended for FeatureCollection implementors and test case
+ * verification. Client code should always call {@link FeatureCollection#getBounds()}.
+ *
* @param collection
* @return bounds of features in feature collection
*/
@@ -2762,6 +2773,49 @@ public static ReferencedEnvelope bounds(
}
/**
+ * Manually visit each feature using {@link FeatureCollection#features()}.
+ * <p>
+ * This method is intended to assist FeatureCollection implementors, and used to verify test-case results. Client code should always call
+ * {@link FeatureCollection#accepts(FeatureVisitor, ProgressListener)}
+ *
+ * @param collection
+ * @return bounds of features in feature collection
+ */
+ public static void visit(FeatureCollection<?, ?> collection, FeatureVisitor visitor,
+ ProgressListener progress) throws IOException {
+ FeatureIterator<?> iterator = null;
+ float size = progress != null ? collection.size() : 0;
+ if (progress == null) {
+ progress = new NullProgressListener();
+ }
+ try {
+ float position = 0;
+ progress.started();
+ iterator = collection.features();
+ while (!progress.isCanceled() && iterator.hasNext()) {
+ Feature feature = null;
+ try {
+ feature = iterator.next();
+ visitor.visit(feature);
+ if (size > 0) {
+ progress.progress(position++ / size);
+ }
+ } catch (Exception erp) {
+ progress.exceptionOccurred(erp);
+ String fid = feature == null ? "feature" : feature.getIdentifier().toString();
+ throw new IOException("Problem with " + collection.getID() + " visiting " + fid
+ + ":" + erp, erp);
+ }
+ }
+ } finally {
+ progress.complete();
+ if (iterator != null) {
+ iterator.close();
+ }
+ }
+ }
+
+ /**
* Changes the ending (e.g. ".sld") of a {@link URL}
*
* @param url
View
9 ...ibrary/main/src/main/java/org/geotools/data/collection/SpatialIndexFeatureCollection.java
@@ -134,20 +134,27 @@ public void accepts(final FeatureVisitor visitor, ProgressListener listener) thr
final ProgressListener progress = listener != null ? listener : new NullProgressListener();
progress.started();
final float size = (float) size();
+ final IOException problem[] = new IOException[1];
index.query(everything, new ItemVisitor() {
float count = 0f;
public void visitItem(Object item) {
+ SimpleFeature feature = null;
try {
- SimpleFeature feature = (SimpleFeature) item;
+ feature = (SimpleFeature) item;
visitor.visit(feature);
} catch (Throwable t) {
progress.exceptionOccurred(t);
+ String fid = feature == null ? "feature" : feature.getIdentifier().toString();
+ problem[0] = new IOException("Problem visiting " + fid + ":" + t, t);
} finally {
progress.progress(count / size);
}
}
});
+ if( problem[0] != null ){
+ throw problem[0];
+ }
progress.complete();
}
View
23 ...les/library/main/src/main/java/org/geotools/data/collection/TreeSetFeatureCollection.java
@@ -633,27 +633,8 @@ public SimpleFeatureCollection collection() throws IOException {
}
public void accepts(org.opengis.feature.FeatureVisitor visitor,
- org.opengis.util.ProgressListener progress) {
- Iterator iterator = null;
- if (progress == null)
- progress = new NullProgressListener();
- try {
- float size = size();
- float position = 0;
- progress.started();
- for (iterator = iterator(); !progress.isCanceled() && iterator.hasNext(); progress
- .progress(position++ / size)) {
- try {
- SimpleFeature feature = (SimpleFeature) iterator.next();
- visitor.visit(feature);
- } catch (Exception erp) {
- progress.exceptionOccurred(erp);
- }
- }
- } finally {
- progress.complete();
- close(iterator);
- }
+ org.opengis.util.ProgressListener progress) throws IOException {
+ DataUtilities.visit( this, visitor, progress );
}
/**
View
7 modules/library/main/src/main/java/org/geotools/data/memory/MemoryFeatureCollection.java
@@ -21,12 +21,11 @@
import java.util.NoSuchElementException;
import java.util.TreeMap;
+import org.geotools.data.DataUtilities;
import org.geotools.data.simple.SimpleFeatureIterator;
import org.geotools.feature.collection.AbstractFeatureCollection;
import org.geotools.feature.collection.RandomFeatureAccess;
-import org.geotools.feature.visitor.BoundsVisitor;
import org.geotools.geometry.jts.ReferencedEnvelope;
-import org.geotools.util.NullProgressListener;
import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.simple.SimpleFeatureType;
@@ -125,9 +124,7 @@ public SimpleFeature removeFeatureMember(String id) {
*/
@Override
public ReferencedEnvelope getBounds() {
- BoundsVisitor bounds = new BoundsVisitor();
- accepts(bounds, new NullProgressListener());
- return bounds.getBounds();
+ return DataUtilities.bounds( features() );
}
@Override
View
24 modules/library/main/src/main/java/org/geotools/data/store/DataFeatureCollection.java
@@ -27,6 +27,7 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+import org.geotools.data.DataUtilities;
import org.geotools.data.FeatureReader;
import org.geotools.data.FeatureWriter;
import org.geotools.data.collection.DelegateFeatureReader;
@@ -453,27 +454,8 @@ public boolean retainAll( Collection arg0 ) {
public void clear() {
}
- public void accepts(org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) {
- Iterator iterator = null;
- if (progress == null) progress = new NullProgressListener();
- try{
- float size = size();
- float position = 0;
- progress.started();
- for( iterator = iterator(); !progress.isCanceled() && iterator.hasNext(); progress.progress( 100.0f * position++ / size )){
- try {
- SimpleFeature feature = (SimpleFeature) iterator.next();
- visitor.visit(feature);
- }
- catch( Exception erp ){
- progress.exceptionOccurred( erp );
- }
- }
- }
- finally {
- progress.complete();
- close( iterator );
- }
+ public void accepts(org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) throws IOException {
+ DataUtilities.visit(this, visitor, progress);
}
/**
View
26 modules/library/main/src/main/java/org/geotools/feature/DefaultFeatureCollection.java
@@ -30,6 +30,7 @@
import java.util.logging.Logger;
import org.geotools.data.DataSourceException;
+import org.geotools.data.DataUtilities;
import org.geotools.data.FeatureReader;
import org.geotools.data.simple.SimpleFeatureCollection;
import org.geotools.data.simple.SimpleFeatureIterator;
@@ -596,29 +597,8 @@ public Set fids() {
return Collections.unmodifiableSet( contents.keySet() );
}
- public void accepts(org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) {
- FeatureIterator<?> iterator = null;
- if (progress == null) progress = new NullProgressListener();
- try{
- float size = size();
- float position = 0;
- progress.started();
- for( iterator = features(); !progress.isCanceled() && iterator.hasNext(); progress.progress( position++/size )){
- try {
- SimpleFeature feature = (SimpleFeature) iterator.next();
- visitor.visit(feature);
- }
- catch( Exception erp ){
- progress.exceptionOccurred( erp );
- }
- }
- }
- finally {
- progress.complete();
- if( iterator != null){
- iterator.close();
- }
- }
+ public void accepts(org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) throws IOException {
+ DataUtilities.visit(this, visitor, progress);
}
/**
View
29 ...library/main/src/main/java/org/geotools/feature/collection/AbstractFeatureCollection.java
@@ -16,14 +16,15 @@
*/
package org.geotools.feature.collection;
+import java.io.IOException;
import java.util.Collection;
import java.util.Iterator;
+import org.geotools.data.DataUtilities;
import org.geotools.data.simple.SimpleFeatureCollection;
import org.geotools.data.simple.SimpleFeatureIterator;
import org.geotools.feature.FeatureIterator;
import org.geotools.geometry.jts.ReferencedEnvelope;
-import org.geotools.util.NullProgressListener;
import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.simple.SimpleFeatureType;
import org.opengis.filter.Filter;
@@ -221,30 +222,8 @@ public boolean isEmpty() {
}
}
- public void accepts(org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) {
- Iterator<SimpleFeature> iterator = null;
- if( progress == null ) progress = new NullProgressListener();
- try{
- float size = size();
- float position = 0;
- progress.started();
- for( iterator = iterator(); !progress.isCanceled() && iterator.hasNext();){
- if (size > 0) progress.progress( position++/size );
- try {
- SimpleFeature feature = (SimpleFeature) iterator.next();
- visitor.visit(feature);
- }
- catch( Exception erp ){
- progress.exceptionOccurred( erp );
- }
- }
- }
- finally {
- progress.complete();
- if( iterator instanceof FeatureIterator){
- ((FeatureIterator<?>)iterator).close();
- }
- }
+ public void accepts(org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) throws IOException {
+ DataUtilities.visit(this, visitor, progress);
}
//
View
23 .../library/main/src/main/java/org/geotools/feature/collection/AdaptorFeatureCollection.java
@@ -24,6 +24,7 @@
import java.util.List;
import java.util.Set;
+import org.geotools.data.DataUtilities;
import org.geotools.data.simple.SimpleFeatureCollection;
import org.geotools.data.simple.SimpleFeatureIterator;
import org.geotools.feature.CollectionListener;
@@ -87,27 +88,7 @@ public void closeIterator( SimpleFeatureIterator close ) {
* @throws IOException
*/
public void accepts(FeatureVisitor visitor, ProgressListener progress ) throws IOException {
- Iterator<SimpleFeature> iterator = null;
- if( progress == null ) progress = new NullProgressListener();
- try{
- float size = size();
- float position = 0;
- progress.started();
- for( iterator = iterator(); !progress.isCanceled() && iterator.hasNext();){
- if (size > 0) progress.progress( position++/size );
- try {
- SimpleFeature feature = iterator.next();
- visitor.visit(feature);
- }
- catch( Exception erp ){
- progress.exceptionOccurred( erp );
- }
- }
- }
- finally {
- progress.complete();
- close( iterator );
- }
+ DataUtilities.visit(this, visitor, progress);
}
//
View
25 ...les/library/main/src/main/java/org/geotools/feature/collection/BaseFeatureCollection.java
@@ -198,30 +198,7 @@ public boolean isEmpty() {
public void accepts(org.opengis.feature.FeatureVisitor visitor,
org.opengis.util.ProgressListener progress) throws IOException {
- FeatureIterator<F> iterator = null;
- if (progress == null)
- progress = new NullProgressListener();
- try {
- float size = size();
- float position = 0;
- progress.started();
- for (iterator = features(); !progress.isCanceled() && iterator.hasNext();) {
- try {
- Feature feature = (Feature) iterator.next();
- visitor.visit(feature);
- } catch (Exception erp) {
- progress.exceptionOccurred(erp);
- }
- if (size > 0){
- progress.progress(position++ / size);
- }
- }
- } finally {
- progress.complete();
- if( iterator != null ){
- iterator.close();
- }
- }
+ DataUtilities.visit(this, visitor, progress);
}
//
View
28 ...brary/main/src/main/java/org/geotools/feature/collection/DecoratingFeatureCollection.java
@@ -16,8 +16,10 @@
*/
package org.geotools.feature.collection;
+import java.io.IOException;
import java.util.Collection;
+import org.geotools.data.DataUtilities;
import org.geotools.feature.FeatureCollection;
import org.geotools.feature.FeatureIterator;
import org.geotools.geometry.jts.ReferencedEnvelope;
@@ -50,30 +52,8 @@ protected DecoratingFeatureCollection(FeatureCollection<T, F> delegate) {
}
public void accepts(org.opengis.feature.FeatureVisitor visitor,
- org.opengis.util.ProgressListener progress) {
- FeatureIterator<F> it = features();
-
- try {
- Exception exception = null;
- while (it.hasNext()) {
- try {
- visitor.visit(it.next());
- } catch (Exception e) {
- if (exception != null)
- exception = e;
- }
- }
-
- if (exception != null) {
- if (exception instanceof RuntimeException) {
- throw (RuntimeException) exception;
- } else {
- throw new RuntimeException(exception);
- }
- }
- } finally {
- it.close();
- }
+ org.opengis.util.ProgressListener progress) throws IOException {
+ DataUtilities.visit(this, visitor, progress);
}
public boolean contains(Object o) {
View
27 ...main/src/main/java/org/geotools/feature/collection/DecoratingSimpleFeatureCollection.java
@@ -16,6 +16,7 @@
*/
package org.geotools.feature.collection;
+import java.io.IOException;
import java.util.Collection;
import org.geotools.data.DataUtilities;
@@ -55,30 +56,8 @@ protected DecoratingSimpleFeatureCollection(SimpleFeatureCollection delegate) {
}
public void accepts(org.opengis.feature.FeatureVisitor visitor,
- org.opengis.util.ProgressListener progress) {
- SimpleFeatureIterator it = features();
-
- try {
- Exception exception = null;
- while (it.hasNext()) {
- try {
- visitor.visit(it.next());
- } catch (Exception e) {
- if (exception != null)
- exception = e;
- }
- }
-
- if (exception != null) {
- if (exception instanceof RuntimeException) {
- throw (RuntimeException) exception;
- } else {
- throw new RuntimeException(exception);
- }
- }
- } finally {
- it.close();
- }
+ org.opengis.util.ProgressListener progress) throws IOException {
+ DataUtilities.visit(this, visitor, progress);
}
View
23 ...e-pregeneralized/src/main/java/org/geotools/data/gen/PreGeneralizedFeatureCollection.java
@@ -26,6 +26,7 @@
import java.util.Iterator;
import java.util.List;
+import org.geotools.data.DataUtilities;
import org.geotools.data.simple.SimpleFeatureCollection;
import org.geotools.data.simple.SimpleFeatureIterator;
import org.geotools.feature.CollectionListener;
@@ -82,27 +83,7 @@ public PreGeneralizedFeatureCollection(
* org.opengis.util.ProgressListener) Logic copied from DefaultFeatureCollection class
*/
public void accepts(FeatureVisitor visitor, ProgressListener progress) throws IOException {
- SimpleFeatureIterator iterator = null;
- if (progress == null)
- progress = new NullProgressListener();
- try {
- float size = size();
- float position = 0;
- progress.started();
-
- for (iterator = features(); !progress.isCanceled() && iterator.hasNext(); progress
- .progress(position++ / size)) {
- try {
- SimpleFeature feature = (SimpleFeature) iterator.next();
- visitor.visit(feature);
- } catch (Exception erp) {
- progress.exceptionOccurred(erp);
- }
- }
- } finally {
- progress.complete();
- iterator.close();
- }
+ DataUtilities.visit(this, visitor, progress);
}
public boolean contains(Object feature) {
View
4 ...eogit-versioned/src/main/java/org/geotools/data/geogit/GeoGitSimpleFeatureCollection.java
@@ -31,6 +31,7 @@
import org.geogit.storage.ObjectDatabase;
import org.geogit.storage.ObjectReader;
import org.geogit.storage.WrappedSerialisingFactory;
+import org.geotools.data.DataUtilities;
import org.geotools.data.simple.SimpleFeatureCollection;
import org.geotools.data.simple.SimpleFeatureIterator;
import org.geotools.factory.Hints;
@@ -448,8 +449,7 @@ protected SimpleFeature computeNext() {
@Override
public void accepts(FeatureVisitor visitor, ProgressListener progress)
throws IOException {
- // TODO Auto-generated method stub
-
+ DataUtilities.visit(this, visitor, progress);
}
/**
View
23 ...c/main/java/org/geotools/data/versioning/decorator/DefaultVersionedFeatureCollection.java
@@ -319,27 +319,8 @@ public Set fids() {
return Collections.unmodifiableSet( contents.keySet() );
}
- public void accepts(org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) {
- FeatureIterator<SimpleFeature> iterator = null;
- if (progress == null) progress = new NullProgressListener();
- try{
- float size = size();
- float position = 0;
- progress.started();
- for( iterator = features(); !progress.isCanceled() && iterator.hasNext(); progress.progress( position++/size )){
- try {
- SimpleFeature feature = (SimpleFeature) iterator.next();
- visitor.visit(feature);
- }
- catch( Exception erp ){
- progress.exceptionOccurred( erp );
- }
- }
- }
- finally {
- progress.complete();
- iterator.close();
- }
+ public void accepts(org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) throws IOException {
+ DataUtilities.visit(this, visitor, progress);
}
/**
View
34 ...orted/process-feature/src/main/java/org/geotools/process/vector/ProcessingCollection.java
@@ -63,39 +63,7 @@ public ProcessingCollection() {
*/
@Override
public abstract FeatureIterator<F> features();
-
- @Override
- public void accepts(FeatureVisitor visitor, ProgressListener progress) throws IOException {
- FeatureIterator<F> iterator = null;
- float size = progress != null ? size() : 0;
- if (progress == null) {
- progress = new NullProgressListener();
- }
- try {
- float position = 0;
- progress.started();
- iterator = features();
- while (!progress.isCanceled() && iterator.hasNext()) {
- try {
- F feature = iterator.next();
- visitor.visit(feature);
- if (size > 0) {
- progress.progress(position++ / size);
- }
- } catch (Exception erp) {
- progress.exceptionOccurred(erp);
- throw new IOException("Error occurred while iterating over features", erp);
- }
- }
- } finally {
- progress.complete();
- if( iterator != null ){
- iterator.close();
- }
- }
-
- }
-
+
/**
* The bounds of features in the output. If the bounds are not known in advance once can call the
* getFeatureBounds() which will build it from the features as they are returned from the feature

0 comments on commit a534e45

Please sign in to comment.