[GRASSLIST:2705] Re: Grass 5.7 smart display

Radim Blazek blazek at itc.it
Sat Feb 21 03:33:28 EST 2004


On Friday 20 February 2004 20:46, francesco.pirotti wrote:
> Hi GRASS
>
> I am using 5.7 to deal with 156 maps in a big mosaic each weighting 10 Mb. 
> II wrote a nice script which imported all the batch and added automatically
> the name of each map file to the d.m menu.
>
> The problem:
> showing on the monitor 156 maps takes a long time, even if you have a low
> resolution and your region is covers only one of the maps.
>
> The solution?
> I am tweaking the tcl d.m scripts to make a "smart" display function which
> will basically check the region that one is viewing, and only draws the
> maps which are viewable from such region, thus avoiding extra drawing. 
> Plus I would like the function to change the region resolution
> automatically to have a region around 1000pixels x 1200pixels everytime.
>
> Has anybody felt a need for such a thing?  Is there already some command
> for this?  Is it just foolishness?

Did you try QGIS with GRASS support? 
1) for GRASS raster maps QGIS supports wildcards 
   (e.g. name '*' displays all rasters in selected mapset)
2) map region is stored in the memory when the map is opened 
   (to skip drawing later if outside the window)
3) before the raster map is displayed, QGIS sets current region in GRASS library 
   (in memory only) to minimum required region (overlap of monitor window
   and raster region with resolution of monitor)
4) When raster layer is added, small preview is stored in the memory  
   and it is used always when the resolution of displayed window is lower then
   this preview. This makes opening of layers slower, but rendering much faster.
   Size of priview can be controled by QGIS_RASTER_MEM_SIZE enviroment
   variable (default 160kB).

Radim




More information about the grass-user mailing list