5
* r.li.daemon: Uses UNIX sockets, replace or figure out how
7
--> 4/2014: still an issue?
9
* r.li.setup: Shell scripts, Tcl/Tk, Xmonitors to be replaced
10
by Python + wxPython equivalents.
11
See Luca D's prototype in trunk/gui/wxpython/rlisetup
12
and http://grass.osgeo.org/grass70/manuals/g.gui.rlisetup.html
13
--> 4/2014: still an issue?
4
15
# TODO: change the examples to North Carolina wherever possible:
7
g.region rast=landcover.30m -p
18
g.region raster=landcover.30m -p
8
19
r.mapcalc "forests = if(landcover.30m >= 41 && landcover.30m <= 43,1,null())"
13
# created as described in EXAMPLES, moving window, in r.li.setup/description.html:
24
# created as described in EXAMPLES, moving window, in g.gui.rlisetup.html:
14
25
echo "SAMPLINGFRAME 0|0|1|1
15
26
SAMPLEAREA -1|-1|0.015021459227467811|0.011058451816745656
16
MOVINGWINDOW" > $HOME/.r.li/history/movwindow7
27
MOVINGWINDOW" > $HOME/.grass7/r.li/movwindow7
18
r.li.patchdensity forests conf=movwindow7 out=forests_p_dens7
29
r.li.patchdensity forests conf=movwindow7 output=forests_p_dens7
19
30
d.rast.leg forests_p_dens7
21
r.to.vect forests out=forests feature=area
32
r.to.vect forests out=forests type=area
22
33
d.vect forests type=boundary
35
######## TODO: CHECK THIS:
27
38
g.copy rast=fields,MASK
28
r.li.patchdensity forests conf=movwindow7 out=forests_p_dens7mask --o
39
r.li.patchdensity forests conf=movwindow7 output=forests_p_dens7mask --o
29
41
d.rast.leg forests_p_dens7mask
30
42
# -> no negative values! but MASK is respected
34
r.li.patchdensity forests conf=movwindow7 out=forests_p_dens7 --o
45
r.mapcalc "forests = 0"
46
r.li.patchdensity forests conf=movwindow7 output=forests_p_dens7 --o
35
48
d.rast.leg forests_p_dens7mask
36
49
r.info -r forests_p_dens7
39
# -> all cells are 19.841270 ?!
42
53
========================
43
54
North Carolina tests
46
57
sh ./r.li.testing_nc_asc.sh
49
61
echo "SAMPLINGFRAME 0|0|1|1
50
SAMPLEAREA 0.0|0.0|1.0|1.0" > $HOME/.r.li/history/landsat_test
52
g.region rast=lsat7_2002_40 -p
53
r.li.shannon input=lsat7_2002_40 conf=landsat_test out=landsat_shannon
54
--> Result written to ASCII file <$HOME/.r.li/output/landsat_shannon>
62
SAMPLEAREA 0.0|0.0|1.0|1.0" > $HOME/.grass7/r.li/landsat_test
64
g.region raster=lsat7_2002_40 -p
65
r.li.shannon input=lsat7_2002_40 conf=landsat_test output=landsat_shannon
66
--> Result written to ASCII file <$HOME/.grass7/r.li/output/landsat_shannon>