From: Jody G. <jga...@re...> - 2007-05-25 18:04:56
|
I think you have found a mistake! I think a programmer (maybe me) got carried away with code reuse and confused things. You are correct that a SubFeatureCollection with Feature.INCLUDE should be the same as the one that came before. You are on the right way to create a FeatureList ... the code is just letting you down. FeatureCollection.sort is supposed to be implemented (and the resulting FeatureList is very fast for the database based collections). Let me check DefaultFeatureCollection now. Cheers, Jody > Hi, > > I have a FeatureCollection, from wich I'd like to create a FeatureList. > I try to do it by creating a SubFeatureList, providing Filter.INCLUDE as > Filter, and Sort.NATURAL_ORDER as SortBy. > > My problem is, that SubFeatureList's constructor delegates to > SubFeatureCollection's constructor, which throws exception if the filter > parameter is FIlter.INCLUDE. It says that "A subcollection with > Filter.INCLUDE should be a FeatureCollectionEmpty". My question is, what > does this mean? (What is a FeatureCollectionEmpty?) > > On the other hand, if I comment out the check for Filter.INCLUDE in > SubFeatureCollection, the SubFilterList works as I expected. So is that > check important for SubFeatureCollection? > (I guess that a SubFeatureCollection with Feature.INCLUDE would be the > same as the collection it is based on. Am I right?) > > Or am I on the wrong way to create a FeatureList? The javadoc header of > the FeatureList interface tells a way of getting an instance of it, but > it seems wrong to me, and the implementation of > FeatureCollection.sort(.) is missing from the provided > DefaultFeatureCollection. > > Thank you, > Peter > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Geotools-gt2-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > |