RAM vs. SEG in r.watershed
Olga Waupotitsch
olga at zorro.cecer.army.mil
Fri Jul 16 21:44:58 EDT 1993
try the following:
replace raster/r.watershed/ram/ramseg.h
by the following fixed ramseg.h:
#define RAMSEG int
#define RAMSEGBITS 4
#define DOUBLEBITS 8 /* 2 * ramsegbits */
#define SEGLENLESS 15 /* 2 ^ ramsegbits - 1 */
#define SEG_INDEX(s,r,c) (int) \
(((((r) >> RAMSEGBITS) * (s) + ((c) >> RAMSEGBITS)) << DOUBLEBITS) \
+ (((r) & SEGLENLESS) << RAMSEGBITS) + ((c) & SEGLENLESS))
More information about the grass-user
mailing list