GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-f63024f571
vertex.c File Reference

Vedit library - vertex manipulation. More...

#include <grass/vedit.h>
Include dependency graph for vertex.c:

Go to the source code of this file.

Functions

int Vedit_move_vertex (struct Map_info *Map, struct Map_info **BgMap, int nbgmaps, struct ilist *List, struct line_pnts *coord, double thresh_coords, double thresh_snap, double move_x, double move_y, double move_z, int move_first, int snap)
 Move all vertices in bounding box(es) More...
 
int Vedit_add_vertex (struct Map_info *Map, struct ilist *List, struct line_pnts *coord, double thresh)
 Add new vertex to line. More...
 
int Vedit_remove_vertex (struct Map_info *Map, struct ilist *List, struct line_pnts *coord, double thresh)
 Remove vertex from line. More...
 

Detailed Description

Vedit library - vertex manipulation.

(C) 2006-2008 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Jachym Cepicky <jachym.cepicky gmail.com>
Martin Landa <landa.martin gmail.com>

Definition in file vertex.c.

Function Documentation

◆ Vedit_add_vertex()

int Vedit_add_vertex ( struct Map_info Map,
struct ilist List,
struct line_pnts coord,
double  thresh 
)

Add new vertex to line.

Shape of line is not changed.

Todo:
3D
Parameters
Mappointer to Map_info
Listlist of lines
coordpoints location
threshfind line in given threshold
Returns
number of add vertices
-1 on error

Definition at line 189 of file vertex.c.

◆ Vedit_move_vertex()

int Vedit_move_vertex ( struct Map_info Map,
struct Map_info **  BgMap,
int  nbgmaps,
struct ilist List,
struct line_pnts coord,
double  thresh_coords,
double  thresh_snap,
double  move_x,
double  move_y,
double  move_z,
int  move_first,
int  snap 
)

Move all vertices in bounding box(es)

Parameters
Mappointer to Map_info
BgMap,nbgmapslist of background vector maps for snapping
Listlist of selected lines
coordpoints location
thresh_coordsthreshold value for selecting lines
thresh_snapthreshold value used for snapping
move_x,move_y,move_zdirection (move_z is used when map is 3D)
move_firstmove only first vertex found in the bounding box
snapsnapping mode (see vedit.h)
Returns
number of moved vertices
-1 on error

Definition at line 33 of file vertex.c.

◆ Vedit_remove_vertex()

int Vedit_remove_vertex ( struct Map_info Map,
struct ilist List,
struct line_pnts coord,
double  thresh 
)

Remove vertex from line.

Todo:
3D
Parameters
Mappointer to Map_info
Listlist of selected lines
coordpoints location
threshthreshold value to find a line
Returns
number of removed vertices
-1 on error

Definition at line 276 of file vertex.c.