[GRASS5] r.li (landscape indices)

Hi,

it's done :slight_smile:
I have received latest changes from Serena via Paolo and uploaded
it to CVS with a series of further fixes (documentation basically and
Windows to Unix file encoding).

We now have:
r.li: package overview
r.li.cwed: Calculates contrast Weighted Edge Density index on a raster map
r.li.dominance: Calculates dominance's diversity index on a raster map
r.li.edgedensity: Calculates edge density index on a raster map, using a 4 neighbour algorithm
r.li.mpa: Calculates mean pixel attribute index on a raster map.
r.li.mps: Calculates mean patch size index on a raster map, using a 4 neighbour algorithm
r.li.padcv: Calculates coefficient of variation of patch area on a raster map
r.li.padrange: Calculates range of patch area size on a raster map
r.li.padsd: Calculates standard deviation of patch area a raster map
r.li.patchdensity: Calculates patch density index on a raster map, using a 4 neighbour algorithm
r.li.patchnum: Calculates patch number index on a raster map, using a 4 neighbour algorithm
r.li.richness: Calculates dominance's diversity index on a raster map.
r.li.setup: Configuration editor for r.li.'index'
r.li.shannon: Calculates Shannon's diversity index on a raster map
r.li.shape: Calculates shape index on a raster map
r.li.simpson: Calculates Simpson's diversity index on a raster map.

Looks like a pretty nice suite now. Please test.
Thanks for your hard work, Serena!

Markus

v.extrude caused wish 8.4 to crash in two different cvs builds from
Kyngchaos.
Model: PowerMac7,2, BootROM 5.1.4f0, 2 processors, PowerPC 970 (2.2),
1.8 GHz, 1 GB
Graphics: GeForce FX 5200, GeForce FX 5200, AGP, 64 MB

Date/Time: 2007-02-08 18:32:45.993 +0100
OS Version: 10.4.8 (Build 8L127)
Report Version: 4

Command: wish8.4
Path:
/Applications/Grass/GRASS_63_cvs_070205.app/Contents/Resources/bin/wish8.4
Parent: v.extrude [7271]

Version: GRASS 6.3.0-CVS-07020401 (6.3.0)

PID: 7272
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_INVALID_ADDRESS (0x0001) at 0x7c0802ee

Thread 0 Crashed:
0 libtk8.4.dylib 0x0b0282ac RecomputePlacement + 464
1 libtcl8.4.dylib 0x0a069b9c TclServiceIdle + 100
2 libtcl8.4.dylib 0x0a058738 Tcl_DoOneEvent + 380
3 libtk8.4.dylib 0x0b00b814 Tk_UpdateObjCmd + 72
4 libtcl8.4.dylib 0x0a010ce0 TclEvalObjvInternal + 760
5 libtcl8.4.dylib 0x0a034338 TclExecuteByteCode + 2692
6 libtcl8.4.dylib 0x0a038fa4 TclCompEvalObj + 372
7 libtcl8.4.dylib 0x0a063120 TclObjInterpProc + 384
8 libtcl8.4.dylib 0x0a010ce0 TclEvalObjvInternal + 760
9 libtcl8.4.dylib 0x0a010f94 Tcl_EvalEx + 380
10 libtcl8.4.dylib 0x0a0206d4 TraceVarProc + 464
11 libtcl8.4.dylib 0x0a06ef94 CallVarTraces + 588
12 libtcl8.4.dylib 0x0a06f4e0 TclPtrSetVar + 996
13 libtcl8.4.dylib 0x0a034c0c TclExecuteByteCode + 4952
14 libtcl8.4.dylib 0x0a038fa4 TclCompEvalObj + 372
15 libtcl8.4.dylib 0x0a063120 TclObjInterpProc + 384
16 libtcl8.4.dylib 0x0a010ce0 TclEvalObjvInternal + 760
17 libtcl8.4.dylib 0x0a034338 TclExecuteByteCode + 2692
18 libtcl8.4.dylib 0x0a038fa4 TclCompEvalObj + 372
19 libtcl8.4.dylib 0x0a063120 TclObjInterpProc + 384
20 libtcl8.4.dylib 0x0a010ce0 TclEvalObjvInternal + 760
21 libtcl8.4.dylib 0x0a034338 TclExecuteByteCode + 2692
22 libtcl8.4.dylib 0x0a038fa4 TclCompEvalObj + 372
23 libtcl8.4.dylib 0x0a063120 TclObjInterpProc + 384
24 libtcl8.4.dylib 0x0a010ce0 TclEvalObjvInternal + 760
25 libtcl8.4.dylib 0x0a034338 TclExecuteByteCode + 2692
26 libtcl8.4.dylib 0x0a038fa4 TclCompEvalObj + 372
27 libtcl8.4.dylib 0x0a011b78 Tcl_EvalObjEx + 468
28 libtcl8.4.dylib 0x0a0175c0 Tcl_IfObjCmd + 472
29 libtcl8.4.dylib 0x0a010ce0 TclEvalObjvInternal + 760
30 libtcl8.4.dylib 0x0a034338 TclExecuteByteCode + 2692
31 libtcl8.4.dylib 0x0a038fa4 TclCompEvalObj + 372
32 libtcl8.4.dylib 0x0a063120 TclObjInterpProc + 384
33 libtcl8.4.dylib 0x0a010ce0 TclEvalObjvInternal + 760
34 libtcl8.4.dylib 0x0a034338 TclExecuteByteCode + 2692
35 libtcl8.4.dylib 0x0a038fa4 TclCompEvalObj + 372
36 libtcl8.4.dylib 0x0a011b78 Tcl_EvalObjEx + 468
37 libtcl8.4.dylib 0x0a044274 TclChannelEventScriptInvoker + 64
38 libtcl8.4.dylib 0x0a0475a8 Tcl_NotifyChannel + 288
39 libtcl8.4.dylib 0x0a07c79c FileHandlerEventProc + 124
40 libtcl8.4.dylib 0x0a05836c Tcl_ServiceEvent + 160
41 libtcl8.4.dylib 0x0a058724 Tcl_DoOneEvent + 360
42 libtk8.4.dylib 0x0b014310 Tk_MainLoop + 60
43 libtk8.4.dylib 0x0b0215f8 Tk_MainEx + 1536
44 wish8.4 0x00005a94 main + 60
45 wish8.4 0x00005678 _start + 760
46 wish8.4 0x0000537c start + 48

