[GRASS-user] Re: announcement of strahler stream order analysis

Margherita Di Leo diregola at gmail.com
Tue Jul 28 05:32:02 EDT 2009


Hi Jarek,
I downloaded and compiled r.stream without problems but i'm afraid it 
does not work:

r.stream dir=drainage at ex_20 stream=basin1 at ex_20 strahler=strahler 
shreeve=shreve class=class

dirs, 3
streams, 4
Reading maps...
*** glibc detected *** r.stream: corrupted double-linked list: 
0x000000000067c2c0 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f77dfb86322]
/lib/libc.so.6(cfree+0x8c)[0x7f77dfb89c1c]
r.stream(createMaps+0x353)[0x401df3]
r.stream(main+0x1c1)[0x402011]
/lib/libc.so.6(__libc_start_main+0xf4)[0x7f77dfb301c4]
r.stream[0x401619]
======= Memory map: ========
00400000-00404000 r-xp 00000000 08:03 5955752 
/usr/local/grass-6.5.svn/bin/r.stream
00603000-00604000 rw-p 00003000 08:03 5955752 
/usr/local/grass-6.5.svn/bin/r.stream
00604000-41e9f000 rw-p 00604000 00:00 0 [heap]
7f77d8000000-7f77d8021000 rw-p 7f77d8000000 00:00 0
7f77d8021000-7f77dc000000 ---p 7f77d8021000 00:00 0
7f77df700000-7f77df70d000 r-xp 00000000 08:03 4071544 /lib/libgcc_s.so.1
7f77df70d000-7f77df90d000 ---p 0000d000 08:03 4071544 /lib/libgcc_s.so.1
7f77df90d000-7f77df90e000 rw-p 0000d000 08:03 4071544 /lib/libgcc_s.so.1
7f77df90e000-7f77df910000 r-xp 00000000 08:03 6677083 /lib/libdl-2.7.so
7f77df910000-7f77dfb10000 ---p 00002000 08:03 6677083 /lib/libdl-2.7.so
7f77dfb10000-7f77dfb12000 rw-p 00002000 08:03 6677083 /lib/libdl-2.7.so
7f77dfb12000-7f77dfc6a000 r-xp 00000000 08:03 6677080 /lib/libc-2.7.so
7f77dfc6a000-7f77dfe6a000 ---p 00158000 08:03 6677080 /lib/libc-2.7.so
7f77dfe6a000-7f77dfe6d000 r--p 00158000 08:03 6677080 /lib/libc-2.7.so
7f77dfe6d000-7f77dfe6f000 rw-p 0015b000 08:03 6677080 /lib/libc-2.7.so
7f77dfe6f000-7f77dfe74000 rw-p 7f77dfe6f000 00:00 0
7f77dfe74000-7f77dfef4000 r-xp 00000000 08:03 6677084 /lib/libm-2.7.so
7f77dfef4000-7f77e00f3000 ---p 00080000 08:03 6677084 /lib/libm-2.7.so
7f77e00f3000-7f77e00f5000 rw-p 0007f000 08:03 6677084 /lib/libm-2.7.so
7f77e00f5000-7f77e010b000 r-xp 00000000 08:03 6490242 
/usr/lib/libz.so.1.2.3.3
7f77e010b000-7f77e030b000 ---p 00016000 08:03 6490242 
/usr/lib/libz.so.1.2.3.3
7f77e030b000-7f77e030c000 rw-p 00016000 08:03 6490242 
/usr/lib/libz.so.1.2.3.3
7f77e030c000-7f77e0314000 r-xp 00000000 08:03 984193 
/usr/local/grass-6.5.svn/lib/libgrass_datetime.6.5.svn.so
7f77e0314000-7f77e0513000 ---p 00008000 08:03 984193 
/usr/local/grass-6.5.svn/lib/libgrass_datetime.6.5.svn.so
7f77e0513000-7f77e0514000 rw-p 00007000 08:03 984193 
/usr/local/grass-6.5.svn/lib/libgrass_datetime.6.5.svn.so
7f77e0514000-7f77e0567000 r-xp 00000000 08:03 984236 
/usr/local/grass-6.5.svn/lib/libgrass_gis.6.5.svn.so
7f77e0567000-7f77e0766000 ---p 00053000 08:03 984236 
/usr/local/grass-6.5.svn/lib/libgrass_gis.6.5.svn.so
7f77e0766000-7f77e0769000 rw-p 00052000 08:03 984236 
/usr/local/grass-6.5.svn/lib/libgrass_gis.6.5.svn.so
7f77e0769000-7f77e0770000 rw-p 7f77e0769000 00:00 0
7f77e0770000-7f77e078d000 r-xp 00000000 08:03 6676548 /lib/ld-2.7.so
7f77e0926000-7f77e0965000 r--p 00000000 08:03 6521179 
/usr/lib/locale/en_GB.utf8/LC_CTYPE
7f77e0965000-7f77e0969000 rw-p 7f77e0965000 00:00 0
7f77e0982000-7f77e0983000 r--p 00000000 08:03 6521188 
/usr/lib/locale/en_GB.utf8/LC_MESSAGES/SYS_LC_MESSAGES
7f77e0983000-7f77e098a000 r--s 00000000 08:03 6496774 
/usr/lib/gconv/gconv-modules.cache
7f77e098a000-7f77e098d000 rw-p 7f77e098a000 00:00 0
7f77e098d000-7f77e098f000 rw-p 0001d000 08:03 6676548 /lib/ld-2.7.so
7fffe8979000-7fffe898e000 rw-p 7ffffffea000 00:00 0 [stack]
7fffe89fe000-7fffe8a00000 r-xp 7fffe89fe000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted


