[GRASS-user] Calculate the average slope by unit

Hello,

I would like to calculate the average slope by square kilometer for a giving
area. I have a raster of the considere area with the altitude. So my plan is
to create a grid of square of 1 km² and to calculate for each square the
average slope.

My main problem is that I don"t have any idea how to make it with grass.

Could someone give some tips?

I put the raster i use at the following adress:

http://www.megaupload.com/?d=IWRZC0HH

Thanks

Jon
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Calculate-the-average-slope-by-unit-tp5464640p5464640.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Jon wrote:

I would like to calculate the average slope by square kilometer
for a giving area. I have a raster of the considere area with
the altitude. So my plan is to create a grid of square of 1 km²
and to calculate for each square the average slope.

My main problem is that I don"t have any idea how to make
it with grass.

- make a slope map from the DEM with r.slope.aspect at the same
resolution and bounds as the DEM. (run 'g.region rast=dem' first)

- make the grid with v.mkgrid, with box=1000,1000 (assuming the
location is meters-based)

- draw a 1 km x 1 km grid (d.grid), and overlay the v.mkgrid
vector map (area fill = none, or only display boundary features,
colored red or so) just to verify where it will be and what it
will look like.

- run v.rast.stats to calculate stats for each grid box, and
upload to that area's attribute table.

Could someone give some tips?
I put the raster i use at the following adress:
http://www.megaupload.com/?d=IWRZC0HH

Hamish

On Thu, Aug 26, 2010 at 10:35 AM, Hamish <hamish_b@yahoo.com> wrote:

Jon wrote:

I would like to calculate the average slope by square kilometer
for a giving area.

[...]

- run v.rast.stats to calculate stats for each grid box, and
upload to that area's attribute table.

Now in the Wiki as FAQ:
http://grass.osgeo.org/wiki/Raster_aggregate_values

Markus

Hamish wrote:

Jon wrote:

I would like to calculate the average slope by square kilometer
for a giving area. I have a raster of the considere area with
the altitude. So my plan is to create a grid of square of 1 km²
and to calculate for each square the average slope.

My main problem is that I don"t have any idea how to make
it with grass.

- make a slope map from the DEM with r.slope.aspect at the same
resolution and bounds as the DEM. (run 'g.region rast=dem' first)

- make the grid with v.mkgrid, with box=1000,1000 (assuming the
location is meters-based)

- draw a 1 km x 1 km grid (d.grid), and overlay the v.mkgrid
vector map (area fill = none, or only display boundary features,
colored red or so) just to verify where it will be and what it
will look like.

- run v.rast.stats to calculate stats for each grid box, and
upload to that area's attribute table.

Simpler alternative with r.resamp.stats:
- get slope as described above
- set the region resolution to 1km
- run r.resamp.stats with slope as input and method=average

Markus M

Markus Metz wrote:

Simpler alternative with r.resamp.stats:
- get slope as described above
- set the region resolution to 1km
- run r.resamp.stats with slope as input and method=average

right, realized and added to the faq page minutes after original postings :slight_smile:

H