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

Markus Neteler neteler at osgeo.org
Fri Apr 16 16:48:56 EDT 2010


On Sat, Apr 10, 2010 at 9:35 AM, Hamish <hamish_b at 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


More information about the grass-dev mailing list