i am attempting a volume calculation using the route of 2 dems (upper and lower) and trying to subtract the difference.

workflow as follows: A. rasterise vector contours (v.to.rast.attr)

B. create 2 dems (r.surf.contour)

C-D. create and rasterise vector overlay (in prep for mask) (v.to.rast.attr)

this is where it goes undone:

E. create mask (r.mask) - mask the regions in 4 outside of the polygon(s) with a '0' null value and those inside the polygon with a '1' value (indicating the area to be processed).

F: calculate area (r.surf.area) G: calculate volume r.volume or r.topidx


F1: raster algebra (r.mapcalculator in grass) // raster calculator in qgis (demA - demB)

Is this an appropriate workflow or what would an appropriate workflow look like (with associated r./v/g. steps)?

  • 1
    What do you mean "goes undone"?? I think you should add two more steps to E: r.null <your mask> setnull=0 to make sure that the areas outside of the polygon are NULL and not 0. Also be sure to do g.region -p rast=<your mask>
    – Micha
    Jun 20 '14 at 17:02
  • undone = workflow stops or breaks down - cannot get past this step.
    – VeM
    Jun 22 '14 at 9:21
  • Can you try what I mentioned? Make sure the raster has only values 1 or NULL, and set the region to this raster.
    – Micha
    Jun 23 '14 at 10:01
  • @Micha: done! works nicely! Thank you! Except i have this annoying problem - if i quit application and then go back into the file, the mask changes and the null area becomes one of the mask areas (mask has non-connected 4-part area component)
    – VeM
    Jun 23 '14 at 10:07
  • 1
    Not sure I understand where r.volume and clumps are relevant to your problem. But if you do (DEM1-DEM2)*cell_resolution you will get the "cut/fill" volume between two elevation raster.
    – Micha
    Jun 24 '14 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.