Assuming you start with a DEM called terrain, I would try to:
I. Digitize a border around the pile. Either:
- Prepare a text file with the polygon vertices. The format is called 'standard' and is described in https://grass.osgeo.org/grass64/manuals/v.in.ascii.html. It will look something like:
where N is the number of vertices in one boundary. The structure repeats for more than one boundary. Then, import the text file:
v.in.ascii -n format=standard input=textFile.txt output=pile_boundary
- If you're using grass6, you might just be able to digitize the boundary using: v.digit -n map=pile_boundary bgcmd="d.rast map=terrain_surface"
- For grass7, v.edit may help although I haven't used it.
II. Make a new terrain surface by punching out the pile and estimating the ground under the pile
# convert the digitized vector boundary to raster area
v.to.rast type=area use=cat input=pile_boundary output=pile_area
# punch out the pile and reinterpolate underneath it to estimate the terrain surface bellow the pile.
# FYI, grass 6 and 7 r.mapcalc syntax is a little different.
r.fillnulls input=terrain_wo_pile output=terrain_below_pile
III. Calculate the area of the pile itself
r.volume data=pile_height_above_terrain clump=pile_area