Re: [Geotools-gt2-users] setStartIndex, Query and MemoryDataStore

2014-03-20 Thread César Martínez Izquierdo
Done: https://jira.codehaus.org/browse/GEOT-4745 I don't know if it is descriptive enough, but I have tried my best ;-) César 2014-03-20 16:15 GMT+01:00 Jody Garnett : > Almost anything you do will be faster than MemoryDataStore. > MemoryDataStore uses a TreeSet to sort the contents by Feature

Re: [Geotools-gt2-users] setStartIndex, Query and MemoryDataStore

2014-03-20 Thread Jody Garnett
Almost anything you do will be faster than MemoryDataStore. MemoryDataStore uses a TreeSet to sort the contents by FeatureId - so it as slow as anything. Can I ask you to rase a bug about start index for MemoryDataStore. I suspect that it is time to deprecate that implementation. -- Jody Jody Gar

Re: [Geotools-gt2-users] setStartIndex, Query and MemoryDataStore

2014-03-20 Thread César Martínez Izquierdo
I have tried with GeoTools 11.0 and setStartIndex is still ignored with MemoryDataStore. I have switched to DataUtilities.souce( collection ) and it works fine now. Should I expect any performance gain or penalty from this change (I am using ListFeatureCollection)? Best regards, César 2014-03

Re: [Geotools-gt2-users] setStartIndex, Query and MemoryDataStore

2014-03-20 Thread Jody Garnett
You may be correct we did a big "FeatureCollection" simplification and quality assurance check. Please report back if you are successful or not as I am curious. Jody Garnett On Thu, Mar 20, 2014 at 7:07 PM, César Martínez Izquierdo < cesar@gmail.com> wrote: > At the moment we are using Geot

Re: [Geotools-gt2-users] setStartIndex, Query and MemoryDataStore

2014-03-20 Thread César Martínez Izquierdo
At the moment we are using Geotools 2.7 version, so maybe the error is or is not present in current Geotools versions. I will test if our code works with the latest version without changes, then I will report back the results. I will also try the DataUtilities.souce( collection ) method. Thanks fo

Re: [Geotools-gt2-users] setStartIndex, Query and MemoryDataStore

2014-03-19 Thread Jody Garnett
You are probably not doing anything wrong, StartIndex was added sometime after MemoryDataStore so I expect a bug report and patch may be required. The whole paging thing is a bit tricky in that it assume a sort order, the sort order used by MemoryDataStore is based on FeatureId, and I am not sure

[Geotools-gt2-users] setStartIndex, Query and MemoryDataStore

2014-03-19 Thread César Martínez Izquierdo
I have a piece of legacy code to maintain, using a MemoryDataStore. At certain point, the following code is executed: MemoryDataStore ds = new MemoryDataStore(ftBuilder.buildFeatureType()); sfs = (SimpleFeatureStore) ds.getFeatureSource(ftName); sfs.addFeatures(colection); ... Query query = n