HI Andrea: I have been finally responding to a long standing wish/issue on the user list .... a replacement for DefaultFeatureCollection.
I have done two implements: - TreeSetFeatureCollection (a straight up copy of DefaultFeatrueCollection so we can preserve it for test cases) - ListFeatureCollection - starting from the lean feature collection in https://jira.codehaus.org/browse/GEOT-3091 and then mostly ignore it Then I created CollectionFeatureSource: - using the same kind of design as ContentFeatureSource (could not use it directly since it is defined "downstream, along the way I query processing code and added to DataUtilities for reuse). - CollectionFeatureSource wraps around an existing SimpleFeatureCollection - goes through all the feature collection wrappers needed to process a Query (including sorting) - ending in a wrapper that will call back to the containing CollectionFeatureSource for subCollection( Filter ) and sort( SoryBy ) And next I will go in and try and make one using a SpatialIndex for storage. So here is what I want to ask you - what is the renderer doing :-) MapLayer ends up using: - DataUtilities.source( FeatureCollection<SimpleFeatureType, SimpleFeature> collection ) Right now this has been implemented as: CollectionDataStore store = new CollectionDataStore(collection); return store.getFeatureSource(store.getTypeNames()[0]); And I have been experimenting with: SimpleFeatureCollection simpleFeatureCollection = simple( collection ); CollectionFeatureSource source = new CollectionFeatureSource(simpleFeatureCollection); So can you describe what happens next? - How is FEATURE_DETACHED used? - What should I try and optimise? Oh and if it was not clear before - the *only* place DataUtilities.source( collection ) is called is from MapLayer by way of prepping data for the screen. Jody ------------------------------------------------------------------------------ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel