Jody Garnett ha scritto: > Good question; we focused on the "raw needs" of the data model here and > did not add many helper methods - leaving those for SimpleFeature. > I would like to say that List<Property> is the answer; but my reason is > pretty weak ... if you have several Geometry objects in your > Feature they each may have a different CRS .... > List<Object> getAttribute( nameDescriptor ) would only let you see the > JTS objects > List<GeometryAttribute> getAttribute( geomDescriptor ) would let you see > GeometryAttribute with access to the id, crs, bounds and JTS object
Hum, in fact some datastores are creating JTS geometries and putting the CRS in the userData field. Sort of a hacky convention, I agree. Unless we get out an start using a ReferencedGeometry that makes it explicit (same as we did for Geometry). Oh, since we established that we cannot use List<xxx> in the API, why is it get(Name) returning a List<Property>? Is there any magic xml rule stating that if you access by name order becomes suddendly important? >> I guess the question boils down to wheter Name is a full xpath >> representation (with wildcards and whatnot) or is just able to represent >> the path to a nested attribute? The javadoc does not tell (or at >> least, I don't see it). > Name is fixed (it would be LocalName/GenericName if that interface was > useful); the xpath stuff wrecked everyones happy last time - xpath can > be done by a static utility method treating Feature as a nice data > structure. Only way to see > it happen IMHO. Hem, I really lost you here. From one side it seems GeoTools code implies, in various part, that xpath should be used to access properties (I kind of remember something in the filter API does). And the you tell me this feature model does not really allow the usage of xpath, but it's limited to something simpler. Why so? If we error on the "super powerful, super flexibile" side, why not follow this fully? The only performance sensitive part of the api is simple feature anyways, so why not be as "powerful" as xml in property access too? Cheers Andrea ------------------------------------------------------------------------- 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-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel