15 #include <grass/vedit.h>
30 int nbgmaps,
struct ilist *List,
double move_x,
31 double move_y,
double move_z,
int snap,
double thresh)
33 struct line_pnts *Points;
34 struct line_cats *Cats;
36 int type, newline, line;
45 for (i = 0; i < List->n_values; i++) {
46 line = List->value[i];
53 G_debug(3,
"Vedit_move_lines(): type=%d, line=%d", type, line);
60 for (j = 0; j < Points->n_points; j++) {
66 if (snap != NO_SNAP) {
68 (snap == SNAPVERTEX) ? 1 : 0) == 0) {
72 for (bgi = 0; bgi < nbgmaps; bgi++) {
74 (BgMap[bgi], line, &x[j], &y[j], &z[j], thresh,
75 (snap == SNAPVERTEX) ? 1 : 0))
struct line_pnts * Vect_new_line_struct()
Creates and initializes a struct line_pnts.
int Vedit_move_lines(struct Map_info *Map, struct Map_info **BgMap, int nbgmaps, struct ilist *List, double move_x, double move_y, double move_z, int snap, double thresh)
Move selected primitives.
int Vedit_snap_point(struct Map_info *Map, int line, double *x, double *y, double *z, double thresh, int vertex)
Snap given point to the nearest primitive.
int Vect_rewrite_line(struct Map_info *Map, int line, int type, struct line_pnts *points, struct line_cats *cats)
Rewrites feature info at the given offset.
int Vect_destroy_cats_struct(struct line_cats *p)
Frees all memory associated with line_cats structure, including the struct itself.
int Vect_line_alive(struct Map_info *Map, int line)
Check if feature is alive or dead.
struct line_cats * Vect_new_cats_struct()
Creates and initializes line_cats structure.
int G_debug(int level, const char *msg,...)
Print debugging message.
int Vect_destroy_line_struct(struct line_pnts *p)
Frees all memory associated with a struct line_pnts, including the struct itself. ...
int Vect_read_line(struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, int line)
Read vector feature.