[GRASS-user] extract by attribute from a dem
Martin Landa
landa.martin at gmail.com
Wed Nov 21 14:22:30 EST 2007
[please cc to grass-user ml...]
2007/11/21, nishith datta <nkdiitd2002 at gmail.com>:
> thanks for the prompt reply,
> sorry it didnot work either ?
> any ideas why ?
> can I somehow see the data in the raster layer - slope original. I mean the
> count of pixels and the categories i.e the slope value against each
> category.
in spearfish
$ r.slope.aspect ele=elevation.dem slope=slope
$ r.stats slope nsteps=10 -c --q
0-5.252012 731997
5.252012-10.504024 775215
10.504024-15.756036 545337
15.756036-21.008047 335709
21.008047-26.260059 152262
26.260059-31.512071 56475
31.512071-36.764083 12735
36.764083-42.016095 1251
42.016095-47.268107 117
47.268107-52.520119 9
* 358245
$ r.mapcalc 'new=if( slope <= 20, slope, null())'
$ r.stats new nsteps=10 -c --q
0-1.999213 156159
1.999213-3.998426 346518
3.998426-5.997639 352206
5.997639-7.996851 314379
7.996851-9.996064 277200
9.996064-11.995277 237015
11.995277-13.99449 210267
13.99449-15.993703 178020
15.993703-17.992916 148995
17.992916-19.992128 270
* 748323
> may be there is something wrong with the slope map.
> Also won't changing 20 to 90 in the expression if(slopeoriginal <= 20,
> slopeoriginal, null()) give me the original map again?
> thanks
> nishith
--
Martin Landa <landa.martin at gmail.com> * http://gama.fsv.cvut.cz/~landa *
More information about the grass-user
mailing list