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;
97 G_debug(3,
"Vedit_delete_area(): area=%d", area);
103 G_warning(
_(
"Area %d without centroid"), area);
108 if (
list->n_values > 0) {
109 for (i = 0; i <
list->n_values; i++) {
110 line = abs(
list->value[i]);
112 if (left > 0 && right > 0)
120 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++) {
void G_warning(const char *,...) __attribute__((format(printf
int G_debug(int, const char *,...) __attribute__((format(printf
plus_t Vect_get_num_areas(struct Map_info *)
Get number of areas in vector map.
int Vect_area_alive(struct Map_info *, int)
Check if area is alive or dead (topological level required)
int Vect_get_area_boundaries(struct Map_info *, int, struct ilist *)
Creates list of boundaries for given area.
int Vect_get_centroid_area(struct Map_info *, int)
Get area id the centroid is within.
void Vect_destroy_list(struct ilist *)
Frees all memory associated with a struct ilist, including the struct itself.
struct ilist * Vect_new_list(void)
Creates and initializes a struct ilist.
int Vect_line_alive(struct Map_info *, int)
Check if feature is alive or dead (topological level required)
int Vect_delete_line(struct Map_info *, off_t)
Delete existing feature (topological level required)
int Vect_get_area_cat(struct Map_info *, int, int)
Find FIRST category of given field and area.
int Vect_get_area_centroid(struct Map_info *, int)
Returns centroid id for given area.
int Vect_get_line_areas(struct Map_info *, int, int *, int *)
Get area id on the left and right side of the boundary.
int n_values
Number of values in the list.
int * value
Array of values.
int Vedit_delete_areas_cat(struct Map_info *Map, int field, int cat)
Delete vector areas of given category.
int Vedit_delete_area(struct Map_info *Map, int area)
Delete area (centroid + set of boundaries) by id.
int Vedit_delete_lines(struct Map_info *Map, struct ilist *List)
Delete selected features.
int Vedit_delete_area_centroid(struct Map_info *Map, int centroid)
Delete area (centroid and set of boundaries) by centroid.