GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
Vector library - update topo structure (lower level functions) More...
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <grass/vector.h>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
int | dig_init_plus (struct Plus_head *Plus) |
Initialize Plus_head structure. More... | |
void | dig_free_plus_nodes (struct Plus_head *Plus) |
Free Plus->Node structure. More... | |
void | dig_free_plus_lines (struct Plus_head *Plus) |
Free Plus->Line structure. More... | |
void | dig_free_plus_areas (struct Plus_head *Plus) |
Free Plus->Area structure. More... | |
void | dig_free_plus_isles (struct Plus_head *Plus) |
Free Plus->Isle structure. More... | |
void | dig_free_plus (struct Plus_head *Plus) |
Free Plus structure. More... | |
int | dig_load_plus (struct Plus_head *Plus, struct gvfile *plus, int head_only) |
Reads topo file to topo structure. More... | |
int | dig_write_plus_file (struct gvfile *fp_plus, struct Plus_head *Plus) |
Writes topo structure to topo file. More... | |
int | dig_write_nodes (struct gvfile *plus, struct Plus_head *Plus) |
Writes topo structure (nodes) to topo file. More... | |
int | dig_write_lines (struct gvfile *plus, struct Plus_head *Plus) |
Writes topo structure (lines) to topo file. More... | |
int | dig_write_areas (struct gvfile *plus, struct Plus_head *Plus) |
Writes topo structure (areas) to topo file. More... | |
int | dig_write_isles (struct gvfile *plus, struct Plus_head *Plus) |
Writes topo structure (isles) to topo file. More... | |
Vector library - update topo structure (lower level functions)
Lower level functions for reading/writing/manipulating vectors.
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 plus.c.
void dig_free_plus | ( | struct Plus_head * | Plus | ) |
Free Plus structure.
Structure is not inited and dig_init_plus() should follow.
[in] | Plus | pointer to Plus_head structure |
Definition at line 174 of file plus.c.
References dig_cidx_free(), dig_free_plus_areas(), dig_free_plus_isles(), dig_free_plus_lines(), dig_free_plus_nodes(), dig_spidx_free(), and G_debug().
Referenced by dig_load_plus().
void dig_free_plus_areas | ( | struct Plus_head * | Plus | ) |
Free Plus->Area structure.
[in] | Plus | pointer to Plus_head structure |
Definition at line 115 of file plus.c.
References Plus_head::alloc_areas, Plus_head::Area, dig_free_area(), G_debug(), G_free(), Plus_head::n_areas, and NULL.
Referenced by dig_free_plus().
void dig_free_plus_isles | ( | struct Plus_head * | Plus | ) |
Free Plus->Isle structure.
[in] | Plus | pointer to Plus_head structure |
Definition at line 143 of file plus.c.
References Plus_head::alloc_isles, dig_free_isle(), G_debug(), G_free(), Plus_head::Isle, Plus_head::n_isles, and NULL.
Referenced by dig_free_plus().
void dig_free_plus_lines | ( | struct Plus_head * | Plus | ) |
Free Plus->Line structure.
[in] | Plus | pointer to Plus_head structure |
Definition at line 79 of file plus.c.
References Plus_head::alloc_lines, dig_free_line(), G_debug(), G_free(), Plus_head::Line, Plus_head::n_blines, Plus_head::n_clines, Plus_head::n_flines, Plus_head::n_klines, Plus_head::n_lines, Plus_head::n_llines, Plus_head::n_plines, and NULL.
Referenced by dig_free_plus().
void dig_free_plus_nodes | ( | struct Plus_head * | Plus | ) |
Free Plus->Node structure.
[in] | Plus | pointer to Plus_head structure |
Definition at line 51 of file plus.c.
References Plus_head::alloc_nodes, dig_free_node(), G_debug(), G_free(), Plus_head::n_nodes, Plus_head::Node, and NULL.
Referenced by dig_free_plus().
int dig_init_plus | ( | struct Plus_head * | Plus | ) |
Initialize Plus_head structure.
[in,out] | Plus | pointer to Plus_head structure |
Definition at line 31 of file plus.c.
References Plus_head::built, dig_cidx_init(), dig_spidx_init(), G_debug(), G_zero(), and GV_BUILD_NONE.
Referenced by dig_load_plus().
Reads topo file to topo structure.
[in,out] | Plus | pointer to Plus_head structure |
[in] | plus | topo file |
[in] | head_only | read only head |
Definition at line 196 of file plus.c.
References _, Plus_head::Area_offset, dig_alloc_areas(), dig_alloc_isles(), dig_alloc_lines(), dig_alloc_nodes(), dig_free_plus(), dig_fseek(), dig_init_plus(), dig_Rd_P_area(), dig_Rd_P_isle(), dig_Rd_P_line(), dig_Rd_P_node(), dig_Rd_Plus_head(), dig_set_cur_port(), G_debug(), G_fatal_error(), Plus_head::Isle_offset, Plus_head::Line_offset, Plus_head::n_areas, Plus_head::n_isles, Plus_head::n_lines, Plus_head::n_nodes, Plus_head::Node_offset, and Plus_head::port.
Referenced by Vect_open_topo().
Writes topo structure (areas) to topo file.
[in,out] | plus | topo file |
[in] | Plus | pointer to Plus_head structure |
Definition at line 371 of file plus.c.
References Plus_head::Area_offset, dig_ftell(), dig_Wr_P_area(), and Plus_head::n_areas.
Referenced by dig_write_plus_file().
Writes topo structure (isles) to topo file.
[in,out] | plus | topo file |
[in] | Plus | pointer to Plus_head structure |
Definition at line 396 of file plus.c.
References dig_ftell(), dig_Wr_P_isle(), Plus_head::Isle_offset, and Plus_head::n_isles.
Referenced by dig_write_plus_file().
Writes topo structure (lines) to topo file.
[in,out] | plus | topo file |
[in] | Plus | pointer to Plus_head structure |
Definition at line 346 of file plus.c.
References dig_ftell(), dig_Wr_P_line(), Plus_head::Line_offset, and Plus_head::n_lines.
Referenced by dig_write_plus_file().
Writes topo structure (nodes) to topo file.
[in,out] | plus | topo file |
[in] | Plus | pointer to Plus_head structure |
Definition at line 322 of file plus.c.
References dig_ftell(), dig_Wr_P_node(), Plus_head::n_nodes, and Plus_head::Node_offset.
Referenced by dig_write_plus_file().
Writes topo structure to topo file.
[in,out] | fp_plus | topo file |
[in] | Plus | pointer to Plus_head structure |
Definition at line 272 of file plus.c.
References _, dig_fflush(), dig_rewind(), dig_set_cur_port(), dig_Wr_Plus_head(), dig_write_areas(), dig_write_isles(), dig_write_lines(), dig_write_nodes(), G_warning(), and Plus_head::port.
Referenced by Vect_save_topo().