I have a height model of a quite big area saved in Esri ASCII grid files and a road network of this same area in a shapefile. I'd like to convert every height model value outside the road network to -999.999 (NODATA_value in my .asc-files), as I won't be needing them. This would reduce amount of data massively as I will later use only real values and forget those NODATA_values.
Is there any reasonable way to do this, for example in QGIS or ArcMap? Would it even be possible to have a few meters wide buffer around the roads, just to be sure that there will be every needed height value in the end?