31 if (
ACats->n_cats == 0 ||
BCats->n_cats == 0) {
42 for (i = 0; i <
ACats->n_cats; i++) {
45 for (
j = 0;
j <
BCats->n_cats;
j++) {
81 int line, nlines, i, first, last, next_line,
curr_line;
93 G_warning(
"Merging is done with lines or boundaries only, not with "
107 for (line = 1; line <= nlines; line++) {
113 Line =
Plus->Line[line];
154 abs(next_line) != line) {
203 abs(next_line) !=
abs(first)) {
218 if (
List->n_values > 1) {
222 for (i = 0; i <
List->n_values; i++) {
void G_percent(long, long, int)
Print percent complete messages.
void G_warning(const char *,...) __attribute__((format(printf
void void G_verbose_message(const char *,...) __attribute__((format(printf
void G_ilist_add(struct ilist *, int)
Add item to ilist.
int G_debug(int, const char *,...) __attribute__((format(printf
void Vect_destroy_line_struct(struct line_pnts *)
Frees all memory associated with a line_pnts structure, including the structure itself.
int Vect_get_line_nodes(struct Map_info *, int, int *, int *)
Get line nodes.
plus_t Vect_get_num_lines(struct Map_info *)
Fetch number of features (points, lines, boundaries, centroids) in vector map.
void Vect_destroy_list(struct ilist *)
Frees all memory associated with a struct ilist, including the struct itself.
void Vect_destroy_cats_struct(struct line_cats *)
Frees all memory associated with line_cats structure, including the struct itself.
int Vect_read_line(struct Map_info *, struct line_pnts *, struct line_cats *, int)
Read vector feature (topological level required)
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)
struct line_cats * Vect_new_cats_struct(void)
Creates and initializes line_cats structure.
struct ilist * Vect_new_list(void)
Creates and initializes a struct ilist.
off_t Vect_write_line(struct Map_info *, int, const struct line_pnts *, const struct line_cats *)
Writes a new feature.
int Vect_get_node_n_lines(struct Map_info *, int)
Get number of lines for node.
void Vect_reset_line(struct line_pnts *)
Reset line.
int Vect_get_node_line(struct Map_info *, int, int)
Get line id for node line index.
struct line_pnts * Vect_new_line_struct(void)
Creates and initializes a line_pnts structure.
int Vect_reset_list(struct ilist *)
Reset ilist structure.
int Vect_append_points(struct line_pnts *, const struct line_pnts *, int)
Appends points to the end of a line.
#define GV_FORWARD
Line direction indicator forward/backward.
int Vect_merge_lines(struct Map_info *Map, int type, int *new_lines, struct Map_info *Err)
Merge lines or boundaries in vector map.
Basic topology-related info.
Feature geometry info - coordinates.