I am doing research at graduate school. Using QGIS GRASS, I made a raster image (DEM) by spline interpolation from point data. Next, I decided to limit the range to within the vector (within the point data). When I masked it in the raster menu, it was not restricted in the vector, and the resulting raster image became a yellow image (with no value). What is the solution for this?
1 Answer
Your question is not quite clear.
If you want to mask out values of a DEM that are above or below the minimum and maximum of a vector, using GRASS here's what you can do: Assuming you have a vector of points "point_elevations" with column "elev", and your DEM raster is called "dem". You can find the minimum and maximum with:
v.univar point_elevations column=elev
This will output all the univariate stats for the elev "column" including minimum and maximum. Let's call them "min_value" and "max_value". Now use these value in a mapcalc expression to create a new, masked dem:
r.mapcalc "dem_masked = if(dem >= min_value && dem <= max_value, dem, null())"
You enter the actual min and max values from the v.univar output. This will result in a new GRASS raster, "dem_masked" with null (no value) in place of the high and low elevations.