The following is needed when upgrading to 2.3:
Transition to FeatureCollection
FeatureResults was deprecated for the 2.1 release, and it is passing out
of existence for 2.3. All methods were deprecated and their
Before (GeoTools 2.1 Code)
Quick Alternative (GeoTools 2.3 Code)
- Search and replace:
- search: FeatureResults replace: FeatureCollection
- Transition to:
- results.size(); // was results.getCount()
- results; // was results.collection()
- FeatureIterator // was FeatureReader
- results.features() // was results.reader()
You may need to remove IOException handling code.
Recommended Alternative (GeoTools 2.x Code)
You can also transition directly to use of java.util.Iterator; this will put you in better standing for the transition to GeoAPI FeatureCollection.
- Transition to Iterator
- (Feature) reader.next(); // was reader.next();
- results.close( reader ); // was reader.close();
Transition to GridCoverageRenderer
It seems we did not meet our guidlines here and the GridCoveargeAPI has been moved and completly changed!