[GRASS-user] Adding a semi-transparent layer

José Antonio Ruiz Arias jararias at ujaen.es
Thu Mar 22 06:33:03 EDT 2007


I've been trying to create the PPM/PGM pair with the PNG driver. Using the next commands I get the ppm file:

export GRASS_TRUECOLOR="TRUE"
export GRASS_WIDTH=642
export GRASS_WIDTH=371
export GRASS_PNGFILE=mde.ppm

d.mon start=PNG
d.mon select=PNG
d.rast map=mde
d.mon stop=PNG


But doing the same for the pgm file I get an error message. I have looked for some specific command in GRASS to create de pgm but I haven't found it. Also looked for the mapdisp.tcl to take it a look but I don't have it in my system (at least that's what I think). So I finally used the convert tool (ImageMagic utility) to generate the pgm from the ppm and then I composited with g.pnmcomp, but the result is not as nice as using GRASS.

So, any shortcut to solve the problem inside GRASS?

Thanks in advance


> -----Mensaje original-----
> De: Glynn Clements [mailto:glynn at gclements.plus.com]
> Enviado el: miércoles, 21 de marzo de 2007 23:44
> Para: José Antonio Ruiz Arias
> CC: grassuser at grass.itc.it
> Asunto: Re: [GRASS-user] Adding a semi-transparent layer
> 
> 
> Jos・Antonio Ruiz Arias wrote:
> 
> > on the map display of the GRASS gui is very easy to get a transparency
> > effect on a layer, but I have been trying to do it exclusively by
> command
> > line to script a task and I didn稚 success. Does anyone know how can I
> solve
> > this issue? The aim is to add a semi-transparent layer with
> climatological
> > information above a terrain raster.
> 
> If you want the end result as an image, you can use the same mechanism
> as gis.m uses, i.e. generate each layer as a PPM/PGM pair using the
> PNG driver then combine them with g.pnmcomp.
> 
> If you need the result as a map, so that you can use it as a
> background in an X monitor, use r.blend.
> 
> --
> Glynn Clements <glynn at gclements.plus.com>
> __________ Informaci





More information about the grass-user mailing list