Two quick ideas for you:
- the get/put client properties are designed for this kind of use
- the parsers (and I think postgis?) also set appropriate information 
into each JTSGeometry

Andrea Aime wrote:
> Now, the most natural place seems the GeometryDescritor userData 
> structure, using a NATIVE_SRID key. What do you think?
Perfect :-)
> How does one set that field? We could have 
> SimpleFeatureTypeBuilder.add(name, binding, srid) add the
> value.
I would prefer if we can construct the object as normal; and add your 
special key after the fact.
> Unfortunately that would blow up with an SRID CRS.decode cannot handle 
> (that's a bug and has to be fixed, spatial databases
> such as Oracle have plenty of srid codes that are not in the  EPSG 
> database).
> As an alternative, we could expose a 
> SimpleFeatureTypeBuilder.setAttributeUserData(Object, value) that 
> piles up the user data attribute for the next attribute.
> I'm ok with both of them
I do not think we need to modify the builder at all; this is something 
(specific to your data store) that you are doing after the builder has 
completed.
> Where do we declare NATIVE_SRID? In JDBCDataStore? If that's  the sole 
> user of that user data, it may be a good place.
> Yet I have the impression this field might be useful for other data 
> stores as well. GeometryDescriptor then? Ugh...
> that would be a GeoApi change. Any better idea?
The idea is to use the client properties for this kind of work (and 
where there is a lot of common ground) break out an API around proven 
functionality.

Jody


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to