Gary W. Lucas ha scritto:
> I am implementing an interactive application that uses GeoTools to 
> make rather heavy use of maps. In some cases, particularly when 
> rendering GeoTiffs, the rendering of these maps takes quite awhile, 
> sometimes more than 30 seconds.  Because I have implemented a 
> multi-threaded application and conduct the rendering outside the main 
> User Interface thread, the application does not lock up during the 
> rendering, but there is still the possibility that the user might get 
> tired of waiting and decide to change his map settings, move the 
> display to some place elsewhere in the world, etc.
   ...

Gary,
I don't have a straight yes/no for you.

Grid coverage rendering is performed by the GridCoverageRenderer utility 
class, which sets up a JAI transformation chain, and finally calls 
graphics.drawImage on the renderer image we computed.
Trouble is, settin up the chain does not trigger any computation,
which is in fact all triggered by the drawImage call, which we cannot
stop.

One thing you can try is to abruptly kill the thread that is rendering
the image.

Another is to investigate the JADE renderer for JPL, see:
http://java.sun.com/products/java-media/jai/success/jpl.html
I tried it once and it had a nice threaded image renderer that used
tiling to show rendering progress. The license does not allow any
direct usage afaik, but you can grab some idea.

Finally, and sorry if I ask, but are these swing components?
Would it be possible to open source them? uDig has a threaded renderer,
but it's stuck in the SWT/Eclipse RCP api and it's not much of use
for non uDig developers.

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to