[GRASS-user] Making a MASK raster in a C Script

Dear all,
In a C script, I need to create a MASK from a raster map. I saw that the r.mask command is a front-end of the r.mapcalc command.
Is there a C function or library to create a MASK for a C script or do we need to use the r.mapcalc library ?

Thanks for any answer !

Michael Rabotin

--
*********************************

Michaël Rabotin
Ingénieur d'étude en géomatique / GIS Engineer

Laboratoire d'étude des Interactions Sol, Agrosystème et Hydrosystème

UMR LISAH SupAgro-INRA-IRD
Bat. 24
2 place Viala
34060 Montpellier cedex 1
FRANCE

LISAH : Laboratory Interactions between Soils, Agrosystems and Hydrosystems
Multi-Institute Research Unit (UMR)
French National Institute for Agricultural Research (INRA)
French Institute for Research and Overseas Development (IRD)
School of Agronomy of Montpellier (SupAgro)

Téléphone / Phone number : 33 (0)4 99 61 23 85
Secrétariat / Secretariat : 33 (0)4 99 61 22 61
Fax : 33 (0)4 67 63 26 14
E-mail : rabotin@supagro.inra.fr
Site web / website: http://www.umr-lisah.fr/
Site web OpenFLUID / OpenFLUID website: http://www.umr-lisah.fr/openfluid/
*********************************

rabotin wrote:

In a C script, I need to create a MASK from a raster map. I
saw that the r.mask command is a front-end of the r.mapcalc
command.
Is there a C function or library to create a MASK for a C
script or do we need to use the r.mapcalc library ?

all you need to do is to create a raster map called "MASK"
somewhere in the mapset search path. The only thing special
about it is its name, otherwise create it like any other map,
either in C using libgis or with the output= option of any
module, or g.rename, or g.copy.

Hamish