This is to confirm that solution mentioned below for problems related with large DEM processing using r.stream.basins really works:<br><br><br>Problem: ( I don't know why it is not in my mail.)<br><br>r.stream.basins returns " Stream and direction map probably do not match" when run on BIG DEMs.<br>
For detail of problems , please see this discussion below:<br><br><pre style="margin: 0em;">Francesco Mirabella pisze:<br></pre><blockquote style="border-left: 0.2em solid rgb(85, 85, 238); margin: 0em; padding-left: 0.85em;">
<pre style="margin: 0em;">Hi,<br>more detailes are these, I can not reproduce it on speafish,<br><br>Grass 6.4 rc6 compiled on debian testing<br></pre><tt>The dem is the srtm 90 m dem, cut on an area of 12064631712 Square
</tt><tt>meters (1206463 hectars).
</tt><tt>The region was set to the dem raster, I provided a minimum flow
</tt><tt>accumulation of 100 to get a "reasonable" river network.
</tt><pre style="margin: 0em;">Hope this can help<br><br>Francesco<br><br>J<br></pre></blockquote><pre style="margin: 0em;">It looks very strange:<br><br></pre><tt>if your 90 m srtm has 12064631712 m2 it means it has more or less
</tt><tt>1.500.000 number of cells (depending on latitude). It also means that it
</tt><tt>is more or less 1250x1250 cells DEM. If you have used 100 cells
</tt><tt>accumulation threshold you shouldn't receive such dense network with
</tt><tt>7500 streams. With DEM of such size and such threshold expected number
</tt><tt>of streams is about 1000-2000.
</tt><tt>However if you created 7500 network on such small dem it shouldn't work
</tt><tt>indeed.
</tt><tt>r.stream.basins is not prepared for calculation of direct basins (half
</tt><tt>basins) it it rather expanded version of r.water.outlet. If you however
</tt><tt>need direct basins for such dense network you can do it "hacking" source
</tt><tt>code.
</tt><pre style="margin: 0em;">find this fragment of code:<br>(catchment.c, line 24)<br><br>int out_max = ncols + nrows;<br><br>and change it into this:<br><br>int out_max = (ncols + nrows)*10;<br><br>and recompile program again.<br>
<br></pre><tt>If this is the reason (however values you wrote are not consistent) I
</tt><tt>will not change the source code because as I wrote it is not prepared
</tt><tt>for that what you're try to do
</tt><pre style="margin: 0em;">hth<br>Jarek<br><br> In the line above, I multiplied by 100.<br><br>Output of manual compilation and compiled file ( only .o files, "sudo make install" still to be run over it.) are attached, if it helps.<br>
</pre><br><br><div class="gmail_quote">On Wed, Feb 16, 2011 at 10:30 PM, <span dir="ltr"><<a href="mailto:grass-user-request@lists.osgeo.org">grass-user-request@lists.osgeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Send grass-user mailing list submissions to<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:grass-user-request@lists.osgeo.org">grass-user-request@lists.osgeo.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:grass-user-owner@lists.osgeo.org">grass-user-owner@lists.osgeo.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of grass-user digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Calculate averagfe of raster maps without mapcalc<br>
(daniel mcinerney)<br>
2. Re: GRASS-6.5svn Build Error (Rich Shepard)<br>
3. Re: Calculate averagfe of raster maps without mapcalc<br>
(Marcello Gorini)<br>
4. Re: Eliminating values based on a null (Marcello Gorini)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 16 Feb 2011 15:30:27 +0100<br>
From: daniel mcinerney <<a href="mailto:daniel.o.mcinerney@gmail.com">daniel.o.mcinerney@gmail.com</a>><br>
Subject: Re: [GRASS-user] Calculate averagfe of raster maps without<br>
mapcalc<br>
To: Kim Besson <<a href="mailto:kimbesson1981@gmail.com">kimbesson1981@gmail.com</a>><br>
Cc: GRASS user list <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>
Message-ID:<br>
<AANLkTikXMO3SvEu5fiNLL6s0JcgK=<a href="mailto:kMameCrtS382JwL@mail.gmail.com">kMameCrtS382JwL@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi Kim,<br>
<br>
You can use r.univar to compute univariate statistics of<br>
your raster data.<br>
<br>
<a href="http://grass.fbk.eu/grass65/manuals/html65_user/r.univar.html" target="_blank">http://grass.fbk.eu/grass65/manuals/html65_user/r.univar.html</a><br>
<br>
Regards,<br>
Daniel.<br>
<br>
On Wed, Feb 16, 2011 at 2:31 PM, Kim Besson <<a href="mailto:kimbesson1981@gmail.com">kimbesson1981@gmail.com</a>> wrote:<br>
<br>
> Greetings<br>
><br>
> I need to calculate the average of a set of raster images. How can I<br>
> calculate it without using mapcalc?<br>
> THanks<br>
><br>
> Kim<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>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.osgeo.org/pipermail/grass-user/attachments/20110216/782cab3b/attachment-0001.html" target="_blank">http://lists.osgeo.org/pipermail/grass-user/attachments/20110216/782cab3b/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 16 Feb 2011 06:39:53 -0800 (PST)<br>
From: Rich Shepard <<a href="mailto:rshepard@appl-ecosys.com">rshepard@appl-ecosys.com</a>><br>
Subject: Re: [GRASS-user] GRASS-6.5svn Build Error<br>
To: <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
Message-ID:<br>
<<a href="mailto:alpine.LNX.2.00.1102160638450.19529@salmo.appl-ecosys.com">alpine.LNX.2.00.1102160638450.19529@salmo.appl-ecosys.com</a>><br>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed<br>
<br>
On Wed, 16 Feb 2011, Rich Shepard wrote:<br>
<br>
> Thanks! This is the first build error I've encountered with GRASS. I'll<br>
> get the new code and build it today.<br>
<br>
BTW, while the code now compiles, I see syntax errors in glext.h flash by<br>
on the console.<br>
<br>
Rich<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Wed, 16 Feb 2011 08:00:53 -0800 (PST)<br>
From: Marcello Gorini <<a href="mailto:gorini@gmail.com">gorini@gmail.com</a>><br>
Subject: [GRASS-user] Re: Calculate averagfe of raster maps without<br>
mapcalc<br>
To: <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
Message-ID: <<a href="mailto:1297872053859-6032330.post@n2.nabble.com">1297872053859-6032330.post@n2.nabble.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
<br>
>Kim:<br>
><br>
>I need to calculate the average of a set of raster images. How can I<br>
>calculate it without using mapcalc?<br>
>THanks<br>
<br>
<br>
Hello Kim,<br>
<br>
You can use the module r.series. Like this, if you have few images:<br>
<br>
r.series input=image1,image2,image3... method=average output=averaged_image<br>
<br>
Or if you have a bunch of images with similar names, you can do:<br>
<br>
r.series input="`g.mlist pattern=the_pattern_within_the_ names sep=,`"<br>
method=average output=averaged_image<br>
<br>
Hope this helps.<br>
<br>
Marcello.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Calculate-averagfe-of-raster-maps-without-mapcalc-tp6031736p6032330.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Calculate-averagfe-of-raster-maps-without-mapcalc-tp6031736p6032330.html</a><br>
Sent from the Grass - Users mailing list archive at Nabble.com.<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Wed, 16 Feb 2011 08:12:37 -0800 (PST)<br>
From: Marcello Gorini <<a href="mailto:gorini@gmail.com">gorini@gmail.com</a>><br>
Subject: [GRASS-user] Re: Eliminating values based on a null<br>
To: <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
Message-ID: <<a href="mailto:1297872757829-6032382.post@n2.nabble.com">1297872757829-6032382.post@n2.nabble.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
<br>
>Jenny:<br>
><br>
>in my base map (called X) I have a few null values and, in Y map I want to<br>
>eliminate pixels that match with null values in X. How can I do this?<br>
>besides using mapcalc<br>
<br>
Hello Jenny,<br>
<br>
I don't know if it is a coincidence, but your problem can be solved in the<br>
same way as Kim's problem.<br>
<br>
You can use the module r.series with the -n flag. It will propagate the<br>
nulls among your input rasters. The method you use does not matter because<br>
the -n flag overrides it. So it would be like this:<br>
<br>
r.series -n input=X,Y output=Y_without_X_nulls method=average (or any<br>
method)<br>
<br>
Hope this helps,<br>
<br>
Marcello.<br>
--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Eliminating-values-based-on-a-null-tp6031771p6032382.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Eliminating-values-based-on-a-null-tp6031771p6032382.html</a><br>
Sent from the Grass - Users mailing list archive at Nabble.com.<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>
End of grass-user Digest, Vol 58, Issue 31<br>
******************************************<br>
</blockquote></div><br>