[Qgis-developer] Re: Value tool plugin makes QGIS crash

Radim Blazek radim.blazek at gmail.com
Mon Mar 28 03:31:24 EDT 2011


On Sat, Mar 26, 2011 at 9:29 PM, Giovanni Manghi
<giovanni.manghi at gmail.com> wrote:
> It works pretty good with *non* GRASS rasters, while with GRASS rasters
> is very slow (on Windows, acceptable on linux)

Explanation for GRASS list: he is talking about "Value tool" which is
displaying a raster value under cursor.

In the GRASS provider, I have followed the recommended use of GRASS in
applications, that means, if a value on certain pixel is requested, it
runs GRASS module (executable) with coordinates as parameter and
receives a value from stdout.

If a user moves cursor over the whole map, it may run the GRASS module
some 1000 times on medium size screen. If there are 10 maps open in
QGIS, it starts 10000 executables in about 1 second. That is probably
a bit slow.

We could add some delay in the Value tool plugin to avoid too many
requests, but that is not solution if the values have to be logged
somehow, for example to draw a chart.

It seems that instead of running the GRASS module each time, we have
to keep it running and send coordinates to the module via stdin.

Can GRASS developers give us any suggestion how to solve this?

Radim


More information about the Qgis-developer mailing list