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.

What I would like to do in such cases is to call the stopRendering() 
method on the renderer so that the renderer makes an orderly stop and 
exits its paint method. When I tested the concept this morning, it 
appears that this does not happen for GeoTiff files in particular and 
problem not for Grid-based Coverages in general. Looking at the code 
for StreamingRenderer (GeoTools 3.2.0) it appears that the 
"renderingStopRequested" flag does not get passed to the current 
layer being rendered.   There is logic for layers that contain many 
features (the flag is checked after each feature is rendered), since 
GeoTiff files contain only one feature (I checked this using a 
RederingListener) that doesn't help much.

Even though the application is multi-threaded and doesn't "lock up", 
the GeoTiff rendering does consume a lot of processor resources while 
it is happening. Thus if the user decides that he is not interested 
in the result, it seems less than optimal to continue the rendering 
to the finish.

Am I missing something?  Is there a way to accomplish what I am trying to do?

Gary





Computer Science is the Art of the Possible

Gary W. Lucas
Sonalysts, Inc.
215 Parkway North
Waterford CT 06320, USA
(860) 326-3682 




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