>>> Hi list!
>>>
>>> I just finish first version of new grass module r.stream. Module is regular
>>> Grass module, written in C an has no addational dependencies. It was
>>> compiled with GRASS65 devel  downloaded in last  two week. Source code you
>>> can find here:
>>>
>>> http://heretic.livenet.pl/heretic/r.stream.tar.gz
>>>
>>> Module compiles and seems to work. Analysis was tested only on one dataset.
>>>
>>> To compile it copy r.streams directory to your grassXX../raster/  cd
>>> r.stream run make and make install
>>>
>>> What module calculate:
>>> - strahler stream order
>>> - shreeve stream magnitude
>>> - class of topological elements of drainage networks
>>>
>>> Module use r.watershed outputs: SDF flow direction and SDF stream network.
>>>
>>>
>>> Analysis of r.stream shall be run on same regions setings as r.watershed. If
>>> no, run g.region rast=your_dir_file first. For now module do not check if
>>> region and rasters are identical. It is planned to add in nearest feature.
>>> It also do not check if dirs and streams are SDF result. Threre are no
>>> addational description. It will be added after testing.
>>>
>>> It works only on cells data. Floating points data are not allowed (and have
>>> no sense).
>>>
>>> Module is quite fast. 3000 x3000 cells all three analysis runs no more than
>>> 30 s. on AMD 3800 2GB, Ubuntu 8.04
>>>
>>> Module is part of comprehensive project which will add full Horton analysis
>>> and some addational terrrains analysis to Grass. More details in the
>>> feature. Any cooperation is welcome. The next module I plan is directional
>>> vectorisation of stream network.
>>>
>>> For now module is available only form web address pointed below. After
>>> testing and removing critical errors it will be added to grass add-ons (or
>>> maybe to main branch?).
>>>
>>> Any coments, improvements and critics is very welcome.
>>>
>>> More advanced Grass developers: Please check my code. Its funny, but I don't
>>> know C.
>>> General code is based on GRASS r.topindex module (by Keith Beven and Huidae
>>> Cho, strongly modified)
>>> Strahler stream order algorithm from Saga GIS (by Victor Olaya, modified)
>>> Shreeve stream magnitude and class of topological network are my own ideas
>>>
>>> Test and enjoy.
>>>
>>> Jarek Jasiewicz
>>> Adam Mickiewicz University, Poznan
>>> Geoecology and Geoinformation Institute
>>> _______________________________________________
>>> grass-user mailing list
>>> grass-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>
>>>     
>>>       

-- 
Eng. Margherita Di Leo
Ph.D. Student 
Methods and Technologies for Environmental Monitoring
Department of Environmental Engineering and Physics (DIFA)

University of Basilicata 
Campus Macchia Romana
85100 - Potenza 
Italy

Office: +39-0971205363
Fax: +39-0971205160
E-mail: dileomargherita AT gmail DOT com
Skype: dileomargherita
URL: http://www.difa.unibas.it/A_Manager_PP.do?azione=visualizzaHomePage&id=106







More information about the grass-user mailing list