Thanks, it took a while but it worked.<br><br><div class="gmail_quote">On Mon, Mar 26, 2012 at 3:11 PM, Markus Metz <span dir="ltr"><<a href="mailto:markus.metz.giswork@googlemail.com">markus.metz.giswork@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sun, Mar 25, 2012 at 2:59 PM, Filipe Silva Dias<br>
<<a href="mailto:filipesdias@gmail.com">filipesdias@gmail.com</a>> wrote:<br>
> Thanks. Out of curiosity and tried with Grass 7 with -m (and 30 m<br>
> resolution) and I obtained this error message:<br>
><br>
> r.watershed -m elevation=DemPT2@Grass7 threshold=10000<br>
> stream=streams<br>
> SECTION 1 beginning: Initiating Variables. 5 sections total.<br>
> SECTION 1a: Mark masked and NULL cells<br>
> SECTION 1b: Determining Offmap Flow.<br>
> SECTION 2: A* Search.<br>
> SECTION 3: Accumulating Surface Flow with MFD.<br>
> SECTION 4: Watershed determination.<br>
> SECTION 5: Closing Maps.<br>
> ERROR: Rast_make_random_colors: min (1) > max (0)<br>
<br>
</div>Apparently no basins were determined, probably because the threshold<br>
of 10000 for flow accumulation was never reached. Maybe the current<br>
region was either too small or did not cover parts of the DEM DemPT2?<br>
<br>
BTW, if you want to try out GRASS 7 in a separate mapset, you don't<br>
need to copy over the DEM if you just want to read it. Within the<br>
mapset Grass7, the following commands should work:<br>
g.region -p rast=DemPt@ETRS89<br>
r.watershed elevation=DemPt@ETRS89 stream=stream threshold=10000 -m<br>
<br>
Markus M<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Subprocess failed with exit code 1<br>
> category information for [streams] in [Grass7] missing or invalid<br>
><br>
><br>
><br>
><br>
> On Sun, Mar 25, 2012 at 11:49 AM, Markus Metz<br>
> <<a href="mailto:markus.metz.giswork@googlemail.com">markus.metz.giswork@googlemail.com</a>> wrote:<br>
>><br>
>> On Sun, Mar 25, 2012 at 12:30 PM, Filipe Silva Dias<br>
>> <<a href="mailto:filipesdias@gmail.com">filipesdias@gmail.com</a>> wrote:<br>
>> > I switched the resolution from 30x30 to 100x100 and now it works.<br>
>> > Problem<br>
>> > solved.<br>
>> ><br>
>> ><br>
>> > On Sun, Mar 25, 2012 at 11:12 AM, Filipe Silva Dias<br>
>> > <<a href="mailto:filipesdias@gmail.com">filipesdias@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> I'm using GRASS 6.4.2 and I'm on Windows 7<br>
>> >><br>
>> >><br>
>> >> On Sun, Mar 25, 2012 at 11:11 AM, Filipe Silva Dias<br>
>> >> <<a href="mailto:filipesdias@gmail.com">filipesdias@gmail.com</a>> wrote:<br>
>> >>><br>
>> >>> Dear all<br>
>> >>><br>
>> >>> I'm trying to run r.watershed on a ASTER DEM (with the size of<br>
>> >>> Portugal)<br>
>> >>> but I'm getting this error:<br>
>> >>><br>
>> >>> r.watershed elevation=DemPt@ETRS89 stream=stream<br>
>> >>> threshold=10000<br>
>> >>> SECTION 1a (of 5): Initiating Memory.<br>
>> >>> ERROR: G_malloc: unable to allocate 1515173064 bytes at<br>
>> >>> init_vars.c:134<br>
>> >>> Subprocess failed with exit code 1<br>
>> >>> category information for [stream] in [ETRS89] missing or invalid<br>
>> >>><br>
>> >>> What am I doing wrong?<br>
>> >>><br>
>> As you figured out already, the region, i.e. number of cells was too<br>
>> large. In order to run r.watershed with that region (Portugal at 30m<br>
>> resolution) on Windows, you would need GRASS 7 and run r.watershed<br>
>> with the -m option.<br>
>><br>
>> Markus M<br>
><br>
><br>
</div></div></blockquote></div><br>