|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-f6f2c534ea
|
Vector library - select vector features. More...

Go to the source code of this file.
Functions | |
| int | Vect_select_lines_by_box (struct Map_info *Map, const struct bound_box *Box, int type, struct boxlist *list) |
| Select lines with bounding boxes by box. | |
| int | Vect_select_areas_by_box (struct Map_info *Map, const struct bound_box *Box, struct boxlist *list) |
| Select areas with bounding boxes by box. | |
| int | Vect_select_isles_by_box (struct Map_info *Map, const struct bound_box *Box, struct boxlist *list) |
| Select isles with bounding boxes by box. | |
| int | Vect_select_nodes_by_box (struct Map_info *Map, const struct bound_box *Box, struct ilist *list) |
| Select nodes by box. | |
| int | Vect_select_lines_by_polygon (struct Map_info *Map, struct line_pnts *Polygon, int nisles, struct line_pnts **Isles, int type, struct ilist *List) |
| Select lines by Polygon with optional isles. | |
| int | Vect_select_areas_by_polygon (struct Map_info *Map, struct line_pnts *Polygon, int nisles, struct line_pnts **Isles, struct ilist *List) |
| Select areas by Polygon with optional isles. | |
Vector library - select vector features.
Higher level functions for reading/writing/manipulating vectors.
(C) 2001-2011 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 sindex.c.
| int Vect_select_areas_by_box | ( | struct Map_info * | Map, |
| const struct bound_box * | Box, | ||
| struct boxlist * | list | ||
| ) |
Select areas with bounding boxes by box.
Select areas whose boxes overlap specified box!!! It means that selected area may or may not overlap the box.
| Map | vector map | |
| Box | bounding box | |
| [out] | output | list, must be initialized |
Definition at line 121 of file sindex.c.
References Box, dig_select_areas(), G_debug(), G_getenv_nofatal(), and NULL.
Referenced by Vect_find_area(), Vect_isle_find_area(), and Vedit_render_map().
| int Vect_select_areas_by_polygon | ( | struct Map_info * | Map, |
| struct line_pnts * | Polygon, | ||
| int | nisles, | ||
| struct line_pnts ** | Isles, | ||
| struct ilist * | List | ||
| ) |
Select areas by Polygon with optional isles.
Polygons should be closed, i.e. first and last points must be identical.
| Map | vector map | |
| Polygon | outer ring | |
| nisles | number of islands or 0 | |
| Isles | array of islands or NULL | |
| [out] | list | output list, must be initialised |
Definition at line 317 of file sindex.c.
References G_debug(), GV_BOUNDARY, NULL, Vect_find_area(), Vect_get_isle_area(), Vect_get_line_areas(), Vect_list_append(), Vect_new_list(), Vect_reset_list(), and Vect_select_lines_by_polygon().
| int Vect_select_isles_by_box | ( | struct Map_info * | Map, |
| const struct bound_box * | Box, | ||
| struct boxlist * | list | ||
| ) |
Select isles with bounding boxes by box.
Select isles whose boxes overlap specified box!!! It means that selected isle may or may not overlap the box.
| Map | vector map | |
| Box | bounding box | |
| [out] | list | output list, must be initialized |
Definition at line 165 of file sindex.c.
References Box, dig_select_isles(), and G_debug().
Referenced by Vect_attach_isles(), and Vect_find_island().
| int Vect_select_lines_by_box | ( | struct Map_info * | Map, |
| const struct bound_box * | Box, | ||
| int | type, | ||
| struct boxlist * | list | ||
| ) |
Select lines with bounding boxes by box.
Select lines whose boxes overlap specified box!!! It means that selected line may or may not overlap the box.
| Map | vector map | |
| Box | bounding box | |
| type | line type | |
| [out] | list | output list, must be initialized |
Definition at line 32 of file sindex.c.
References Box, dig_boxlist_add(), dig_init_boxlist(), dig_select_lines(), G_debug(), G_malloc, GV_BOUNDARY, GV_CENTROID, GV_FACE, GV_KERNEL, GV_LINE, GV_POINT, Plus_head::Line, Plus_head::n_blines, Plus_head::n_clines, Plus_head::n_flines, Plus_head::n_klines, Plus_head::n_llines, Plus_head::n_plines, NULL, P_line::type, and Vect_reset_boxlist().
Referenced by V2_read_line_sfa(), V2_read_next_line_ogr(), V2_read_next_line_pg(), Vect_attach_centroids(), 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_select_lines_by_polygon(), and Vedit_render_map().
| int Vect_select_lines_by_polygon | ( | struct Map_info * | Map, |
| struct line_pnts * | Polygon, | ||
| int | nisles, | ||
| struct line_pnts ** | Isles, | ||
| int | type, | ||
| struct ilist * | List | ||
| ) |
Select lines by Polygon with optional isles.
Polygons should be closed, i.e. first and last points must be identical.
| Map | vector map | |
| Polygon | outer ring | |
| nisles | number of islands or 0 | |
| Isles | array of islands or NULL | |
| type | line type | |
| [out] | list | output list, must be initialised |
Definition at line 220 of file sindex.c.
References boxlist::box, dig_line_box(), G_debug(), NULL, PORT_DOUBLE_MAX, Vect_line_check_intersection(), Vect_list_append(), Vect_new_boxlist(), Vect_new_line_struct(), Vect_point_in_poly(), Vect_read_line(), Vect_reset_list(), and Vect_select_lines_by_box().
Referenced by Vect_select_areas_by_polygon().
| int Vect_select_nodes_by_box | ( | struct Map_info * | Map, |
| const struct bound_box * | Box, | ||
| struct ilist * | list | ||
| ) |
Select nodes by box.
| Map | vector map | |
| Box | bounding box | |
| [out] | list | output list, must be initialized |
Definition at line 187 of file sindex.c.
References Box, dig_select_nodes(), G_debug(), and Vect_reset_list().
Referenced by Vect_find_node().