[GRASS-dev] nviz: overlay two color raster maps?

Hi,

I have some troubles to drape in NVIZ a patchy land surface temperature
map over a color orthophoto (over a elevation model). The idea is to
show the LST for some agricultural patches.

Other tries:
- r.patch beforehand fails in a sense that it messes up the color table
- i.image.mosaik likewise

Masking in NVIZ didn't have to seem an effect.

Any ideas?

Markus

Markus wrote:

Masking in NVIZ didn't have to seem an effect.

Any ideas?

Yeah, make a surface attributes mask & transparency map but with
values of 255 not 0/null. It's a bit of a pain but I've made
this work in the past. It seems like the sort of trick I would
have instantly added to the wiki/man page/ML, but I don't see
it right now (I only had a very quick look).

mmm. coming back to me now. have a look around bug #111 r.los
on WinGrass- with a 3D view of visibility from a spot in an
Italian valley draped over LANDSAT. screenshot is dated 1/1/10:
http://bambi.otago.ac.nz/hamish/grass/bugs/rlos_onearth.jpg

r.mapcalc rlos255 = "if(isnull(rlos), 255, rlos)"

I've still got the nviz state file and mapset's .bash_history
if you are still stuck & want to try and recreate what I did.

cut from the nviz state file:

7 7
1 1
poly
grid_wire
gouraud
surf*1262344157
map dtm@PERMANENT
0
map rlos@paolo
0
map rlos255@paolo
0
map rlos255@paolo
const 60.000000
unset
#888888
0.000000 0.000000 5.000000

ah, ok, that is a second raster surface added 5m above the
landsat DTM.

let me know if you are still stuck and I'll package up the
mapset as a tarball as an example.

Hamish

On Sat, Apr 10, 2010 at 9:35 AM, Hamish <hamish_b@yahoo.com> wrote:

Markus wrote:

Masking in NVIZ didn't have to seem an effect.

Any ideas?

Yeah, make a surface attributes mask & transparency map but with
values of 255 not 0/null.

Interesting (and strange).

It's a bit of a pain but I've made
this work in the past. It seems like the sort of trick I would
have instantly added to the wiki/man page/ML, but I don't see
it right now (I only had a very quick look).

Yes, that would be good.

mmm. coming back to me now. have a look around bug #111 r.los
on WinGrass- with a 3D view of visibility from a spot in an
Italian valley draped over LANDSAT. screenshot is dated 1/1/10:
http://bambi.otago.ac.nz/hamish/grass/bugs/rlos_onearth.jpg

... this is what I tried to achieve.

r.mapcalc rlos255 = "if(isnull(rlos), 255, rlos)"

... I tried for a while, then tried to merge outside of GRASS in
GDAL (with great help from Even Rouault in IRC) and then
eventually solved it by rescaling the values of the drape map
into the color space of the orthophoto. Of course a pain.
The perfect solution would be to look up colors in the "master"
color table and to exchange the pixel value accordingly. Then
it would work in both r.patch and nviz.

Markus