[GRASS-dev] r.watershed and swap memory

Helena Mitasova hmitaso at unity.ncsu.edu
Wed Mar 19 10:54:09 EDT 2008

Ivan - instead of using the small threshold that is killing it, if  
you need just the stream network use arbitrarily large threshold and  
derive your stream network from the accum file like this

r.mapcalc "mystreams=if(abs(myaccum)>30,1,null())"
or you can use abs(myaccum) instead of 1 if you need contributing  
area for each stream cell.

(isn't this in the man page? I have been doing it that way for years)


On Mar 19, 2008, at 10:43 AM, ivan marchesini wrote:

> Hi Hamish...
> yes.. my threshold is really small (30 cells, because I need a very
> detailed stream network in output), and this can probably have a  
> strong
> effect on the time of analysis...
> However I'm really surprised of your results with 170000000 of  
> cells...
> and 2 Gb of ram...!!
> really impressive...
> I have tried over two different computers (with 2 Gb of ram), but the
> result is the same... so I think that the problem is not on the  
> quality
> of the ram or other similar thinks but on the dimension of the
> dataset...
> I will try with different resolution as soon as possible... but at the
> end I need this resolution because I have "cleaned" the dem with
> v.breach to obtain a hydrologically correct dem and now I must use  
> this
> dem to derive the drainage...
> Many thanks for your interest....
> Ivan
> Il giorno mar, 18/03/2008 alle 18.05 -0700, Hamish ha scritto:
>> e region slightly or
>> run with a slightly coarser resolution to see where the memory limit
>> is?
> -- 
> Ti prego di cercare di non inviarmi files .dwg, .doc, .xls, .ppt.
> Preferisco formati liberi.
> Please try to avoid to send me .dwg, .doc, .xls, .ppt files.
> I prefer free formats.
> http://it.wikipedia.org/wiki/Formato_aperto
> http://en.wikipedia.org/wiki/Open_format
> Ivan Marchesini
> Department of Civil and Environmental Engineering
> University of Perugia
> Via G. Duranti 93/a
> 06125
> Perugia (Italy)
> Socio fondatore GFOSS "Geospatial Free and Open Source Software"  
> http://www.gfoss.it
> e-mail: marchesini at unipg.it
>         ivan.marchesini at gmail.com
> tel: +39(0)755853760
> fax (university): +39(0)755853756
> fax (home): +39(0)5782830887
> jabber: geoivan73 at jabber.org
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev

More information about the grass-dev mailing list