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).

enter image description here

I have a 40m DEM of the region and the shapefile 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?

  • 1
    I'm having trouble understanding your exact issue. Where exactly are you stuck? what have you tried? – Devdatta Tengshe Dec 23 '15 at 16:21
  • @Devdatta Tengshe I have to convert a raster file (.tif) to an Esri ASCII grid file (txt) like the one in the picture above. I've tried to use the algorithm "r.out.gridatb" but this gives me an empty file. Perhaps there are other ways to do this. I don't know. – Gianlu_91 Dec 24 '15 at 17:09