I tried it just right now to see the strahler ordering and.. it works greatly!<br>well done Jarek..:-)<br>I think I'm going to read the code because I've got to understand how did you solved the problem of cleaning topology.. <br>
congratulations! great work!!!<br><br>Annalisa<br><br><br><div class="gmail_quote">2009/7/28 stephen sefick <span dir="ltr"><<a href="mailto:ssefick@gmail.com">ssefick@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It works fine on my machine. Mac OS X, compilied addon and compilied<br>
GRASS from scratch. The strahler output also looks sensable. I do<br>
have a question, though. Say I have my own delineated streams with<br>
another method, but in raster format- will this still work? And is<br>
there an easy way to a vector out of a raster stream network?<br>
<br>
Stephen Sefick<br>
<div><div></div><div class="h5"><br>
On Tue, Jul 28, 2009 at 4:32 AM, Margherita Di Leo<<a href="mailto:diregola@gmail.com">diregola@gmail.com</a>> wrote:<br>
> Hi Jarek,<br>
> I downloaded and compiled r.stream without problems but i'm afraid it does<br>
> not work:<br>
><br>
> r.stream dir=drainage@ex_20 stream=basin1@ex_20 strahler=strahler<br>
> shreeve=shreve class=class<br>
><br>
> dirs, 3<br>
> streams, 4<br>
> Reading maps...<br>
> *** glibc detected *** r.stream: corrupted double-linked list:<br>
> 0x000000000067c2c0 ***<br>
> ======= Backtrace: =========<br>
> /lib/libc.so.6[0x7f77dfb86322]<br>
> /lib/libc.so.6(cfree+0x8c)[0x7f77dfb89c1c]<br>
> r.stream(createMaps+0x353)[0x401df3]<br>
> r.stream(main+0x1c1)[0x402011]<br>
> /lib/libc.so.6(__libc_start_main+0xf4)[0x7f77dfb301c4]<br>
> r.stream[0x401619]<br>
> ======= Memory map: ========<br>
> 00400000-00404000 r-xp 00000000 08:03 5955752<br>
> /usr/local/grass-6.5.svn/bin/r.stream<br>
> 00603000-00604000 rw-p 00003000 08:03 5955752<br>
> /usr/local/grass-6.5.svn/bin/r.stream<br>
> 00604000-41e9f000 rw-p 00604000 00:00 0 [heap]<br>
> 7f77d8000000-7f77d8021000 rw-p 7f77d8000000 00:00 0<br>
> 7f77d8021000-7f77dc000000 ---p 7f77d8021000 00:00 0<br>
> 7f77df700000-7f77df70d000 r-xp 00000000 08:03 4071544 /lib/libgcc_s.so.1<br>
> 7f77df70d000-7f77df90d000 ---p 0000d000 08:03 4071544 /lib/libgcc_s.so.1<br>
> 7f77df90d000-7f77df90e000 rw-p 0000d000 08:03 4071544 /lib/libgcc_s.so.1<br>
> 7f77df90e000-7f77df910000 r-xp 00000000 08:03 6677083 /lib/<a href="http://libdl-2.7.so" target="_blank">libdl-2.7.so</a><br>
> 7f77df910000-7f77dfb10000 ---p 00002000 08:03 6677083 /lib/<a href="http://libdl-2.7.so" target="_blank">libdl-2.7.so</a><br>
> 7f77dfb10000-7f77dfb12000 rw-p 00002000 08:03 6677083 /lib/<a href="http://libdl-2.7.so" target="_blank">libdl-2.7.so</a><br>
> 7f77dfb12000-7f77dfc6a000 r-xp 00000000 08:03 6677080 /lib/<a href="http://libc-2.7.so" target="_blank">libc-2.7.so</a><br>
> 7f77dfc6a000-7f77dfe6a000 ---p 00158000 08:03 6677080 /lib/<a href="http://libc-2.7.so" target="_blank">libc-2.7.so</a><br>
> 7f77dfe6a000-7f77dfe6d000 r--p 00158000 08:03 6677080 /lib/<a href="http://libc-2.7.so" target="_blank">libc-2.7.so</a><br>
> 7f77dfe6d000-7f77dfe6f000 rw-p 0015b000 08:03 6677080 /lib/<a href="http://libc-2.7.so" target="_blank">libc-2.7.so</a><br>
> 7f77dfe6f000-7f77dfe74000 rw-p 7f77dfe6f000 00:00 0<br>
> 7f77dfe74000-7f77dfef4000 r-xp 00000000 08:03 6677084 /lib/<a href="http://libm-2.7.so" target="_blank">libm-2.7.so</a><br>
> 7f77dfef4000-7f77e00f3000 ---p 00080000 08:03 6677084 /lib/<a href="http://libm-2.7.so" target="_blank">libm-2.7.so</a><br>
> 7f77e00f3000-7f77e00f5000 rw-p 0007f000 08:03 6677084 /lib/<a href="http://libm-2.7.so" target="_blank">libm-2.7.so</a><br>
> 7f77e00f5000-7f77e010b000 r-xp 00000000 08:03 6490242<br>
> /usr/lib/libz.so.1.2.3.3<br>
> 7f77e010b000-7f77e030b000 ---p 00016000 08:03 6490242<br>
> /usr/lib/libz.so.1.2.3.3<br>
> 7f77e030b000-7f77e030c000 rw-p 00016000 08:03 6490242<br>
> /usr/lib/libz.so.1.2.3.3<br>
> 7f77e030c000-7f77e0314000 r-xp 00000000 08:03 984193<br>
> /usr/local/grass-6.5.svn/lib/<a href="http://libgrass_datetime.6.5.svn.so" target="_blank">libgrass_datetime.6.5.svn.so</a><br>
> 7f77e0314000-7f77e0513000 ---p 00008000 08:03 984193<br>
> /usr/local/grass-6.5.svn/lib/<a href="http://libgrass_datetime.6.5.svn.so" target="_blank">libgrass_datetime.6.5.svn.so</a><br>
> 7f77e0513000-7f77e0514000 rw-p 00007000 08:03 984193<br>
> /usr/local/grass-6.5.svn/lib/<a href="http://libgrass_datetime.6.5.svn.so" target="_blank">libgrass_datetime.6.5.svn.so</a><br>
> 7f77e0514000-7f77e0567000 r-xp 00000000 08:03 984236<br>
> /usr/local/grass-6.5.svn/lib/<a href="http://libgrass_gis.6.5.svn.so" target="_blank">libgrass_gis.6.5.svn.so</a><br>
> 7f77e0567000-7f77e0766000 ---p 00053000 08:03 984236<br>
> /usr/local/grass-6.5.svn/lib/<a href="http://libgrass_gis.6.5.svn.so" target="_blank">libgrass_gis.6.5.svn.so</a><br>
> 7f77e0766000-7f77e0769000 rw-p 00052000 08:03 984236<br>
> /usr/local/grass-6.5.svn/lib/<a href="http://libgrass_gis.6.5.svn.so" target="_blank">libgrass_gis.6.5.svn.so</a><br>
> 7f77e0769000-7f77e0770000 rw-p 7f77e0769000 00:00 0<br>
> 7f77e0770000-7f77e078d000 r-xp 00000000 08:03 6676548 /lib/<a href="http://ld-2.7.so" target="_blank">ld-2.7.so</a><br>
> 7f77e0926000-7f77e0965000 r--p 00000000 08:03 6521179<br>
> /usr/lib/locale/en_GB.utf8/LC_CTYPE<br>
> 7f77e0965000-7f77e0969000 rw-p 7f77e0965000 00:00 0<br>
> 7f77e0982000-7f77e0983000 r--p 00000000 08:03 6521188<br>
> /usr/lib/locale/en_GB.utf8/LC_MESSAGES/SYS_LC_MESSAGES<br>
> 7f77e0983000-7f77e098a000 r--s 00000000 08:03 6496774<br>
> /usr/lib/gconv/gconv-modules.cache<br>
> 7f77e098a000-7f77e098d000 rw-p 7f77e098a000 00:00 0<br>
> 7f77e098d000-7f77e098f000 rw-p 0001d000 08:03 6676548 /lib/<a href="http://ld-2.7.so" target="_blank">ld-2.7.so</a><br>
> 7fffe8979000-7fffe898e000 rw-p 7ffffffea000 00:00 0 [stack]<br>
> 7fffe89fe000-7fffe8a00000 r-xp 7fffe89fe000 00:00 0 [vdso]<br>
> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]<br>
> Aborted<br>
><br>
><br>
>>>> Hi list!<br>
>>>><br>
>>>> I just finish first version of new grass module r.stream. Module is<br>
>>>> regular<br>
>>>> Grass module, written in C an has no addational dependencies. It was<br>
>>>> compiled with GRASS65 devel downloaded in last two week. Source code<br>
>>>> you<br>
>>>> can find here:<br>
>>>><br>
>>>> <a href="http://heretic.livenet.pl/heretic/r.stream.tar.gz" target="_blank">http://heretic.livenet.pl/heretic/r.stream.tar.gz</a><br>
>>>><br>
>>>> Module compiles and seems to work. Analysis was tested only on one<br>
>>>> dataset.<br>
>>>><br>
>>>> To compile it copy r.streams directory to your grassXX../raster/ cd<br>
>>>> r.stream run make and make install<br>
>>>><br>
>>>> What module calculate:<br>
>>>> - strahler stream order<br>
>>>> - shreeve stream magnitude<br>
>>>> - class of topological elements of drainage networks<br>
>>>><br>
>>>> Module use r.watershed outputs: SDF flow direction and SDF stream<br>
>>>> network.<br>
>>>><br>
>>>><br>
>>>> Analysis of r.stream shall be run on same regions setings as<br>
>>>> r.watershed. If<br>
>>>> no, run g.region rast=your_dir_file first. For now module do not check<br>
>>>> if<br>
>>>> region and rasters are identical. It is planned to add in nearest<br>
>>>> feature.<br>
>>>> It also do not check if dirs and streams are SDF result. Threre are no<br>
>>>> addational description. It will be added after testing.<br>
>>>><br>
>>>> It works only on cells data. Floating points data are not allowed (and<br>
>>>> have<br>
>>>> no sense).<br>
>>>><br>
>>>> Module is quite fast. 3000 x3000 cells all three analysis runs no more<br>
>>>> than<br>
>>>> 30 s. on AMD 3800 2GB, Ubuntu 8.04<br>
>>>><br>
>>>> Module is part of comprehensive project which will add full Horton<br>
>>>> analysis<br>
>>>> and some addational terrrains analysis to Grass. More details in the<br>
>>>> feature. Any cooperation is welcome. The next module I plan is<br>
>>>> directional<br>
>>>> vectorisation of stream network.<br>
>>>><br>
>>>> For now module is available only form web address pointed below. After<br>
>>>> testing and removing critical errors it will be added to grass add-ons<br>
>>>> (or<br>
>>>> maybe to main branch?).<br>
>>>><br>
>>>> Any coments, improvements and critics is very welcome.<br>
>>>><br>
>>>> More advanced Grass developers: Please check my code. Its funny, but I<br>
>>>> don't<br>
>>>> know C.<br>
>>>> General code is based on GRASS r.topindex module (by Keith Beven and<br>
>>>> Huidae<br>
>>>> Cho, strongly modified)<br>
>>>> Strahler stream order algorithm from Saga GIS (by Victor Olaya,<br>
>>>> modified)<br>
>>>> Shreeve stream magnitude and class of topological network are my own<br>
>>>> ideas<br>
>>>><br>
>>>> Test and enjoy.<br>
>>>><br>
>>>> Jarek Jasiewicz<br>
>>>> Adam Mickiewicz University, Poznan<br>
>>>> Geoecology and Geoinformation Institute<br>
>>>> _______________________________________________<br>
>>>> grass-user mailing list<br>
>>>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
>>>> <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
>>>><br>
>>>><br>
><br>
> --<br>
> Eng. Margherita Di Leo<br>
> Ph.D. Student Methods and Technologies for Environmental Monitoring<br>
> Department of Environmental Engineering and Physics (DIFA)<br>
><br>
> University of Basilicata Campus Macchia Romana<br>
> 85100 - Potenza Italy<br>
><br>
> Office: +39-0971205363<br>
> Fax: +39-0971205160<br>
> E-mail: dileomargherita AT gmail DOT com<br>
> Skype: dileomargherita<br>
> URL:<br>
> <a href="http://www.difa.unibas.it/A_Manager_PP.do?azione=visualizzaHomePage&id=106" target="_blank">http://www.difa.unibas.it/A_Manager_PP.do?azione=visualizzaHomePage&id=106</a><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> grass-user mailing list<br>
> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
Stephen Sefick<br>
<br>
Let's not spend our time and resources thinking about things that are<br>
so little or so large that all they really do for us is puff us up and<br>
make us feel like gods. We are mammals, and have not exhausted the<br>
annoying little problems of being mammals.<br>
<br>
-K. Mullis<br>
<div><div></div><div class="h5">_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</div></div></blockquote></div><br>