This could be a bug in the memory datastore. I wouldn't be surprised. Memory datastore was originally designed to be only used for testing but was too handy to stay that way...

On closer reading of your message, I'm not sure entirely what you mean. (sorry) You want to delete a feature and then add a feature with the same ID? or when you add a feature it adds it as a feature with the same ID?

Part of the API states that you cannot choose the ID of the features you are adding. The datastore gets to determine that. That is why the addFeatures method returns a set of Feature IDs. (All the features that you added). Maybe it should be a list so you can determine which fid goes with which feature... but that is another discussion for the geotools list.

Jesse

On 31-Mar-06, at 9:13 AM, Jonas Johansson wrote:

Hi!

I have discovered something fishy:

It is not possible to add a Feature to a MemoryDataStore if it has the
exact name as a Feature that once existed but was deleted (using the
standard uDig Feature deletion operation) at some time.

What works of course is always adding Features with a unique name over
time (never using names that have been used before, even if they were
deleted from the DataStore). It is strange to have to keep that in mind
when adding new Features and deleting them from a MemoryDataStore
though.

Jonas

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to