Talk:Using GRASS GIS through Python and tangible interfaces (workshop at FOSS4G NA 2016): Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(Created page with "=TODO= * link TL presentation")
 
(solutions)
Line 1: Line 1:
=TODO=
=TODO=
* link TL presentation
* link TL presentation
= Solutions =
1. Compute topographic index using r.topidx.
<source lang="python">
def run_slope(scanned_elev, env, **kwargs):
    gscript.run_command('r.topidx', input=scanned_elev, output='topidx', env=env)
</source>
2. Compute topographic aspect (slope orientation) using r.slope.aspect and reclassify it into 8 main directions.
3. Show areas with concave profile and tangential curvature (concave forms have negative curvature).
4. Derive peaks using either r.geomorphon or r.param.scale and convert them to points (using r.to.vect and v.to.points). From each of those points compute visibility with observer height of your choice a derive a cumulative viewshed layer where the value of each cell represents the number of peaks the cell is visible from (use r.series).
5. Find a least cost path between 2 points (for example from x=638360, y=220030 to x=638888, y=220388) where cost is defined as topographic index (trying avoid areas). Use r.topidx.
6. Compute erosion with spatially variable landcover and soil erodibility (use rasters cfactorbare_1m and soils_Kfactor from the provided dataset). Reclassify the result into 7 classes based on severity of erosion and deposition:

Revision as of 20:36, 26 April 2016

TODO

  • link TL presentation

Solutions

1. Compute topographic index using r.topidx.

def run_slope(scanned_elev, env, **kwargs):
    gscript.run_command('r.topidx', input=scanned_elev, output='topidx', env=env)

2. Compute topographic aspect (slope orientation) using r.slope.aspect and reclassify it into 8 main directions.

3. Show areas with concave profile and tangential curvature (concave forms have negative curvature).

4. Derive peaks using either r.geomorphon or r.param.scale and convert them to points (using r.to.vect and v.to.points). From each of those points compute visibility with observer height of your choice a derive a cumulative viewshed layer where the value of each cell represents the number of peaks the cell is visible from (use r.series).

5. Find a least cost path between 2 points (for example from x=638360, y=220030 to x=638888, y=220388) where cost is defined as topographic index (trying avoid areas). Use r.topidx.

6. Compute erosion with spatially variable landcover and soil erodibility (use rasters cfactorbare_1m and soils_Kfactor from the provided dataset). Reclassify the result into 7 classes based on severity of erosion and deposition: