I had a go and ProcessingCollection extends BaseFeatureCollection, and arrived 
at one critical implementation difference. 
ProcessingFeatureCollection takes care to lazily create the schema; I can image 
for some process this work can be
fairly significant.

Additional helper methods:
- DataUtilities.bounds( FeatureCollection ) <-- already existed
- DataUtilities.bounds( FeatureIterator ) 
- DataUtilities.count( FeatureCollection ) 
- DataUtilities.count( FeatureIterator ) 


Once again I hope this reduce the amount of duplication in our codebase, I 
added the bounds( FeatureIterator ) method to make it clear that the 
calculation was limited to traversing the features manually.

-- 
Jody Garnett


On Sunday, 4 November 2012 at 1:32 PM, Jody Garnett wrote:

> > > - RasterAsPointFeatureCollection now extends BaseFeatureCollection in 
> > > order
> > > to avoid the use of WrappingIterator
> > > 
> > 
> > Hum... ok, Wondering what level of overlap there is now between 
> > BaseFeatureCollection
> > and that processing oriented feature collection base I've made some time ago
> > 
> 
> Checking it out.
> 
> Looks like I could break out BaseFeatureCollection / 
> BaseSimpleFeatureCollection (no sense making app-schema work harder) and save 
> us some code duplication.
>  
> BaseFeatureCollection extends SimpleFeatureCollection
> ================
> abstract:
> - features() 
> recommend
> - getBounds()
> - size();
> 
> Notes:
> - sort() is implemented using Uses SubFeatureList.
> 
> ProcessingCollection extends FeatureCollection
> ===============
> requires:
> - features() 
> - getBounds()
> - size()
> - buildTargetFeatureType()
> 
> Notes:
> - sort() is implemented using SortedSimpleFeatureCollection
> - ProcessingCollection.accepts does not check progress.isCanceled
> - ProcessingCollection.accepts immediately throws any Exception (as an 
> IOException) that occurs
> 
> 
> 

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to