Thread 1:
0 libSystem.B.dylib 0x9001f08c select + 12
1 libtcl8.4.dylib 0x0a07cd68 NotifierThreadProc + 456
2 libSystem.B.dylib 0x9002b508 _pthread_body + 96

Thread 0 crashed with PPC Thread State 64:
  srr0: 0x000000000b0282ac srr1: 0x100000000000f030
     vrsave: 0x0000000000000000
    cr: 0x24044428 xer: 0x0000000000000000 lr:
0x000000000b02846c ctr: 0x0000000090000dc8
    r0: 0x0000000000000000 r1: 0x00000000bfffb390 r2:
0x0000000043300000 r3: 0x000000007c0802a6
    r4: 0x00000000006a8608 r5: 0x000000007fffffff r6:
0x0000000090010008 r7: 0xffffffff80808080
    r8: 0x0000000000000000 r9: 0x0000000039210048 r10:
0x0000000000000000 r11: 0x000000000b0b80ec
   r12: 0x0000000090000dc8 r13: 0x0000000000000684 r14:
0x000000000001907c r15: 0x0000000000010408
   r16: 0x00000000bfffbf18 r17: 0x00000000bfffc4d4 r18:
0x00000000006d2008 r19: 0x000000000000001a
   r20: 0x00000000bfffb834 r21: 0x0000000000000000 r22:
0x0000000000000000 r23: 0x0000000000000001
   r24: 0x0000000000000000 r25: 0x0000000000000001 r26:
0x00000000ffffffff r27: 0x0000000000000000
   r28: 0x0000000000000957 r29: 0x000000000064fc68 r30:
0x000000000b083558 r31: 0x000000000b0280ec

Binary Images Description:
    0x1000 - 0x5fff wish8.4
/Applications/Grass/GRASS_63_cvs_070205.app/Contents/Resources/bin/wish8.4
0xa000000 - 0xa08afff libtcl8.4.dylib
/Applications/Grass/GRASS_63_cvs_070205.app/Contents/Resources/lib/libtcl8.4.dylib
0xb000000 - 0xb0b3fff libtk8.4.dylib
/Applications/Grass/GRASS_63_cvs_070205.app/Contents/Resources/lib/libtk8.4dylib
0x8f544000 - 0x8f60ffff libX11.6.dylib /usr/X11R6/lib/libX11.6.dylib
0x8fe00000 - 0x8fe51fff dyld 45.3 /usr/lib/dyld
0x90000000 - 0x901bcfff libSystem.B.dylib /usr/lib/libSystem.B.dylib
0x90214000 - 0x90219fff libmathCommon.A.dylib
/usr/lib/system/libmathCommon.A.dylib
0x907ba000 - 0x90893fff com.apple.CoreFoundation 6.4.6 (368.27)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x908de000 - 0x909e0fff libicucore.A.dylib /usr/lib/libicucore.A.dylib
0x90a3a000 - 0x90abefff libobjc.A.dylib /usr/lib/libobjc.A.dylib
0x90b6e000 - 0x90b80fff libauto.dylib /usr/lib/libauto.dylib
0x94bee000 - 0x94c0efff libmx.A.dylib /usr/lib/libmx.A.dylib

