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

Go to the source code of this file.
Functions | |
| off_t | Vect_write_line (struct Map_info *Map, int type, const struct line_pnts *points, const struct line_cats *cats) |
| Writes a new feature. | |
| off_t | Vect_rewrite_line (struct Map_info *Map, off_t line, int type, const struct line_pnts *points, const struct line_cats *cats) |
| Rewrites existing feature (topological level required) | |
| int | Vect_delete_line (struct Map_info *Map, off_t line) |
| Delete existing feature (topological level required) | |
| int | Vect_restore_line (struct Map_info *Map, off_t offset, off_t line) |
| Restore previously deleted feature (topological level required) | |
Vector library - write vector features.
Higher level functions for reading/writing/manipulating vectors.
Supported operations:
(C) 2001-2010, 2012-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/write.c.
Delete existing feature (topological level required)
Note: Topology must be built at level >= GV_BUILD_BASE
A warning is printed on error.
| Map | pointer to Map_info structure |
| line | feature id (level 2) or feature offset (level 1) |
Definition at line 247 of file vector/Vlib/write.c.
References _, G_debug(), G_warning(), AMI_STREAM< T >::name(), and Vect_get_name().
Referenced by Vect_break_polygons_file(), Vect_break_polygons_mem(), Vect_clean_small_angles_at_nodes(), Vect_merge_lines(), Vect_remove_duplicates(), Vect_remove_small_areas_ext(), Vect_remove_small_areas_nat(), Vedit_bulk_labeling(), Vedit_delete_area(), Vedit_delete_lines(), and Vedit_merge_lines().
Restore previously deleted feature (topological level required)
Note: Topology must be built at level >= GV_BUILD_BASE
A warning is printed on error.
| Map | pointer to Map_info structure |
| offset | feature offset to be restored |
| line | feature id to be restored (used only on level 2) |
Definition at line 281 of file vector/Vlib/write.c.
References _, G_debug(), G_warning(), AMI_STREAM< T >::name(), and Vect_get_name().
| off_t Vect_rewrite_line | ( | struct Map_info * | Map, |
| off_t | line, | ||
| int | type, | ||
| const struct line_pnts * | points, | ||
| const struct line_cats * | cats | ||
| ) |
Rewrites existing feature (topological level required)
Note: Topology must be built at level >= GV_BUILD_BASE
A warning is printed on error.
The number of points or cats or type may change. If necessary, the old feature is deleted and new is written.
| Map | pointer to Map_info structure |
| line | feature id (level 2) or feature offset (level 1) |
| type | feature type (GV_POINT, GV_LINE, ...) |
| points | feature geometry |
| cats | feature categories |
Definition at line 210 of file vector/Vlib/write.c.
References _, G_debug(), G_warning(), AMI_STREAM< T >::name(), Map_info::type, and Vect_get_name().
Referenced by Vect_break_polygons_file(), Vect_break_polygons_mem(), Vect_clean_small_angles_at_nodes(), Vect_remove_duplicates(), Vedit_add_vertex(), Vedit_bulk_labeling(), Vedit_chtype_lines(), Vedit_flip_lines(), Vedit_merge_lines(), Vedit_modify_cats(), Vedit_move_lines(), Vedit_move_vertex(), Vedit_remove_vertex(), Vedit_snap_lines(), and Vedit_split_lines().
| off_t Vect_write_line | ( | struct Map_info * | Map, |
| int | type, | ||
| const struct line_pnts * | points, | ||
| const struct line_cats * | cats | ||
| ) |
Writes a new feature.
New feature is written to the end of file (in the case of native format). Topological level is not required.
A warning is printed on error.
| Map | pointer to Map_info structure |
| type | feature type (see dig_defines.h for supported types) |
| points | pointer to line_pnts structure (feature geometry) |
| cats | pointer to line_cats structure (feature categories) |
Definition at line 168 of file vector/Vlib/write.c.
References _, G_debug(), G_warning(), AMI_STREAM< T >::name(), Map_info::type, and Vect_get_name().
Referenced by IL_write_point_2d(), NetA_add_point_on_node(), P_Aux_to_Vector(), P_Sparse_Points(), Vect_break_polygons_file(), Vect_break_polygons_mem(), Vect_clean_small_angles_at_nodes(), Vect_copy_map_lines_field(), Vect_merge_lines(), Vect_overlay_and(), Vect_read_ascii(), Vect_remove_duplicates(), Vect_remove_small_areas_ext(), Vect_remove_small_areas_nat(), Vect_topo_check(), Vedit_bulk_labeling(), Vedit_copy_lines(), and Vedit_split_lines().