[GRASS-user] r.watershed / r.terraflow - huge area (amazon)
Markus Neteler
neteler at osgeo.org
Tue Jan 10 08:51:02 PST 2017
On Tue, Jan 10, 2017 at 12:30 PM, Carlos Grohmann
<carlos.grohmann at gmail.com> wrote:
> Hello all
>
> I'm working on deriving a nice drainage network for the Amazon basin. The
> problem is that the area is too large.
>
> The region settings are these:
> projection: 3 (Latitude-Longitude)
> zone: 0
> datum: wgs84
> ellipsoid: wgs84
> north: 6:17N
> south: 21:30S
> west: 80:37W
> east: 44:50W
> nsres: 0:00:03
> ewres: 0:00:03
> rows: 33340
> cols: 42940
> cells: 1431619600
>
> With 14.3 billion cels,
Isn't it 1431619600 = 1.431.619.600 = 1.4 billion cells?
> r.watershed would need about 450 GiB of disk space
> running in seg mode, is that correct? (from the manual, 31 MB for 1 million
> cells).
https://grass.osgeo.org/grass72/manuals/r.watershed.html#large-regions-with-many-cells
" The upper limit of the ram version is 2 billion (2^31 - 1) cells,
whereas the upper limit for the seg version is 9 billion-billion (2^63
- 1 = 9.223372e+18) cells."
So that would be supported by r.watershed.
> I do have that disk space available, but it's in a secondary drive. If I set
> TMPDIR to that drive, will r/watershed use it? I ask because the
> documentation (https://grass.osgeo.org/grass72/manuals/variables.html) only
> says that this environmental variable is used by "[Various GRASS GIS
> commands and wxGUI]".
AFAIK the TMPDIR variable is not relevant here. The tmp dir is
location/mapset/.tmp/
which you could link to the extra drive. This should be simplified for sure:
Involved code:
https://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/file_name.c
https://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/tempfile.c
Please open a ticket with the relevant info in it.
> On a side note, r.terraflow should be an alternative for such a large
> dataset, but from the manual:
> "r.terraflow has a limit on the number of rows and columns (max 32,767
> each)".
> That's the size of a positive short integer. Is this limit still needed?
I have no idea here, did you try it?
Markus
--
Markus Neteler
http://www.mundialis.de - free data with free software
http://grass.osgeo.org
http://courses.neteler.org/blog
More information about the grass-user
mailing list