******************************************************
Dr. Agustín Diez Castillo
Departament de Prehistòria i Arqueologia
Universitat de València Phone:
Avda. Blasco Ibañez, 28 Fax:
València 46010
******************************************************

OK. Now that the names are finalized, they can go in the menu.

Michael

On 2/8/07 10:02 AM, "Markus Neteler" <neteler@itc.it> wrote:

Hi,

it's done :slight_smile:
I have received latest changes from Serena via Paolo and uploaded
it to CVS with a series of further fixes (documentation basically and
Windows to Unix file encoding).

We now have:
r.li: package overview
r.li.cwed: Calculates contrast Weighted Edge Density index on a raster map
r.li.dominance: Calculates dominance's diversity index on a raster map
r.li.edgedensity: Calculates edge density index on a raster map, using a
4 neighbour algorithm
r.li.mpa: Calculates mean pixel attribute index on a raster map.
r.li.mps: Calculates mean patch size index on a raster map, using a 4
neighbour algorithm
r.li.padcv: Calculates coefficient of variation of patch area on a
raster map
r.li.padrange: Calculates range of patch area size on a raster map
r.li.padsd: Calculates standard deviation of patch area a raster map
r.li.patchdensity: Calculates patch density index on a raster map, using
a 4 neighbour algorithm
r.li.patchnum: Calculates patch number index on a raster map, using a 4
neighbour algorithm
r.li.richness: Calculates dominance's diversity index on a raster map.
r.li.setup: Configuration editor for r.li.'index'
r.li.shannon: Calculates Shannon's diversity index on a raster map
r.li.shape: Calculates shape index on a raster map
r.li.simpson: Calculates Simpson's diversity index on a raster map.

Looks like a pretty nice suite now. Please test.
Thanks for your hard work, Serena!

Markus

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Should I take the r.le series out of the menu? My understanding is that the
r.li set pretty much replaces them functionally.

Michael

On 2/8/07 11:57 AM, "Michael Barton" <michael.barton@asu.edu> wrote:

OK. Now that the names are finalized, they can go in the menu.

Michael

On 2/8/07 10:02 AM, "Markus Neteler" <neteler@itc.it> wrote:

Hi,

it's done :slight_smile:
I have received latest changes from Serena via Paolo and uploaded
it to CVS with a series of further fixes (documentation basically and
Windows to Unix file encoding).

We now have:
r.li: package overview
r.li.cwed: Calculates contrast Weighted Edge Density index on a raster map
r.li.dominance: Calculates dominance's diversity index on a raster map
r.li.edgedensity: Calculates edge density index on a raster map, using a
4 neighbour algorithm
r.li.mpa: Calculates mean pixel attribute index on a raster map.
r.li.mps: Calculates mean patch size index on a raster map, using a 4
neighbour algorithm
r.li.padcv: Calculates coefficient of variation of patch area on a
raster map
r.li.padrange: Calculates range of patch area size on a raster map
r.li.padsd: Calculates standard deviation of patch area a raster map
r.li.patchdensity: Calculates patch density index on a raster map, using
a 4 neighbour algorithm
r.li.patchnum: Calculates patch number index on a raster map, using a 4
neighbour algorithm
r.li.richness: Calculates dominance's diversity index on a raster map.
r.li.setup: Configuration editor for r.li.'index'
r.li.shannon: Calculates Shannon's diversity index on a raster map
r.li.shape: Calculates shape index on a raster map
r.li.simpson: Calculates Simpson's diversity index on a raster map.

Looks like a pretty nice suite now. Please test.
Thanks for your hard work, Serena!

Markus

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is very much up to Markus. The current set of indices in r.li is
more limited than in r.le, though. I understand that keeping them side
to side can be confusing to new users.
pc

Michael Barton ha scritto:

Should I take the r.le series out of the menu? My understanding is that the
r.li set pretty much replaces them functionally.

Michael

- --
Paolo Cavallini
email+jabber: cavallini@faunalia.it
www.faunalia.it
Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy Tel: (+39)348-3801953
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFzBYs/NedwLUzIr4RAh5EAKCvkVuKoPcJ+fBJ7i4JNkKD711z0wCgn39U
m+0a35C9VjjBWz/tezV8IGk=
=nwqY
-----END PGP SIGNATURE-----

Hi,

I don't think that I can judge that because I don't know which parts
of r.le really (still) work and if r.li was already tested.

Markus

Paolo Cavallini wrote on 02/09/2007 07:35 AM:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is very much up to Markus. The current set of indices in r.li is
more limited than in r.le, though. I understand that keeping them side
to side can be confusing to new users.
pc

