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

Go to the source code of this file.
Functions | |
| int | Vect_get_next_line_id (struct Map_info *Map) |
| Get line id for sequential reading. | |
| int | Vect_read_next_line (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c) |
| Read next vector feature. | |
| int | Vect_read_line (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, int line) |
| Read vector feature (topological level required) | |
| int | Vect_line_alive (struct Map_info *Map, int line) |
| Check if feature is alive or dead (topological level required) | |
| int | Vect_node_alive (struct Map_info *Map, int node) |
| Check if node is alive or dead (topological level required) | |
| int | Vect_area_alive (struct Map_info *Map, int area) |
| Check if area is alive or dead (topological level required) | |
| int | Vect_isle_alive (struct Map_info *Map, int isle) |
| Check if isle is alive or dead (topological level required) | |
| off_t | Vect_get_line_offset (struct Map_info *Map, int line) |
| Get feature offset (topological level required) | |
Vector library - read features.
Higher level functions for reading/writing/manipulating vectors.
(C) 2001-2009, 2011-2013 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/read.c.
Check if area is alive or dead (topological level required)
Note: Topology must be built at level >= GV_BUILD_AREAS
| Map | pointer to Map_info structure |
| area | area id |
Definition at line 245 of file vector/Vlib/read.c.
References _, G_warning(), and NULL.
Referenced by Vect_build_partial(), Vect_remove_small_areas_ext(), Vect_remove_small_areas_nat(), Vect_topo_check(), Vect_write_ascii(), vector2perimeters(), and Vedit_delete_areas_cat().
Get feature offset (topological level required)
Note: Topology must be built at level >= GV_BUILD_BASE
Used for Vect_restore_line().
| Map | pointer to Map_info structure |
| line | feature id |
Definition at line 295 of file vector/Vlib/read.c.
References NULL.
Get line id for sequential reading.
This function returns id of feature which has been read by calling Vect_read_next_line().
| Map | pointer to Map_info struct |
Definition at line 83 of file vector/Vlib/read.c.
References _, G_debug(), G_warning(), and VECT_OPEN.
Check if isle is alive or dead (topological level required)
Note: Topology must be built at level >= GV_BUILD_AREAS
| Map | pointer to Map_info structure |
| isle | isle id |
Definition at line 269 of file vector/Vlib/read.c.
References _, G_warning(), and NULL.
Check if feature is alive or dead (topological level required)
Note: Topology must be built at level >= GV_BUILD_BASE
| Map | pointer to Map_info structure |
| line | feature id |
Definition at line 197 of file vector/Vlib/read.c.
References _, G_warning(), and NULL.
Referenced by Vect_break_polygons_file(), Vect_break_polygons_mem(), Vect_get_line_type(), Vect_merge_lines(), Vect_remove_duplicates(), Vect_remove_small_areas_ext(), Vect_remove_small_areas_nat(), Vect_snap_line(), Vect_snap_lines(), Vect_topo_check(), Vedit_add_vertex(), Vedit_bulk_labeling(), Vedit_chtype_lines(), Vedit_connect_lines(), Vedit_copy_lines(), Vedit_delete_lines(), Vedit_extend_lines(), Vedit_flip_lines(), Vedit_merge_lines(), Vedit_modify_cats(), Vedit_move_lines(), Vedit_move_vertex(), Vedit_remove_vertex(), Vedit_snap_line(), Vedit_snap_point(), and Vedit_split_lines().
Check if node is alive or dead (topological level required)
Note: Topology must be built at level >= GV_BUILD_BASE
| Map | pointer to Map_info structure |
| node | node id |
Definition at line 221 of file vector/Vlib/read.c.
References _, G_warning(), and NULL.
Referenced by Vect_clean_small_angles_at_nodes().
| int Vect_read_line | ( | struct Map_info * | Map, |
| struct line_pnts * | line_p, | ||
| struct line_cats * | line_c, | ||
| int | line | ||
| ) |
Read vector feature (topological level required)
This function implements random access. Constraints are ignored.
Note: Topology must be built at level >= GV_BUILD_BASE
A warning is printed on failure.
| Map | pointer to vector map | |
| [out] | line_p | feature geometry (pointer to line_pnts struct) |
| [out] | line_c | feature categories (pointer to line_cats struct) |
| line | feature id (starts at 1) |
Definition at line 157 of file vector/Vlib/read.c.
References _, G_debug(), G_free(), G_warning(), Vect_get_full_name(), and VECT_OPEN.
Referenced by NetA_get_node_costs(), NetA_initialise_varray(), NetA_varray_to_nodes(), Vect__get_area_points_nat(), Vect__load_plus_pg(), Vect_break_polygons_file(), Vect_break_polygons_mem(), Vect_build_nat(), Vect_clean_small_angles_at_nodes(), Vect_find_line_list(), Vect_get_area_cats(), Vect_get_line_box(), Vect_get_line_cat(), Vect_merge_lines(), Vect_net_build_graph(), Vect_net_nearest_nodes(), Vect_net_ttb_build_graph(), Vect_net_ttb_shortest_path(), Vect_overlay_and(), Vect_point_in_area_outer_ring(), Vect_point_in_island(), Vect_read_line_to_wkb(), Vect_remove_duplicates(), Vect_remove_small_areas_ext(), Vect_remove_small_areas_nat(), Vect_select_lines_by_polygon(), Vect_set_varray_from_cat_list(), Vect_set_varray_from_db(), Vect_snap_line(), Vect_snap_lines(), Vect_topo_check(), Vedit_add_vertex(), Vedit_bulk_labeling(), Vedit_chtype_lines(), Vedit_copy_lines(), Vedit_flip_lines(), Vedit_merge_lines(), Vedit_modify_cats(), Vedit_move_lines(), Vedit_move_vertex(), Vedit_remove_vertex(), Vedit_snap_lines(), Vedit_snap_point(), and Vedit_split_lines().
| int Vect_read_next_line | ( | struct Map_info * | Map, |
| struct line_pnts * | line_p, | ||
| struct line_cats * | line_c | ||
| ) |
Read next vector feature.
This function implements sequential access, constraints are reflected, see Vect_set_constraint_region(), Vect_set_constraint_type(), or Vect_set_constraint_field() for details.
Use Vect_rewind() to reset reading. Topological level is not required.
A warning is printed on failure.
| Map | pointer Map_info struct | |
| [out] | line_p | feature geometry (pointer to line_pnts struct) |
| [out] | line_c | feature categories (pointer to line_cats struct) |
Definition at line 116 of file vector/Vlib/read.c.
References _, G_debug(), G_free(), G_warning(), Vect_get_full_name(), and VECT_OPEN.
Referenced by Gp_load_sites(), Gv_load_vect(), IL_vector_input_data_2d(), P_estimate_splinestep(), P_Read_Vector_Region_Map(), Vect_build_nat(), Vect_copy_map_lines_field(), Vect_get_map_box1(), and Vect_write_ascii().