0

Constraints - Use only GRASS GIS - Automated using pyGRASS

Input

  • DEM
  • River raster OR river as vector (both are computed)
  • gradient of the valley (as a float)
  • vector line with direction and magnitude of the gradient

The idea I want to create a script (pyGRASS) to execute the following steps automatically.

The general idea is to construct a "virtual surface" layer. This surface layer will be a raster with a certain extent and gradient. The direction of this gradient will be described by a vector line.

Thus, in essence I want to create a raster (of certain width) along a vector line with a certain gradient. Thus the raster will start with a certain height which will decrease along the line up untill the end of the line.

Creating "virtual surface"

I am not sure how I will actually create this surface. I've looked into r.gradient but here I have to specify the direction of the gradient by hand. I already have the direction and magnitude (vector)

Has anyone an idea or a different approach to solve this problem? Faced it before?

4
  • Sorry, but it's not clear what you are asking. What are the inputs and what is the output you expect? What do you mean "river". A river is NOT a straight line from the highest point to the lowest. This sentence in your question leaves me scratching my head: "In short, the river (with constant depth) will follow the gradient resulting in depth differences over the course of the river compared to the DEM."
    – Micha
    Aug 14, 2019 at 9:38
  • I understand why this is not clear. I'll edit my question to the core of the problem.
    – MarcM
    Aug 14, 2019 at 13:26
  • 1
    Can you use r.plane? grass.osgeo.org/grass72/manuals/r.plane.html
    – mankoff
    Aug 18, 2019 at 14:05
  • @mankoff I will look into it. At first glance, it looks promising. Thanks!
    – MarcM
    Aug 19, 2019 at 8:02

1 Answer 1

1

From @mankoff

Can you use r.plane? r.plane

1
  • r.plane was indeed the right tool to use!, Thanks
    – MarcM
    Mar 23, 2020 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.