Sunburned Surveyor wrote:
> Jody,
>
> I need to follow up on my earlier question about a SimpleFeature
> implementation. I'm really looking for the object that I would create
> to represent a GPX entity like a waypoint as a SimpleFeature. So in
> some sense I'd actually be trying to implement FeatureFactory.
>   
Are you sure you want to do this? The reason I ask is the factory may be 
provided to you by the end users; perhaps they have a specific 
implementation of Feature they would like you to create (you can do this 
to have POJOs that implement the Feature interface created for example). 
If your data store ignores these settings you close the door on that 
kind of functionality.

That said lets see what you have to work with; lets check out what 
implements SimpleFeature...

SimpleFeature
- DecoratingFeature - used to wrap around an origional feature and add 
functionality
- ResultSetFeature - probably for JDBC?
- SimpleFeatureImpl - a good choice for your needs
-- BaseFeatureCollection
-- DefaultFeature - our old feature implementation (is listed here as 
well supporting the new interface for migration purposes)
-- MutableFIDFeature - used for datastores like WFS that explicitly need 
to set the ID of the feature (usually during a commit?)
- TransactionStateDiff.NULL - a singleton used to indicate lack of a feature

> Maybe it would make sense to create my own implementation of SimpleFeature 
> called GPXSimpleFeature that could support behavior unique to GPX entities?
>   
That is totally an option for you; do what you think is best. I would 
ask that you actually wrap it up in a SimpleFeatureFactory so that 
others can use it to create "GPX entities" (say from oracle XYZM data).
> Please share with me your thoughts.
>   
I would recommend using SimpleFeatureImpl as long as you can get away 
with it; over the next couple of weeks I expect to see more Feature 
implementations made available (we had an "array" based one that was 
fast; and now that geoserver is going into a optimization run I expect 
to see more examples along those lines).

Cheers,
Jody

-------------------------------------------------------------------------
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

Reply via email to