Michael Barton ha scritto:
  

Should I take the r.le series out of the menu? My understanding is that the
r.li set pretty much replaces them functionally.

Michael
    

I am in agreement with Paolo.
-serena-

Quoting Markus Neteler <neteler@itc.it>:

Hi,

I don't think that I can judge that because I don't know which parts
of r.le really (still) work and if r.li was already tested.

Markus

Paolo Cavallini wrote on 02/09/2007 07:35 AM:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is very much up to Markus. The current set of indices in r.li is
more limited than in r.le, though. I understand that keeping them side
to side can be confusing to new users.
pc

Michael Barton ha scritto:

Should I take the r.le series out of the menu? My understanding is that the
r.li set pretty much replaces them functionally.

Michael

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

I've left both in for now given the uncertainty. I hope users won't be too
confused, but rather amazed that GRASS has two different landscape analysis
packages :wink:

Michael

On 2/9/07 2:55 AM, "pallecch@cli.di.unipi.it" <pallecch@cli.di.unipi.it>
wrote:

I am in agreement with Paolo.
-serena-

Quoting Markus Neteler <neteler@itc.it>:

Hi,

I don't think that I can judge that because I don't know which parts
of r.le really (still) work and if r.li was already tested.

Markus

Paolo Cavallini wrote on 02/09/2007 07:35 AM:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is very much up to Markus. The current set of indices in r.li is
more limited than in r.le, though. I understand that keeping them side
to side can be confusing to new users.
pc

Michael Barton ha scritto:

Should I take the r.le series out of the menu? My understanding is that the
r.li set pretty much replaces them functionally.

Michael

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

r.li wa tested. futhermore, we're doing some additional testing for the
upcoming IT grass meeting.
pc

Markus Neteler ha scritto:

Hi,

I don't think that I can judge that because I don't know which parts
of r.le really (still) work and if r.li was already tested.

Markus

- --
Paolo Cavallini
email+jabber: cavallini@faunalia.it
www.faunalia.it
Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy Tel: (+39)348-3801953
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFzXuK/NedwLUzIr4RAmmEAJ90P/fzbqvE+ltWtncj6eNlSwRHIwCfeOaE
fALM6+CGwrOvE5mGLJ5eGW0=
=YlGQ
-----END PGP SIGNATURE-----

I tried r.li.setup today and it failed due to a mixture
of Windows and Unix encoding:

GRASS 6.3.cvs (spearfish60):~ > r.li.setup help
bash: /home/neteler/soft/63grass_cvsexp/dist.i686-pc-linux-gnu/scripts/r.li.setup: /bin/sh^M: bad interpreter: File or directory not found

I have fixed that in CVS now.

Remaining problem (?):
  file raster/r.li/r.li.mps/mps.c
  raster/r.li/r.li.mps/mps.c: UTF-8 Unicode C program text

Should this file converted to ASCII, too? If yes, how? My 'iconv'
tries failed.

Markus

On Sat, Feb 10, 2007 at 09:00:11AM +0100, Paolo Cavallini wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

r.li wa tested. futhermore, we're doing some additional testing for the
upcoming IT grass meeting.
pc

Markus Neteler wrote:

I tried r.li.setup today and it failed due to a mixture
of Windows and Unix encoding:

GRASS 6.3.cvs (spearfish60):~ > r.li.setup help
bash: /home/neteler/soft/63grass_cvsexp/dist.i686-pc-linux-gnu/scripts/r.li.setup: /bin/sh^M: bad interpreter: File or directory not found

I have fixed that in CVS now.

Remaining problem (?):
  file raster/r.li/r.li.mps/mps.c
  raster/r.li/r.li.mps/mps.c: UTF-8 Unicode C program text

Should this file converted to ASCII, too? If yes, how? My 'iconv'
tries failed.

The file has a non-ASCII character in the comment at line 1171:

          else /*l'albero non è null*/

As every other comment in that file is in English, the obvious
solution is to translate the comment, thus eliminating the need for
any non-ASCII characters.

--
Glynn Clements <glynn@gclements.plus.com>

On Sat, Feb 10, 2007 at 10:02:57AM +0000, Glynn Clements wrote:

Markus Neteler wrote:
> Remaining problem (?):
> file raster/r.li/r.li.mps/mps.c
> raster/r.li/r.li.mps/mps.c: UTF-8 Unicode C program text
>

> Should this file converted to ASCII, too? If yes, how? My 'iconv'
> tries failed.

The file has a non-ASCII character in the comment at line 1171:

          else /*l'albero non ? null*/

As every other comment in that file is in English, the obvious
solution is to translate the comment, thus eliminating the need for
any non-ASCII characters.

Fixed in CVS.

Markus