GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
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. More... | |
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) More... | |
int | Vect_delete_line (struct Map_info *Map, off_t line) |
Delete existing feature (topological level required) More... | |
int | Vect_restore_line (struct Map_info *Map, off_t offset, off_t line) |
Restore previously deleted feature (topological level required) More... | |
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.
int Vect_delete_line | ( | struct Map_info * | Map, |
off_t | line | ||
) |
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 275 of file vector/Vlib/write.c.
int Vect_restore_line | ( | struct Map_info * | Map, |
off_t | offset, | ||
off_t | line | ||
) |
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 309 of file vector/Vlib/write.c.
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 238 of file vector/Vlib/write.c.
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 196 of file vector/Vlib/write.c.
Referenced by IL_write_point_2d().