18static int select_by_query(
struct Map_info *,
int,
int,
double,
int,
56 if (
List->n_values == 0) {
65 if (
List->n_values == 0) {
68 for (line = 1; line <= num; line++) {
75 for (i = 0; i <
List->n_values; i++) {
76 line =
List->value[i];
118 G_debug(3,
"Vedit_select_by_query(): %d lines selected (by query %d)",
124 return List->n_values;
217 for (i = 0; i <
found->n_values; i++) {
231 G_fatal_error(
"Vedit_select_by_query(): %s",
_(
"Unknown query tool"));
253 for (i = 0; i <
alist->n_values; i++) {
262 return alist->n_values;
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
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.
int Vect_get_node_coor(struct Map_info *, int, double *, double *, double *)
Get node coordinates.
plus_t Vect_get_num_lines(struct Map_info *)
Fetch number of features (points, lines, boundaries, centroids) in vector map.
double Vect_line_length(const struct line_pnts *)
Calculate line length, 3D-length in case of 3D vector line.
void Vect_select_dangles(struct Map_info *, int, double, struct ilist *)
Select dangles from vector map.
int Vect_cat_get(const struct line_cats *, int, int *)
Get first found category of given field.
int Vect_find_line_list(struct Map_info *, double, double, double, int, double, int, const struct ilist *, struct ilist *)
Find the nearest line(s).
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_list_append(struct ilist *, int)
Append new item to the end of list if not yet present.
int Vect_read_line(struct Map_info *, struct line_pnts *, struct line_cats *, int)
Read vector feature (topological level required)
int Vect_list_delete_list(struct ilist *, const struct ilist *)
Delete list from existing list.
int Vect_line_alive(struct Map_info *, int)
Check if feature is alive or dead (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.
int Vect_val_in_list(const struct ilist *, int)
Find a given item in the list.
int Vect_get_node_n_lines(struct Map_info *, int)
Get number of lines for node.
struct line_pnts * Vect_new_line_struct(void)
Creates and initializes a line_pnts structure.
#define WITHOUT_Z
2D/3D vector data
#define UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.
int * cat
Array of categories.
Feature geometry info - coordinates.
int Vedit_select_by_query(struct Map_info *Map, int type, int layer, double thresh, int query, struct ilist *List)
Select primitives by query (based on geometry properties)