GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
vector/vedit/delete.c
Go to the documentation of this file.
1 
14 #include <grass/vedit.h>
15 
25 int Vedit_delete_lines(struct Map_info *Map, struct ilist *List)
26 {
27  int i, line;
28  int nlines_removed;
29 
30  nlines_removed = 0;
31 
32  /* delete */
33  for (i = 0; i < List->n_values; i++) {
34  line = List->value[i];
35 
36  if (Vect_line_alive(Map, line)) {
37  if (Vect_delete_line(Map, line) < 0) {
38  return -1;
39  }
40 
41  G_debug(3, "Vedit_delete_lines(): line=%d", line);
42  nlines_removed++;
43  }
44  }
45 
46  return nlines_removed;
47 }
int Vedit_delete_lines(struct Map_info *Map, struct ilist *List)
Delete selected primitives.
int Vect_line_alive(struct Map_info *Map, int line)
Check if feature is alive or dead.
tuple Map
Definition: render.py:1310
int G_debug(int level, const char *msg,...)
Print debugging message.
Definition: gis/debug.c:51
int Vect_delete_line(struct Map_info *Map, int line)
Delete feature.