36 for (i = 0; i < List->
n_values; i++) {
37 line = List->
value[i];
40 G_warning(
_(
"Attempt to delete dead feature (%d)"), line);
48 G_debug(3,
"Vedit_delete_lines(): line=%d", line);
52 return nlines_removed;
68 G_debug(1,
"Vedit_delete_area_centroid(): centroid = %d", centroid);
72 G_warning(
_(
"No area found for centroid %d"), centroid);
76 G_warning(
_(
"Duplicate centroid %d, unable to delete area"), centroid);
94 int i, line, centroid, left, right;
99 G_debug(3,
"Vedit_delete_area(): area=%d", area);
105 G_warning(
_(
"Area %d without centroid"), area);
110 for (i = 0; i < list->
n_values; i++) {
111 line = abs(list->
value[i]);
113 if (left > 0 && right > 0)
121 G_warning(
_(
"Area %d has no boundaries"), area);
141 int area, nareas, nremoved;
143 G_debug(1,
"Vedit_delete_areas(): field = %d cat = %d", field, cat);
146 for (area = 1; area <= nareas; area++) {
int Vedit_delete_area_centroid(struct Map_info *Map, int centroid)
Delete area (centroid and set of boundaries) by centroid.
int Vedit_delete_area(struct Map_info *Map, int area)
Delete area (centroid + set of boundaries) by id.
int Vect_get_area_centroid(const struct Map_info *, int)
Returns centroid id for given area.
int n_values
Number of values in the list.
int Vect_get_centroid_area(const struct Map_info *, int)
Get area id the centroid is within.
int Vedit_delete_lines(struct Map_info *Map, struct ilist *List)
Delete selected features.
void Vect_destroy_list(struct ilist *)
Frees all memory associated with a struct ilist, including the struct itself.
int Vect_get_area_boundaries(const struct Map_info *, int, struct ilist *)
Creates list of boundaries for given area.
plus_t Vect_get_num_areas(const struct Map_info *)
Get number of areas in vector map.
int Vect_area_alive(const struct Map_info *, int)
Check if area is alive or dead (topological level required)
struct ilist * Vect_new_list(void)
Creates and initializes a struct ilist.
int Vect_delete_line(struct Map_info *, off_t)
Delete existing feature (topological level required)
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 Vedit_delete_areas_cat(struct Map_info *Map, int field, int cat)
Delete vector areas of given category.
int * value
Array of values.
int G_debug(int, const char *,...) __attribute__((format(printf
int Vect_get_line_areas(const struct Map_info *, int, int *, int *)
Get area id on the left and right side of the boundary.
int Vect_get_area_cat(const struct Map_info *, int, int)
Find FIRST category of given field and area.