GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-bea8435a9e
|
Go to the source code of this file.
Functions | |
int | Vedit_split_lines (struct Map_info *, struct ilist *, struct line_pnts *, double, struct ilist *) |
Split selected lines on given position. More... | |
int | Vedit_connect_lines (struct Map_info *, struct ilist *, double) |
Connect lines in given threshold. More... | |
int | Vedit_extend_lines (struct Map_info *, struct ilist *, int, int, double) |
Extend lines in given threshold. More... | |
int | Vedit_modify_cats (struct Map_info *, struct ilist *, int, int, struct cat_list *) |
Add / remove categories. More... | |
int | Vedit_copy_lines (struct Map_info *, struct Map_info *, struct ilist *) |
Copy selected primitives. More... | |
int | Vedit_chtype_lines (struct Map_info *, struct ilist *) |
Change primitive type. More... | |
int | Vedit_delete_lines (struct Map_info *, struct ilist *) |
Delete selected features. More... | |
int | Vedit_delete_area_centroid (struct Map_info *, int) |
Delete area (centroid and set of boundaries) by centroid. More... | |
int | Vedit_delete_area (struct Map_info *, int) |
Delete area (centroid + set of boundaries) by id. More... | |
int | Vedit_delete_areas_cat (struct Map_info *, int, int) |
Delete vector areas of given category. More... | |
double | Vedit_get_min_distance (struct line_pnts *, struct line_pnts *, int, int *) |
Calculate distances between two lines. More... | |
int | Vedit_flip_lines (struct Map_info *, struct ilist *) |
Flip direction of selected lines. More... | |
int | Vedit_merge_lines (struct Map_info *, struct ilist *) |
Merge lines/boundaries. More... | |
int | Vedit_move_lines (struct Map_info *, struct Map_info **, int, struct ilist *, double, double, double, int, double) |
Move selected primitives. More... | |
struct robject_list * | Vedit_render_map (struct Map_info *, struct bound_box *, int, double, double, int, int, double) |
Render vector features into list. More... | |
int | Vedit_select_by_query (struct Map_info *, int, int, double, int, struct ilist *) |
int | Vedit_snap_point (struct Map_info *, int, double *, double *, double *, double, int) |
Snap given point to the nearest primitive. More... | |
int | Vedit_snap_line (struct Map_info *, struct Map_info **, int, int, struct line_pnts *, double, int) |
Snap selected primitive to its nearest primitive. More... | |
int | Vedit_snap_lines (struct Map_info *, struct Map_info **, int, struct ilist *, double, int) |
Snap lines/boundaries. More... | |
int | Vedit_move_vertex (struct Map_info *, struct Map_info **, int, struct ilist *, struct line_pnts *, double, double, double, double, double, int, int) |
Move all vertices in bounding box(es) More... | |
int | Vedit_add_vertex (struct Map_info *Map, struct ilist *, struct line_pnts *, double) |
Add new vertex to line. More... | |
int | Vedit_remove_vertex (struct Map_info *, struct ilist *, struct line_pnts *, double) |
Remove vertex from line. More... | |
int | Vedit_bulk_labeling (struct Map_info *, struct ilist *, double, double, double, double, double, double) |
Lines z-bulk labeling. More... | |
int Vedit_bulk_labeling | ( | struct Map_info * | Map, |
struct ilist * | List, | ||
double | x1, | ||
double | y1, | ||
double | x2, | ||
double | y2, | ||
double | start, | ||
double | step | ||
) |
Lines z-bulk labeling.
Automated labeling (z coordinate assignment) of vector lines (iso-lines).
Map | pointer to Map_info |
List | list of selected lines |
point_start_end | staring and ending point |
start | starting value |
step | step value |
Connect lines in given threshold.
If two lines are selected and thresh is -1, no limit is applied.
Map | pointer to Map_info |
List | list of selected lines |
thresh | threshold value |
Copy selected primitives.
Map | pointer to Map_info copy to |
FromMap | vector map copy from (if not given use Map) |
List | list of selected primitives (to be copied) |
Definition at line 27 of file vector/vedit/copy.c.
int Vedit_delete_area | ( | struct Map_info * | Map, |
int | area | ||
) |
Delete area (centroid + set of boundaries) by id.
Map | pointer to Map_info struct |
area | id |
Definition at line 92 of file vector/vedit/delete.c.
Referenced by Vedit_delete_area_centroid(), and Vedit_delete_areas_cat().
int Vedit_delete_area_centroid | ( | struct Map_info * | Map, |
int | centroid | ||
) |
Delete area (centroid and set of boundaries) by centroid.
Map | pointer to Map_info struct |
centroid |
Definition at line 64 of file vector/vedit/delete.c.
References _, G_debug(), G_warning(), Vect_get_centroid_area(), and Vedit_delete_area().
int Vedit_delete_areas_cat | ( | struct Map_info * | Map, |
int | field, | ||
int | cat | ||
) |
Delete vector areas of given category.
Map | pointer to Map_info struct |
field | layer number |
cat | category number |
Definition at line 139 of file vector/vedit/delete.c.
References G_debug(), Vect_area_alive(), Vect_get_area_cat(), Vect_get_num_areas(), and Vedit_delete_area().
Delete selected features.
Map | pointer to Map_info |
List | list of features to be deleted |
Definition at line 29 of file vector/vedit/delete.c.
int Vedit_extend_lines | ( | struct Map_info * | Map, |
struct ilist * | List, | ||
int | nodes, | ||
int | parallel, | ||
double | thresh | ||
) |
Extend lines in given threshold.
Map | pointer to Map_info |
List | list of selected lines |
nodes | 1 for start node, 2 for end node, other for both |
parallel | connect parallel lines |
thresh | threshold value |
Definition at line 68 of file extend.c.
References ilist::n_values, and Vect_new_list().
double Vedit_get_min_distance | ( | struct line_pnts * | Points1, |
struct line_pnts * | Points2, | ||
int | with_z, | ||
int * | mindistidx | ||
) |
Calculate distances between two lines.
Points1 | first line geometry | |
Points2 | second line geometry | |
with_z | WITH_Z for 3D data | |
[out] | mindistidx | index of minimal distance |
Definition at line 28 of file vector/vedit/distance.c.
References G_debug(), line_pnts::n_points, Vect_points_distance(), line_pnts::x, line_pnts::y, and line_pnts::z.
int Vedit_modify_cats | ( | struct Map_info * | Map, |
struct ilist * | List, | ||
int | layer, | ||
int | del, | ||
struct cat_list * | Clist | ||
) |
Add / remove categories.
Map | pointer to Map_info |
List | list of selected primitives |
layer | layer number |
del | action (non-zero for delete otherwise add) |
Clist | list of category numbers |
Definition at line 30 of file vector/vedit/cats.c.
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.
Map | pointer to Map_info |
BgMap,nbgmaps | list of background vector maps used for snapping |
List | list of primitives to be moved |
move_x,move_y,move_z | direction (move_z used only if map is 3D) |
snap | enable snapping (see globals.h) |
Definition at line 29 of file vector/vedit/move.c.
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)
Map | pointer to Map_info |
BgMap,nbgmaps | list of background vector maps for snapping |
List | list of selected lines |
coord | points location |
thresh_coords | threshold value for selecting lines |
thresh_snap | threshold value used for snapping |
move_x,move_y,move_z | direction (move_z is used when map is 3D) |
move_first | move only first vertex found in the bounding box |
snap | snapping mode (see vedit.h) |
struct robject_list* Vedit_render_map | ( | struct Map_info * | Map, |
struct bound_box * | box, | ||
int | draw_flag, | ||
double | center_easting, | ||
double | center_northing, | ||
int | map_width, | ||
int | map_height, | ||
double | map_res | ||
) |
Render vector features into list.
Map | pointer to Map_info structure |
box | bounding box of region to be rendered |
draw_flag | types of objects to be rendered (see vedit.h) |
center_easing,center_northing,map_width,map_height,map_res | values used for conversion en->xy |
Definition at line 59 of file vector/vedit/render.c.
References list.
int Vedit_snap_line | ( | struct Map_info * | Map, |
struct Map_info ** | BgMap, | ||
int | nbgmaps, | ||
int | line, | ||
struct line_pnts * | Points, | ||
double | thresh, | ||
int | to_vertex | ||
) |
Snap selected primitive to its nearest primitive.
Map | pointer to Map_info |
BgMap,nbgmaps | list of background maps used for snapping |
line | line id to be snapped (if already written, otherwise -1) |
Points | line geometry |
layer | layer number |
thresh | threshold value used for snapping (>0) |
to_vertex | allow snapping also to vertex |
Definition at line 97 of file vedit/snap.c.
int Vedit_snap_lines | ( | struct Map_info * | Map, |
struct Map_info ** | BgMap, | ||
int | nbgmaps, | ||
struct ilist * | List, | ||
double | thresh, | ||
int | to_vertex | ||
) |
Snap lines/boundaries.
Map | pointer to Map_info |
BgMap,nbgmaps | list of background maps used for snapping |
List | list of lines to be snapped |
layer | layer number |
thresh | threshold value used for snapping (>0) |
to_vertex | allow snapping also to vertex |
Definition at line 170 of file vedit/snap.c.
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.
Map | pointer to Map_info |
line | line to be excluded (point on line) |
x,y,z | point on line to be snapped |
thresh | snapping threshold (>0) |
vertex | snap also to vertex (non-zero) |
Definition at line 28 of file vedit/snap.c.