Some more thoughts ...
featureId is supposed to be immutable - so it makes a good hashcode / 
equals test.

The formal OGC feature model did have a getVersion(): String - but we 
never used it, and never used it, and finally removed it from GeoTools.
Andrea has been doing some work with respect to versioning ... he may be 
treating version as a normal attribute?

The getParent() method is a mistake and should be deprecated and removed 
(and will be gone from the next release of GeoTools). The idea of 
getParent was flawed in that a single feature could be in more than one 
collection; often collections are based on a description of some kind 
(ie a filter) rather than containment.

Formally we need collections formed by associations of space and time 
... but that is another story.

Here is a link to the reference model:
- 
http://iodeweb5.vliz.be/oceanteacher/index.php?module=contextview&action=contextdownload&id=gen11Srv32Nme37_1565

You also should read some of Bryce's background "primers" if you got a 
moment (they .
- http://docs.codehaus.org/download/attachments/31212/ISO19109+Primer.pdf

Jody

> Hi,
>
> random thoughts :
>
> Looking at DefaultFeature, I see the hash code is something like 
> hash(featureId, featureType). This means the hash code doesn't change 
> when one of the attributes is modified, although it would be nice if 
> features were immutable.
>
> Using some other hash built on hash(featureType, featureId, 
> attributes) could ease tests like Feature.equals(Feature) or be used 
> as a version marker, since modifications would alter the hash 
> signature. This could be used to provide a version service on top of a 
> datastore that does not support versions, with a revision being the 
> map of ids and hashes. At least, it could help to answer the question 
> 'what has changed since time t in the datastore ?'.
>
> I see also DefaultFeature references its parent FeatureCollection, 
> which in turn references other features. When caching features, this 
> means we have to keep in memory a lot of (possibly) unwanted features.
>
> Cheers,
>
> Christophe
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to