Hi,
This is obviously a very basic question, but despite all my research in the user guide and Javadoc I still don't really understand how this works. A lot of the docs and Javadocs seem to be contradictory.

According to a conversation on this list a while ago featureIDs should be relevant to the Feature - and there seem to be schema methods for creating Features complete with an explicit FeatureId. However, as soon as I add the feature to a datastore (with addFeature) it actually changes the featureID - so I can't really see the point of creating a feature with an ID in the first place.

Even more mysteriously, addFeatures() is supposed to return a set of the new FeatureIDs, but seems to just return strings like "new0" which don't bear any relation to the actual FeatureIds (presumably this is a bug? I'm using 2.4m4).

I also assumed that if I got the schema from a datastore and used the "create" method of that to directly create a Feature it would actually be created and added to the datastore, but it seems not. Is there a way of creating a Feature directly in the dataStore ? If not it seems the only way is to create one independently and then add it to the dataStore (at which point its featureId changes).

Am I misunderstanding how featureIds are used ? Are they supposed to be basically internal to the dataStore ? I'm very surprised that there's no simple way to retrieve or modify a Feature in a datastore given its featureId (the only way seems to be to make a filter, which seems quite complex).

My situation is that my app creates an object for each geographic region - that object in turn is associated with a Feature in a datastore. Calling methods on the object to do things like add geometry should modify the Feature. However I seem to be falling at the first hurdle - i can't even seem to be able to create a Feature and retrieve a featureId with which to reference it.

Am I completely misunderstanding something here ?

Josh




Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

Reply via email to