[GRASS-dev] Deleteing vector lines

Hi,

What must be done to delete vector lines from a vector map?

I'm currently trying to do:
   for(cat=cl->min[i]; cat <= cl->max[i]; cat++) {
       ret = Vect_cidx_find_next(Map, layer, cat, GV_POINTS|GV_LINES,
               0, &type, &id);
       if(ret<0) continue;
       if(type==GV_CENTROID) {
     int area;
     double x,y;
     Vect_get_node_coor(Map, id, &x, &y, NULL);
     area = Vect_find_area(Map, x, y);
     Vect_delete_line(Map, id);
     Vect_delete_line(Map, area);
     attr_del(Map, layer, cat);
       }
       else {
     Vect_delete_line(Map, id);
     attr_del(Map, layer, cat);

but when it calls Vect_cidx_find_next the second time I get a fatal error saying:
ERROR: Category index is not up to date
and then it exits. So I guess I'm asking how do I update the category index? Should I call Vect_cidx_save()? If I do, do I then need to Vect_cidx_open()?

--Wolf

--

<:3 )---- Wolf Bergenheim ----( 8:>

What must be done to delete vector lines from a vector map?

no answer, but maybe a hint:

  http://freegis.org/cgi-bin/viewcvs.cgi/grass6/doc/vector/TODO?rev=HEAD

section 1.1

Hamish