Hi, I've just committed the feature reader/iterator sorter work in main, it's available for everybody to use. Made it use a single file this round, a RandomAccessFile containing ordered feature blocks with readers seeking through it while doing the merge-sort. It's also quite a bit more compact than the previous approach, file size wise, as a number of RandomAccessFile specific optimizations have been used.
I've then moved to patching ContentFeatureSource so that it can use it, patch available for review at: http://jira.codehaus.org/browse/GEOT-3834 In that patch the max number of features to keep in memory can be set as a Query hint, and can otherwise be set as a system wide hint, this way we can have control without having to roll out store configurations and the like. The patch assumes the ContentFeatureSource subclass can do some sorting, but may not be able to do sorting as general as the merge-sort code, so it actually allows both way: if the native cannot do a certain sorting but the merge-sorter can, the latter will be used. As a result, and to my surprise, I found we can sort on geometries as well, since they implement Comparable. This means that if someone has a very large dataset in a DBMS and sorting on the geometry is requested, we'll end up dumping everything to file and perform the merge-sort... ugh... probably not a good idea? I'm inclined to treat geometry as a special case and declare we cannot actually sort on it, what do you think? Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
