[GRASS-dev] Re: added opacity option to grc file

Michael Barton michael.barton at asu.edu
Mon Sep 11 17:05:39 EDT 2006


Moritz,

Now that I finally got thematic mapping working on my Mac again, I was able
to look into this.

I think switching to immediate mode rendering has broken thematic mapping
from the GUI. Looking at it, I'm not sure why it was working before.

I'm pretty sure that what is happening is that the thematic mapping script
is iteratively running d.vect (actually this IS what is happening). Somehow,
this was getting written to a single output PPM that was then composited and
displayed with any other map in the layer tree. Perhaps this was happening
because of the lag in writing the output PPM allowed all the iterated d.vect
writes in the display driver to put it all together before it was output to
a file.

With immediate mode rendering, the PPM output is considerably faster. So
d.vect.thematic is repeatedly writing it's vector displays (one for each
theme) to a file directly, rather than to the display driver and then to a
file. The unfortunate result is that it is writing each theme to the SAME
file, overwriting any previous theme. So you only see the last theme
written.

At the moment, I can't think of a clever way to fix this so that the script
works as a stand alone module and can write in  the old way to the display
driver, and at the same time work in the GUI environment. I'm loathe to
rewrite the whole thing in TclTk and then have to maintain 2 versions.

Any suggestions are welcome. Glynn???

Michael

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton


> From: Moritz Lennert <mlennert at club.worldonline.be>
> Date: Mon, 11 Sep 2006 17:14:44 +0200
> To: Michael Barton <michael.barton at asu.edu>
> Subject: Re: added opacity option to grc file
> 
> I have another problem which is also new: it seems as if the thematic
> layer only displays the highest (last) class. Below you see the messages
> in the output window. Nothing seems to be going wrong, but in the
> display I only see those areas which are in the range 4152.66 - 20174.
> 
> Moritz
> 
> ******output**************
> 
> Thematic map legend for column densite of map communes
> 
> Value range:  0 -  20174
> Mapped by standard deviation units of  1747.52 (mean = 657.62)
> 
> Color(R:G:B) Value
> ============ ==========
> 0:0:255  0 - 657.62
> PNG: GRASS_TRUECOLOR status: TRUE
> PNG: collecting to file:
> /home/mlennert/GRASS/DATA/BELGIQUE/mlennert/.tmp/geog-pc40/32172.0.ppm,
>       GRASS_WIDTH=642, GRASS_HEIGHT=482
> 
> 'vector/communes' was found in more mapsets (also found in mlennert).
> 85:0:170  657.62 - 2405.14 +1sd
> PNG: GRASS_TRUECOLOR status: TRUE
> PNG: collecting to file:
> /home/mlennert/GRASS/DATA/BELGIQUE/mlennert/.tmp/geog-pc40/32172.0.ppm,
>       GRASS_WIDTH=642, GRASS_HEIGHT=482
> 
> 'vector/communes' was found in more mapsets (also found in mlennert).
> 170:0:85  2405.14 - 4152.66 +2sd
> PNG: GRASS_TRUECOLOR status: TRUE
> PNG: collecting to file:
> /home/mlennert/GRASS/DATA/BELGIQUE/mlennert/.tmp/geog-pc40/32172.0.ppm,
>       GRASS_WIDTH=642, GRASS_HEIGHT=482
> 
> 'vector/communes' was found in more mapsets (also found in mlennert).
> 255:0:0  4152.66 - 20174
> PNG: GRASS_TRUECOLOR status: TRUE
> PNG: collecting to file:
> /home/mlennert/GRASS/DATA/BELGIQUE/mlennert/.tmp/geog-pc40/32172.0.ppm,
>       GRASS_WIDTH=642, GRASS_HEIGHT=482
> 
> 'vector/communes' was found in more mapsets (also found in mlennert).
> 




More information about the grass-dev mailing list