Sunburned Surveyor wrote:
> Everytime I think I am close to understanding I get more confused. :]
> Jody wrote: "Are you sure you want to do this?"
>   
Gak; don't mind me too much - I need to hack more and email less.
> Not after reading your last post to this thread...
>
> Whoa! I never thought about that. It is an intriguing idea, but also
> sort of twisted. In OpenJUMP all of our "readers" provide an
> implementation of Feature, which is like the GeoTools interface. I
> can't imagine anyone wanting something less from an OpenJUMP reader.
>
> ...But when I think about GeoTools I realize that people might want
> all types of different feature implementations from GPX files read by
> my code. (See, I'm already starting to think "GeoTools" instead of
> OpenJUMP.)
>   
Yeah - if we did not want this functionality we would not use a Factory; 
or have an interface - we would be working with a Class. Sweet - glad 
you understand. Of all the things that make geotools code hard to get 
started with as a developer (rather than a user) the transition to using 
Factories is top of the list.
> After reading your last post (and benefiting from the light bulb clicking on) 
> I think I will do the following:
>
> - Provide DataObjects that can be sucked into a FeatureFactory provided by 
> client code to create any number of Feature
> implementations. I was going to do that anyways, but now I understand most 
> client code in GeoTools is going to want the raw data as a DataObject, or 
> even one step lower, as a GPX entity. At first I thought they would only be 
> interested in an implementation of SimpleFeature. They acutally could want to 
> use my code at a lower level to create their own implementation of 
> SimpleFeature.
>   
Just so; in uDig we routinely make our own Factory implementations and 
call GeoTools code to get "our" objects constructed. Specifically we do 
this so the implementations provide a few Eclipse specific interfaces, 
but the general principle applies.
> - I'll provide my own implementation of SimpleFeature that adds some GPX 
> specific behavior.
>
> The only reason I can think it would be worthwhile to create 
> SimpleFeatureImpl objects from my code is if UDig can't handle a custom 
> SimpleFeature implementation. Do you have any thoughts on this?
>   
uDig can handle your own custom SimpleFeatureImplementation; but I would 
like to give you a factory (inject it into your class) and have you use 
it. Providing a factory for feature creation is one of the things a 
geotools user can do as part of making a query.

Landon I am worried we are getting in too deep too early; can you get 
your code working first - and then we can explore ways to make it more 
powerful.
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