Saturday 15 July 2017

raster - How to calculate average slope in a grid?


This is actually a two part question:




  1. Which methods are there to calculate average slope by unit (say km²) for a given area? Are there any special requirements on the data - like additional information besides height measurements?

  2. Which open source GIS implement methods usable to calculate average slope on a grid (e.g. TIF file)?



Answer



The first approach is to calculate the slope for the raster. If you're looking for open source, particularly for raster calculations I'd almost always suggest GRASS. In this case you're after r.slope.aspect to calculate your slope raster.


At this point you have two options. If you're after the average slope within a km2 centred on a specific point you could try r.neighbours with the average method on the slope output. Alternately you could try r.resample to bring your raster up to km2 cells, and you'd have average slope by km2 over the entire dataset.


As far as I know there are no special requirements, other than a continuous raster - though I might try a cut/fill on the raster to smooth it out first.


Hope this helps!


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...