I'm using QGIS and I have to create a mask file (.txt) as an input for a hydrological model. The file should be a numerical grid map that represents the elevation points of a catchment area, like the example in the following picture (where values 0 represent points which are out of the interest zone).
I have a 40m DEM of the region and the shape file of the catchment area. I need a cell size of 100m and the points out of the area must be -9999.
Does anyone know how I can do this with QGIS or if I can use just a program like R?
Thanks!!
أكثر...

I have a 40m DEM of the region and the shape file of the catchment area. I need a cell size of 100m and the points out of the area must be -9999.
Does anyone know how I can do this with QGIS or if I can use just a program like R?
Thanks!!
أكثر...