[GRASS5] r.texture segfault

Markus Neteler neteler at itc.it
Wed Jul 6 08:26:56 EDT 2005


Hi,

I have applied below changes (kept PGM_MAXMAXVAL).

Now I get

r.texture in=spot.resc2 -v pref=spot.image size=10 distance=5
Reading the raster map...done
ERROR: Too many categories (found: -2147483648, max: 255). Try to rescale
       or reclassify the map

although using the slightly modified extended test:

On Thu, Jun 30, 2005 at 10:37:34PM +0100, Glynn Clements wrote:
...
> 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];
> 

In CVS, it is now:

   if (grays[row][col] < 0 || grays[row][col] > PGM_MAXMAXVAL)
      G_fatal_error ("Too many categories (found: %i, max: %i). Try to rescale or reclassify the map", grays[row][col], PGM_MAXMAXVAL);


Interesting (for me).

 Markus




More information about the grass-dev mailing list