Hi Michael,

Sorry I fell off the list - taking the discussion back there now:

Comments inline:

On 26/04/2010, at 3:03 PM, Michael Bedward wrote:

> On 25 April 2010 23:31, Jody Garnett <[email protected]> wrote:
>> I am going through other things on my clean up list ...
>> - make Query class, DefaultQuery can still implement it for backwards 
>> compatibility
>> - Params utility class (http://jira.codehaus.org/browse/GEOT-3050)
>> 
>> Do you have any ideas? This that are hard in the tutorials?
> 
> Hi Jody,
> 
> A few suggestions...
> 
> SimpleFeatureIterator and SimpleFeatureWriter would be nice in the
> examples (I think you might have already mentioned these in a recent
> email).

I did; I stopped short of making SimpleFetureIterator and SimpleFeatureWriter 
due to the number of implementation classes that would need to be updated. It 
is not a great deal; and we could do it as part of that proposal; but I wanted 
a patch out for people to review.

> I suspect DataStoreFactorySpi looks pretty mysterious to most people
> at first.  I also hate inflicting AbstractGridCoverage2DReader and
> AbstractGridFormat on people in the ImageLab :-)

I always try to make my examples useDataStoreFinder; still your point is made 
we could subclass in oder to have a DataStoreFactory (since SPI stands for 
Service Provider Interface and is not generally of interest).

The other approach would be to "bulk" up DataStoreFinder so it can be used 
without reference to the DataStoreFactorySPI classes, Indeed to could return 
"Params" object given a factory "Display Name".

> The distinction between FilterFactory and FilterFactory2 is confusing
> for beginners (and I think names with '2' at the end look like a fudge :).

Not sure what else can be done; we could make a "GeoTools" FilterFactory 
(abstract class preferably) and have common factory finder return that - 
actually think that is a good idea.

> In StyleLab we have...
>   private Style createFromSLD(File sld) {
>       try {
>           SLDParser stylereader = new SLDParser(styleFactory,
> sld.toURI().toURL());
>           Style[] style = stylereader.readXML();
>           return style[0];
> 
> Perhaps some of that boilerplate code could be hidden from the user.

I am torn on that one; the practice of just grabbing the first Style is the 
"best practice" coming out of SLD use. Indeed that is exactly the the file 
format saved out by Symbology Encoding format. So createFromSE( File se ) would 
be correct; it just until we actually read/write that format I don't want to 
mess with it.

Jody
------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to