[GRASSLIST:2549] Re: terraflow dimension_type overflow
Glynn Clements
glynn.clements at virgin.net
Tue Feb 10 16:32:00 EST 2004
Christopher Fonnesbeck wrote:
> > That suggests that your region is larger than 30000x30000 (note that
> > it's the current region settings which are relevant, not the actual
> > resolution of the DEM). Either that, or your "short" type is unusually
> > small.
> >
> > If you need to handle larger grids, change the definition to:
> >
> > typedef int dimension_type; /* represent dimension of the grid */
> > static const dimension_type dimension_type_max=INT_MAX;
> >
> > and re-compile.
>
> My region size is 34429x30856, so that is the problem. I could have
> *sworn* I ran terraflow on this dem before. Anyhow, increasing the
> limit causes a file size limit error.
Right; at that size, you could just about get away with two bytes per
cell, but not four bytes per cell. Have you tried r.terraflow.short
(which uses 16-bit shorts instead of 32-bit floats)?
> If I carve this DEM into quarters, for example, will that solve the
> problem?
With a quarter-size map, you could have 8 bytes per cell, which should
be enough.
> What will that mean for accumulations at the boundaries?
I have no idea. I'm just a programmer; I don't understand what most of
GRASS actually does, just how it does it ;)
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user
mailing list