Saul Farber wrote:
> Jody Garnett wrote:
>> Saul this API (ImageReaders) kind of is what you want to make it to be;
> Or do you mean that the API as defined in modules/coverage (I think 
> you referred to it as GCE below) is open-ended enough that making a 
> new reader/format is kind-of amorphous?
I was meaning that the GeoTools code here does not really have champion; 
so if you want to lock things down to the point you can reuse your 
readers then I am pretty sure everyone will be open to the idea.
>> I have proposed an alternative DataAccess thing with an eye towards 
>> rasters, but currently most applications are skipping GCE and making 
>> new Formats directly. I would personally try and stuff as much 
>> information into the Format as possible and then create a Reader as 
>> needed.
> What do you mean when you say "skipping GCE"?  I'm not sure I know 
> what GCE is if it's not the creation of a Format, Factory and Reader 
> (by extending AbstractGridFormat, AGFFactory and 
> AbstractGridCoverage2DReader).  Is there another way of creating a 
> coverage plugin?  Is that GCE?
Right now people often skip the GridCoverageExchange class and go right 
to the factory (or even implementations). I think our source code 
examples show this technique in use.
> As for "create a reader as needed" I'm a little confused by that.  It 
> could mean:
> 1)  "create a concrete subclass of AbstractGridCoverage2DReader as 
> needed"  I'm not sure I get to make a call on this, as geoserver 
> simply creates one GridCoverageReader for each configured coverage and 
> then calls "read(extent, imagesize)" each time it wants a coverage 
> image.  I don't really get to choose when to create a 
> GridCoverageReader, I just have to return a "long-lived" one.
I was thinking of GridCoverageReader - this method takes an object 
defining the source:
- 
http://javadoc.geotools.fr/2.3/org/geotools/data/coverage/grid/file/FileSystemGridCoverageExchange.html#getReader(java.lang.Object)

That object can be an array if you have a bunch of stuff you set all the 
time....

You can then reserve the read method for the things that only very on 
each call:
- 
http://javadoc.geotools.fr/2.3/org/geotools/gce/geotiff/GeoTiffReader.html#read(org.opengis.parameter.GeneralParameterValue[])

I am going to have to bow out here as I am too far away from the details 
to be useful.
Jody

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to