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?

closed as unclear what you're asking by PolyGeo Oct 5 '16 at 20:55

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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