|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
|
Vector library - list definition. More...

Go to the source code of this file.
Functions | |
| struct ilist * | Vect_new_list (void) |
| Creates and initializes a struct ilist. | |
| int | Vect_reset_list (struct ilist *list) |
| Reset ilist structure. | |
| void | Vect_destroy_list (struct ilist *list) |
| Frees all memory associated with a struct ilist, including the struct itself. | |
| int | Vect_list_append (struct ilist *list, int val) |
| Append new item to the end of list if not yet present. | |
| int | Vect_list_append_list (struct ilist *alist, const struct ilist *blist) |
| Append new items to the end of list if not yet present. | |
| int | Vect_list_delete (struct ilist *list, int val) |
| Remove a given value (item) from list. | |
| int | Vect_list_delete_list (struct ilist *alist, const struct ilist *blist) |
| Delete list from existing list. | |
| int | Vect_val_in_list (const struct ilist *list, int val) |
| Find a given item in the list. | |
| struct boxlist * | Vect_new_boxlist (int have_boxes) |
| Creates and initializes a struct boxlist. | |
| int | Vect_reset_boxlist (struct boxlist *list) |
| Reset boxlist structure. | |
| void | Vect_destroy_boxlist (struct boxlist *list) |
| Frees all memory associated with a struct boxlist, including the struct itself. | |
| int | Vect_boxlist_append (struct boxlist *list, int id, const struct bound_box *box) |
| Append new item to the end of list if not yet present. | |
| int | Vect_boxlist_append_boxlist (struct boxlist *alist, const struct boxlist *blist) |
| Append new items to the end of list if not yet present. | |
| int | Vect_boxlist_delete (struct boxlist *list, int id) |
| Remove a given value (item) from list. | |
| int | Vect_boxlist_delete_boxlist (struct boxlist *alist, const struct boxlist *blist) |
| Delete list from existing list. | |
| int | Vect_val_in_boxlist (const struct boxlist *list, int id) |
| Find a given item in the list. | |
Vector library - list definition.
Higher level functions for reading/writing/manipulating vectors.
(C) 2001-2009 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.
Definition in file vector/Vlib/list.c.
Append new item to the end of list if not yet present.
| [in,out] | list | pointer to ilist structure |
| id | new item to append to the end of list | |
| box | bounding box |
Definition at line 287 of file vector/Vlib/list.c.
References G_realloc, and NULL.
Referenced by Vect_boxlist_append_boxlist().
Append new items to the end of list if not yet present.
| [in,out] | alist | pointer to boxlist structure where items will be appended |
| blist | pointer to boxlist structure with new items |
Definition at line 330 of file vector/Vlib/list.c.
References bound_box::B, bound_box::E, bound_box::N, NULL, bound_box::S, bound_box::T, Vect_boxlist_append(), and bound_box::W.
Remove a given value (item) from list.
| [in,out] | list | pointer to boxlist structure |
| id | to remove |
Definition at line 362 of file vector/Vlib/list.c.
References NULL.
Referenced by Vect_boxlist_delete_boxlist().
Delete list from existing list.
| [in,out] | alist | pointer to original boxlist structure, |
| blist | pointer to boxlist structure with items to delete |
Definition at line 394 of file vector/Vlib/list.c.
References NULL, and Vect_boxlist_delete().
Frees all memory associated with a struct boxlist, including the struct itself.
| [in,out] | list | pointer to ilist structure |
Definition at line 264 of file vector/Vlib/list.c.
References G_free(), and NULL.
Referenced by Vect_find_line_list(), Vect_net_build_graph(), Vect_net_ttb_build_graph(), Vect_net_ttb_shortest_path(), Vect_overlay_and(), Vect_remove_duplicates(), Vect_snap_line(), and Vedit_render_map().
Frees all memory associated with a struct ilist, including the struct itself.
| [in,out] | list | pointer to ilist structure |
Definition at line 69 of file vector/Vlib/list.c.
References G_free(), and NULL.
Referenced by NetA_betweenness_closeness(), Vect__load_plus_pg(), Vect_find_line(), Vect_merge_lines(), Vect_overlay_and(), Vect_remove_small_areas_ext(), Vect_remove_small_areas_nat(), Vect_snap_lines(), Vect_topo_check(), Vect_write_ascii(), Vedit_connect_lines(), Vedit_delete_area(), Vedit_extend_lines(), Vedit_merge_lines(), and Vedit_select_by_query().
Append new item to the end of list if not yet present.
| [in,out] | list | pointer to ilist structure |
| val | new item to append to the end of list |
Definition at line 89 of file vector/Vlib/list.c.
References G_realloc, and NULL.
Referenced by NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_find_path(), NetA_min_cut(), NetA_spanning_tree(), NetA_varray_to_nodes(), Vect_cidx_find_all(), Vect_cidx_get_unique_cats_by_index(), Vect_field_cat_get(), Vect_find_line(), Vect_find_line_list(), Vect_get_area_boundaries(), Vect_get_isle_boundaries(), Vect_graph_shortest_path(), Vect_list_append_list(), Vect_overlay_and(), Vect_remove_small_areas_ext(), Vect_remove_small_areas_nat(), Vect_select_areas_by_polygon(), Vect_select_lines_by_polygon(), Vedit_connect_lines(), Vedit_extend_lines(), Vedit_select_by_query(), and Vedit_split_lines().
Append new items to the end of list if not yet present.
| [in,out] | alist | pointer to ilist structure where items will be appended |
| blist | pointer to ilist structure with new items |
Definition at line 123 of file vector/Vlib/list.c.
References NULL, and Vect_list_append().
Remove a given value (item) from list.
| [in,out] | list | pointer to ilist structure |
| val | to remove |
Definition at line 145 of file vector/Vlib/list.c.
References NULL.
Referenced by Vect_list_delete_list().
Delete list from existing list.
| [in,out] | alist | pointer to original ilist structure, |
| blist | pointer to ilist structure with items to delete |
Definition at line 174 of file vector/Vlib/list.c.
References NULL, and Vect_list_delete().
Creates and initializes a struct boxlist.
This structure is used as container for bounding boxes with id. The library routines handle all memory allocation.
| have_boxes | if set to 0, the list will hold only ids and no boxes |
Definition at line 224 of file vector/Vlib/list.c.
References boxlist::alloc_values, boxlist::box, G_malloc, boxlist::have_boxes, boxlist::id, boxlist::n_values, and NULL.
Referenced by Vect_attach_centroids(), Vect_attach_isles(), Vect_find_area(), Vect_find_island(), Vect_find_line_list(), Vect_isle_find_area(), Vect_net_build_graph(), Vect_net_ttb_build_graph(), Vect_net_ttb_shortest_path(), Vect_overlay_and(), Vect_remove_duplicates(), Vect_select_lines_by_polygon(), Vect_snap_line(), and Vedit_render_map().
Creates and initializes a struct ilist.
This structure is used as container for integer values. The library routines handle all memory allocation.
Definition at line 31 of file vector/Vlib/list.c.
References ilist::alloc_values, G_malloc, ilist::n_values, NULL, and ilist::value.
Referenced by NetA_betweenness_closeness(), Vect__load_plus_pg(), Vect_find_line(), Vect_find_node(), Vect_merge_lines(), Vect_overlay_and(), Vect_remove_small_areas_ext(), Vect_remove_small_areas_nat(), Vect_select_areas_by_polygon(), Vect_snap_lines(), Vect_topo_check(), Vect_write_ascii(), Vedit_connect_lines(), Vedit_delete_area(), Vedit_extend_lines(), Vedit_merge_lines(), and Vedit_select_by_query().
Reset boxlist structure.
To make sure boxlist structure is clean to be re-used. List must have previously been created with Vect_new_boxlist().
| [in,out] | list | pointer to struct boxlist |
Definition at line 251 of file vector/Vlib/list.c.
Referenced by Vect_remove_duplicates(), Vect_select_lines_by_box(), and Vect_snap_line().
Reset ilist structure.
To make sure ilist structure is clean to be re-used. List must have previously been created with Vect_new_list().
| [in,out] | list | pointer to struct ilist |
Definition at line 56 of file vector/Vlib/list.c.
Referenced by NetA_betweenness_closeness(), NetA_find_path(), NetA_min_cut(), Vect_cidx_find_all(), Vect_cidx_get_unique_cats_by_index(), Vect_field_cat_get(), Vect_find_line_list(), Vect_get_area_boundaries(), Vect_get_isle_boundaries(), Vect_graph_shortest_path(), Vect_merge_lines(), Vect_remove_small_areas_ext(), Vect_remove_small_areas_nat(), Vect_select_areas_by_polygon(), Vect_select_lines_by_polygon(), Vect_select_nodes_by_box(), Vect_spatial_index_select(), Vedit_connect_lines(), Vedit_extend_lines(), and Vedit_merge_lines().
Find a given item in the list.
| list | pointer to boxlist structure |
| id | value of item |
Definition at line 417 of file vector/Vlib/list.c.
References NULL.
Find a given item in the list.
| list | pointer to ilist structure |
| val | value of item |
Definition at line 196 of file vector/Vlib/list.c.
References NULL.
Referenced by Vect_find_line_list(), Vect_overlay_and(), Vedit_merge_lines(), and Vedit_select_by_query().