31 int layer,
int del,
struct cat_list *Clist)
37 int nlines_modified, rewrite;
50 for (i = 0; i < List->
n_values; i++) {
51 line = List->
value[i];
58 for (j = 0; j < Clist->
n_ranges; j++) {
59 for (cat = Clist->
min[j]; cat <= Clist->
max[j]; cat++) {
63 G_warning(
_(
"Unable to set category %d for (feature id %d)"),
93 return nlines_modified;
int Vedit_modify_cats(struct Map_info *Map, struct ilist *List, int layer, int del, struct cat_list *Clist)
Add / remove categories.
off_t Vect_rewrite_line(struct Map_info *, off_t, int, const struct line_pnts *, const struct line_cats *)
Rewrites existing feature (topological level required)
int n_values
Number of values in the list.
int * min
Array of minimum values.
int n_ranges
Number of ranges.
Feature geometry info - coordinates.
struct line_pnts * Vect_new_line_struct(void)
Creates and initializes a line_pnts structure.
void Vect_destroy_cats_struct(struct line_cats *)
Frees all memory associated with line_cats structure, including the struct itself.
struct line_cats * Vect_new_cats_struct(void)
Creates and initializes line_cats structure.
void G_warning(const char *,...) __attribute__((format(printf
int Vect_line_alive(const struct Map_info *, int)
Check if feature is alive or dead (topological level required)
int * value
Array of values.
void Vect_destroy_line_struct(struct line_pnts *)
Frees all memory associated with a line_pnts structure, including the structure itself.
int Vect_read_line(const struct Map_info *, struct line_pnts *, struct line_cats *, int)
Read vector feature (topological level required)
int Vect_field_cat_del(struct line_cats *, int, int)
Delete field/cat from line_cats structure.
int Vect_cat_set(struct line_cats *, int, int)
Add new field/cat to category structure if doesn't exist yet.