[GRASS5] r.texture segfault
Glynn Clements
glynn at gclements.plus.com
Thu Jun 30 17:37:34 EDT 2005
Markus Neteler wrote:
> > Apparently the module was never updated for NULL support?
>
> I think that G_get_raster_row() should do the job.
Huh? If you don't want nulls, it should probably be using
G_get_map_row() instead.
> I'm not sure how to fix the NULL/-2147483648 problem.
h_measure.c, line 83:
if (grays[row][col] > PGM_MAXMAXVAL)
G_fatal_error ("Too many categories (max: %i). Try to rescale or reclassify the map", PGM_MAXMAXVAL);
should probably check both cases, i.e.:
if (grays[row][col] < 0 || grays[row][col] >= PGM_MAXMAXVAL)
If PGM_MAXMAXVAL is changed to 256, then it needs to be ">=". If it
is left at 255, then the array definition:
int tone[PGM_MAXMAXVAL];
needs to be:
int tone[PGM_MAXMAXVAL+1];
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list