Saul this API (ImageReaders) kind of is what you want to make it to be;

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.

For the information that varies *all* the time we should make sure that 
that is passed in as an object (or array of objects) to your read method.
Jody

> Hey simone,
>
> (ccing geotools-devel for posterity)
>
> Quick question:  when we chatted earlier I said that I was creating 
> "short-lived" ImageReaders (err, ArcSDE raster ImageReader subclasses) 
> and throwing them away from request to request, but in order to do that 
> I'm discarding the ability of the ImageIO api to have a reader with 
> multiple images inside it.
>
> In addition, each time I create a reader I have to pass in a bunch of 
> information over and over again, and in the end it's creating the exact 
> same ImageReader object over and over again, just calling it with 
> different read() parameters.
>
> Is there a particular reason not to create the ImageReader (subclass) 
> once, and just use it over and over again within a JAI.create() call 
> each time?  In the end it'd be something like this:
>
> One ArcSDEGridCoverageReader per ArcSDE raster "source" (multi-leveled, 
> pyramided, tiled image) as created and cached by geoserver.
> One ArcSDEImageReader per ArcSDEGridCoverageReader (as created and 
> cached by the initial ArcSDEGridCoverageReader)
> One PlanarImage created from the above ImageReader per image request.
>
> I guess I just need to make sure that my ImageReader is threadsafe, as 
> someone could make two requests simultaneously and I'd need to make sure 
> that the read() method in my ImageReader could be called twice at the 
> same time.
>
> Or is there stuff in the abstract ImageReader parent class that is 
> inherently not threadsafe such that I should avoid this approach?
>
> --saul
>
> -------------------------------------------------------------------------
> 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
>   


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