The SimpleFeature (1) class defines a method named getAttribute that returns the value of an Attribute.
The SimpleFeatureType (2) class also defines a method named getAttribute, but this method returns an AttributeDescriptor object, not an attribute value. As a new user of the GeoTools feature model I found this slightly confusing. The first method obviously returns the value of an attribute, while the second returns the description of an attribute. (I suppose some of my confusion stems from my use of the OpenJUMP feature model, in which the use of the term "attribute" in a method name almost exclusively referes to the attribute value. This is because OpenJUMP doesn't have a class or classes that define attributes in the explicit way that GeoTools does.) It seems there are three ways to think about attributes in GeoTools feature model: [1] The type of an attribute. [2] The definitions or description of an attribute, of which the type is a part. [3] The actual value of an attribute stored in an instance of SimpleFeature. I was wondering if we could distinguish one of the two getAttribute methods with a different name, like getAttributeValue or getAttributeDescriptor. If this isn't practical because the API is already heavily used, perhaps we could clarify the distinction between the two methods in the Javadoc comments for each method or their containing class. I could assist with this if requested. (Or maybe I need to write up a short, one or two page document that would acquaint newcomers to the SimpleFeature framework in GeoTools? Of course, Jody probably has something like this on the wiki already. I'd probably have had fewer questions if I would have read this first.) :] The Sunburned Surveyor (1) http://geoapi.sourceforge.net/snapshot/javadoc/org/opengis/feature/simple/SimpleFeature.html (2) http://geoapi.sourceforge.net/snapshot/javadoc/org/opengis/feature/simple/SimpleFeatureType.html ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
