GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-602118adcc
|
#include <inttypes.h>
#include <sys/types.h>
#include <string.h>
#include <grass/vector.h>
#include <grass/glocale.h>
#include <grass/version.h>
Go to the source code of this file.
Functions | |
int | dig_Rd_P_node (struct Plus_head *Plus, int n, struct gvfile *fp) |
int | dig_Wr_P_node (struct Plus_head *Plus, int n, struct gvfile *fp) |
int | dig_Rd_P_line (struct Plus_head *Plus, int n, struct gvfile *fp) |
int | dig_Wr_P_line (struct Plus_head *Plus, int n, struct gvfile *fp) |
int | dig_Rd_P_area (struct Plus_head *Plus, int n, struct gvfile *fp) |
int | dig_Wr_P_area (struct Plus_head *Plus, int n, struct gvfile *fp) |
int | dig_Rd_P_isle (struct Plus_head *Plus, int n, struct gvfile *fp) |
int | dig_Wr_P_isle (struct Plus_head *Plus, int n, struct gvfile *fp) |
int | dig_Rd_Plus_head (struct gvfile *fp, struct Plus_head *ptr) |
Read Plus_head from file. More... | |
int | dig_Wr_Plus_head (struct gvfile *fp, struct Plus_head *ptr) |
Write Plus_head to file. More... | |
Definition at line 351 of file plus_struct.c.
References Plus_head::Area, P_area::centroid, dig__fread_port_P(), dig_alloc_area(), dig_area_alloc_isle(), dig_area_alloc_line(), dig_free_area(), G_debug(), P_area::isles, P_area::lines, P_area::n_isles, P_area::n_lines, and NULL.
Referenced by dig_load_plus().
Definition at line 449 of file plus_struct.c.
References P_isle::area, dig__fread_port_P(), dig_alloc_isle(), dig_free_isle(), dig_isle_alloc_line(), G_debug(), Plus_head::Isle, P_isle::lines, P_isle::n_lines, and NULL.
Referenced by dig_load_plus().
Definition at line 163 of file plus_struct.c.
References P_topo_c::area, dig__fread_port_C(), dig__fread_port_I(), dig__fread_port_O(), dig__fread_port_P(), dig_alloc_line(), dig_alloc_topo(), dig_free_line(), dig_type_from_store(), G_debug(), GV_BOUNDARY, GV_CENTROID, GV_FACE, GV_KERNEL, GV_LINE, GV_POINT, if(), P_topo_b::left, P_topo_f::left, Plus_head::Line, P_topo_l::N1, P_topo_b::N1, P_topo_l::N2, P_topo_b::N2, NULL, Plus_head::off_t_size, P_line::offset, P_topo_b::right, P_line::topo, P_line::type, P_topo_k::volume, and Plus_head::with_z.
Referenced by dig_load_plus().
Definition at line 52 of file plus_struct.c.
References P_node::angles, dig__fread_port_D(), dig__fread_port_F(), dig__fread_port_P(), dig_alloc_node(), dig_free_node(), dig_node_alloc_line(), G_debug(), P_node::lines, P_node::n_lines, Plus_head::Node, NULL, Plus_head::with_z, P_node::x, P_node::y, and P_node::z.
Referenced by dig_load_plus().
Read Plus_head from file.
fp | pointer to gvfile structure | |
[in,out] | ptr | pointer to Plus_head structure |
Definition at line 531 of file plus_struct.c.
References _, Plus_head::Area_offset, bound_box::B, Version_info::back_major, Version_info::back_minor, Plus_head::box, Plus_head::coor_size, dig__fread_port_C(), dig__fread_port_D(), dig__fread_port_L(), dig__fread_port_O(), dig__fread_port_P(), dig_fseek(), dig_init_portable(), dig_rewind(), dig_set_cur_port(), bound_box::E, Plus_head::Edge_offset, G_debug(), G_fatal_error(), G_warning(), GRASS_VERSION_MAJOR, GRASS_VERSION_MINOR, GV_TOPO_VER_MAJOR, GV_TOPO_VER_MINOR, Plus_head::head_size, Plus_head::Hole_offset, Plus_head::Isle_offset, Plus_head::Line_offset, Version_info::major, Version_info::minor, bound_box::N, Plus_head::n_areas, Plus_head::n_blines, Plus_head::n_clines, Plus_head::n_edges, Plus_head::n_flines, Plus_head::n_holes, Plus_head::n_isles, Plus_head::n_klines, Plus_head::n_lines, Plus_head::n_llines, Plus_head::n_nodes, Plus_head::n_plines, Plus_head::n_volumes, Plus_head::Node_offset, Plus_head::off_t_size, Plus_head::port, bound_box::S, bound_box::T, Plus_head::topo, Plus_head::version, Plus_head::Volume_offset, bound_box::W, and Plus_head::with_z.
Referenced by dig_load_plus(), and Vect_open_topo().
Definition at line 411 of file plus_struct.c.
References Plus_head::Area, P_area::centroid, dig__fwrite_port_P(), P_area::isles, P_area::lines, P_area::n_isles, P_area::n_lines, and NULL.
Referenced by dig_write_areas().
Definition at line 492 of file plus_struct.c.
References P_isle::area, dig__fwrite_port_P(), Plus_head::Isle, P_isle::lines, P_isle::n_lines, and NULL.
Referenced by dig_write_isles().
Definition at line 260 of file plus_struct.c.
References P_topo_c::area, dig__fwrite_port_C(), dig__fwrite_port_I(), dig__fwrite_port_O(), dig__fwrite_port_P(), dig_type_to_store(), G_debug(), GV_BOUNDARY, GV_CENTROID, GV_FACE, GV_KERNEL, GV_LINE, if(), P_topo_b::left, P_topo_f::left, Plus_head::Line, P_topo_l::N1, P_topo_b::N1, P_topo_l::N2, P_topo_b::N2, NULL, Plus_head::off_t_size, P_line::offset, P_topo_b::right, P_topo_f::right, P_line::topo, P_line::type, P_topo_k::volume, and Plus_head::with_z.
Referenced by dig_write_lines().
Definition at line 118 of file plus_struct.c.
References P_node::angles, dig__fwrite_port_D(), dig__fwrite_port_F(), dig__fwrite_port_P(), G_debug(), P_node::lines, P_node::n_lines, Plus_head::Node, NULL, Plus_head::with_z, P_node::x, P_node::y, and P_node::z.
Referenced by dig_write_nodes().
Write Plus_head to file.
ptr->off_t_size is used for both coor and topo files, but their sizes (ptr->coor_size for coor and no variable for topo) can be different. If either file is greater than PORT_LONG_MAX, ptr->off_t_size must be 8. This function determines this value of ptr->off_t_size and writes it to the file.
fp | pointer to gvfile structure | |
[in,out] | ptr | pointer to Plus_head structure |
Definition at line 711 of file plus_struct.c.
References Plus_head::Area, Plus_head::Area_offset, bound_box::B, Plus_head::box, Port_info::byte_order, Plus_head::coor_size, dig__fwrite_port_C(), dig__fwrite_port_D(), dig__fwrite_port_L(), dig__fwrite_port_O(), dig__fwrite_port_P(), dig_ftell(), dig_rewind(), dig_set_cur_port(), bound_box::E, Plus_head::Edge_offset, G_debug(), GV_BOUNDARY, GV_CENTROID, GV_FACE, GV_KERNEL, GV_LINE, GV_TOPO_EARLIEST_MAJOR, GV_TOPO_EARLIEST_MINOR, GV_TOPO_VER_MAJOR, GV_TOPO_VER_MINOR, Plus_head::Hole_offset, Plus_head::Isle, Plus_head::Isle_offset, Plus_head::Line, Plus_head::Line_offset, bound_box::N, Plus_head::n_areas, Plus_head::n_blines, Plus_head::n_clines, Plus_head::n_edges, Plus_head::n_flines, Plus_head::n_holes, Plus_head::n_isles, P_area::n_isles, Plus_head::n_klines, Plus_head::n_lines, P_node::n_lines, P_area::n_lines, P_isle::n_lines, Plus_head::n_llines, Plus_head::n_nodes, Plus_head::n_plines, Plus_head::n_volumes, Plus_head::Node, Plus_head::Node_offset, NULL, Plus_head::off_t_size, Plus_head::port, PORT_LONG_MAX, bound_box::S, bound_box::T, P_line::type, Plus_head::Volume_offset, bound_box::W, and Plus_head::with_z.
Referenced by dig_write_plus_file().