[GRASS5] [bug #1023] (grass) v.extract again

Eric G. Miller egm2 at jps.net
Fri Apr 19 20:38:50 EDT 2002


On Fri, Apr 19, 2002 at 08:16:53PM +0100, Glynn Clements wrote:
> 
> Request Tracker wrote:
> 
> > I'm need v.extract again and it doesn't work.
> > 
> > I think that the problems are:
> > 
> > int cat_array[5000]; declare array of 5000 cat
> 
> I've committed a fix which re-allocates the array as necessary.
> 
> > To set the number of categories the program use 
> >  recd = pcats->num;
> > 
> > I think this is the numbrer of the max. categorie, but not number of
> > categories. The code must be:
> > 
> >  recd = pcats->ncats;
> 
> I'm not sufficiently familiar with category handling to be sure; can
> anyone else comment on this?

"num" is highest category number, "ncats" is total number of entries.
Sounds like it should be "ncats".  Category numbers certainly don't
have to be continuous.

-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-dev mailing list