Hi,

FYI,

A bunch of these issues were dealt with in the TransactionStateDiff.   
It had these problems at one point and have since then been solved.   
It is a slightly more complicated problem because it is only the  
difference but I'd guess the principals for solving the problem are  
about the same.

It also has a spatial index built in.  So if you're feeling ambitious  
you could put that in the transactionStateDiff as well.

Jesse


Le 3-Feb-08 à 8:06 AM, johann Sorel a écrit :

>
> I need a MemoryDataStore for those reasons :
> - I need a Geometry field, shapefile only support Point/Polygon...  
> Only one unique type possible, I need all types
> - I only have one field (Geometry) and only on or two geometries in  
> it, there's not enough features to have a important impact on  
> performance.
> - Using a file/table for this... is just crazy. I need an in memory  
> solution.
>
>
>
>>
>> This kind of error occurrs for a number of things occurring togheter:
>> * the memory data store using a LinkedHashMap to store features  
>> (hashmap
>> to provide very fast fid based access, linked to preserve insertion
>> order)
>> * renderer scanning thru the map using an iterator over the original
>> LinkedHashMap
>> * editor changing the contents of the above collection while the
>> renderer is working on it
>>
>> Ways to solve this problem. Quick ideas are:
>> * have FeatureIterator objects take a snapshot of the LinkedHashMap
>> contents and work on top of it. Not a deep copy btw, a shallow one
>> that just give the iterator its own collection that no one else will
>> touch
>> * change from LinkedHashMap to something else that won't throw a
>>   ConcurrentModificationException... could not find any. Yet,
>>   if ArrayList was used, a loop like:
>>   for(int i = 0; i < size(); i++)
>>     features.get(i)
>>   would not throw an exception
>>
>> One last thing... why are you using a MemoryDataStore? The last  
>> time I
>> tried it, it was very slow, significantly slower than shapefiles for
>> example, this is due to cloning, the same iterator that scans thru
>> the features collection will clone them so that any change to the
>> returned feature won't affect the datastore internals.
>>
>> Cheers
>> Andrea
>
> ____________________________________________________________
> FREE ONLINE PHOTOSHARING - Share your photos online with your  
> friends and family!
> Visit http://www.inbox.com/photosharing to find out more!
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Geotools-devel mailing list
> Geotools-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to