GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
Plus_head Struct Reference

Basic topology-related info. More...

#include <dig_structs.h>

Collaboration diagram for Plus_head:

Data Fields

struct {
   struct Version_info   topo
 Version info for topology file. More...
 
   struct Version_info   spidx
 Version info for spatial index file. More...
 
   struct Version_info   cidx
 Version info for category index file. More...
 
version
 Backward compatibility version info. More...
 
int with_z
 2D/3D vector data More...
 
int spidx_with_z
 2D/3D spatial index More...
 
int off_t_size
 Offset size. More...
 
long head_size
 Topo header size. More...
 
long spidx_head_size
 Spatial index header size. More...
 
long cidx_head_size
 Category index header size. More...
 
int release_support
 Release memory occupied by support structures (topo, spatial, category) More...
 
struct Port_info port
 Portability information. More...
 
struct Port_info spidx_port
 Portability information for spatial index. More...
 
struct Port_info cidx_port
 Portability information for category index. More...
 
int mode
 Access mode. More...
 
int built
 Highest level of topology currently available. More...
 
struct bound_box box
 Bounding box of features. More...
 
struct P_node ** Node
 Array of nodes. More...
 
struct P_line ** Line
 Array of vector geometries. More...
 
struct P_area ** Area
 Array of areas. More...
 
struct P_isle ** Isle
 Array of isles. More...
 
plus_t n_plines
 Current number of points. More...
 
plus_t n_llines
 Current number of lines. More...
 
plus_t n_blines
 Current number of boundaries. More...
 
plus_t n_clines
 Current number of centroids. More...
 
plus_t n_flines
 Current number of faces. More...
 
plus_t n_klines
 Current number of kernels. More...
 
plus_t n_vfaces
 Current number of volume faces. More...
 
plus_t n_hfaces
 Current number of hole faces. More...
 
plus_t n_nodes
 Current number of topological features derived from vector geometries. More...
 
plus_t n_edges
 Current number of edges. More...
 
plus_t n_lines
 Current number of lines. More...
 
plus_t n_areas
 Current number of areas. More...
 
plus_t n_isles
 Current number of isles. More...
 
plus_t n_faces
 Current number of faces. More...
 
plus_t n_volumes
 Current number of volumes. More...
 
plus_t n_holes
 Current number of holes. More...
 
plus_t alloc_nodes
 Number of allocated nodes. More...
 
plus_t alloc_edges
 Number of allocated edges. More...
 
plus_t alloc_lines
 Number of allocated lines. More...
 
plus_t alloc_areas
 Number of allocated areas. More...
 
plus_t alloc_isles
 Number of allocated isles. More...
 
plus_t alloc_faces
 Number of allocated faces. More...
 
plus_t alloc_volumes
 Number of allocated volumes. More...
 
plus_t alloc_holes
 Number of allocated holes. More...
 
off_t Node_offset
 Offset of array of nodes in topo file. More...
 
off_t Edge_offset
 Offset of array of edges in topo file. More...
 
off_t Line_offset
 Offset of array of vector geometries in topo file. More...
 
off_t Area_offset
 Offset of array of areas in topo file. More...
 
off_t Isle_offset
 Offset of array of isles in topo file. More...
 
off_t Volume_offset
 Offset of array of volumes in topo file. More...
 
off_t Hole_offset
 Offset of array of holes in topo file. More...
 
int Spidx_built
 Spatial index built? More...
 
int Spidx_new
 Build new spatial index. More...
 
int Spidx_file
 Build new spatial index in file. More...
 
struct gvfile spidx_fp
 Spatial index file pointer. More...
 
off_t Node_spidx_offset
 Offset of nodes in sidx file. More...
 
off_t Line_spidx_offset
 Offset of lines in sidx file. More...
 
off_t Area_spidx_offset
 Offset of areas in sidx file. More...
 
off_t Isle_spidx_offset
 Offset of isles in sidx file. More...
 
off_t Face_spidx_offset
 Offset of faces in sidx file. More...
 
off_t Volume_spidx_offset
 Offset of volumes in sidx file. More...
 
off_t Hole_spidx_offset
 Offset of holes in sidx file. More...
 
struct RTreeNode_spidx
 Node spatial index. More...
 
struct RTreeLine_spidx
 Line spatial index. More...
 
struct RTreeArea_spidx
 Area spatial index. More...
 
struct RTreeIsle_spidx
 Isles spatial index. More...
 
struct RTreeFace_spidx
 Faces spatial index. More...
 
struct RTreeVolume_spidx
 Volumes spatial index. More...
 
struct RTreeHole_spidx
 Holes spatial index. More...
 
int update_cidx
 Update category index if vector is modified. More...
 
int n_cidx
 Number of category indexes (one for each field/layer) More...
 
int a_cidx
 Allocated space for category indexes. More...
 
struct Cat_indexcidx
 Array of category indexes. More...
 
int cidx_up_to_date
 Category index to be updated. More...
 
off_t coor_size
 Size of coor file. More...
 
long coor_mtime
 Time of last coor modification. More...
 
struct {
   int   do_uplist
 Indicates if the list of updated features is maintained. More...
 
   int *   uplines
 Array of updated lines. More...
 
   off_t *   uplines_offset
 Array of updated lines - offset. More...
 
   int   alloc_uplines
 Allocated array of lines. More...
 
   int   n_uplines
 Number of updated lines. More...
 
   int *   upnodes
 Array of updated nodes. More...
 
   int   alloc_upnodes
 Allocated array of nodes. More...
 
   int   n_upnodes
 number of updated nodes More...
 
uplist
 List of updated lines/nodes. More...
 

Detailed Description

Basic topology-related info.

Holds basic topology-related information about vector map

Important note: you should NOT store non-topological information in topological structures.

Definition at line 784 of file dig_structs.h.

Field Documentation

◆ a_cidx

int Plus_head::a_cidx

Allocated space for category indexes.

Definition at line 1145 of file dig_structs.h.

Referenced by dig_cidx_free(), dig_cidx_init(), and dig_read_cidx_head().

◆ alloc_areas

plus_t Plus_head::alloc_areas

Number of allocated areas.

i.e. array size - 1

Definition at line 992 of file dig_structs.h.

Referenced by dig_free_plus_areas().

◆ alloc_edges

plus_t Plus_head::alloc_edges

Number of allocated edges.

i.e. array size - 1

Definition at line 980 of file dig_structs.h.

◆ alloc_faces

plus_t Plus_head::alloc_faces

Number of allocated faces.

i.e. array size - 1

Definition at line 1004 of file dig_structs.h.

◆ alloc_holes

plus_t Plus_head::alloc_holes

Number of allocated holes.

i.e. array size - 1

Definition at line 1016 of file dig_structs.h.

◆ alloc_isles

plus_t Plus_head::alloc_isles

Number of allocated isles.

i.e. array size - 1

Definition at line 998 of file dig_structs.h.

Referenced by dig_free_plus_isles().

◆ alloc_lines

plus_t Plus_head::alloc_lines

Number of allocated lines.

i.e. array size - 1

Definition at line 986 of file dig_structs.h.

Referenced by dig_add_line(), and dig_free_plus_lines().

◆ alloc_nodes

plus_t Plus_head::alloc_nodes

Number of allocated nodes.

i.e. array size - 1

Definition at line 974 of file dig_structs.h.

Referenced by dig_add_node(), and dig_free_plus_nodes().

◆ alloc_uplines

int Plus_head::alloc_uplines

Allocated array of lines.

Definition at line 1197 of file dig_structs.h.

◆ alloc_upnodes

int Plus_head::alloc_upnodes

Allocated array of nodes.

Definition at line 1209 of file dig_structs.h.

Referenced by dig_node_add_updated().

◆ alloc_volumes

plus_t Plus_head::alloc_volumes

Number of allocated volumes.

i.e. array size - 1

Definition at line 1010 of file dig_structs.h.

◆ Area

◆ Area_offset

off_t Plus_head::Area_offset

Offset of array of areas in topo file.

Definition at line 1033 of file dig_structs.h.

Referenced by dig_load_plus(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), and dig_write_areas().

◆ Area_spidx

◆ Area_spidx_offset

off_t Plus_head::Area_spidx_offset

Offset of areas in sidx file.

Definition at line 1083 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ box

struct bound_box Plus_head::box

Bounding box of features.

Definition at line 877 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), dig_Wr_Plus_head(), and Vect_get_map_box().

◆ built

int Plus_head::built

Highest level of topology currently available.

  • GV_BUILD_NONE
  • GV_BUILD_BASE
  • GV_BUILD_AREAS
  • GV_BUILD_ATTACH_ISLES
  • GV_BUILD_CENTROIDS
  • GV_BUILD_ALL

Definition at line 873 of file dig_structs.h.

Referenced by dig_init_plus(), Vect__build_sfa(), Vect_build_ogr(), Vect_build_partial(), Vect_build_pg(), Vect_close(), Vect_get_built(), and Vect_save_fidx().

◆ cidx [1/2]

struct Cat_index* Plus_head::cidx

Array of category indexes.

Definition at line 1149 of file dig_structs.h.

◆ cidx [2/2]

struct Version_info Plus_head::cidx

Version info for category index file.

Definition at line 793 of file dig_structs.h.

Referenced by dig_cidx_free(), dig_cidx_init(), dig_read_cidx(), dig_read_cidx_head(), dig_write_cidx(), and dig_write_cidx_head().

◆ cidx_head_size

long Plus_head::cidx_head_size

Category index header size.

Definition at line 832 of file dig_structs.h.

Referenced by dig_read_cidx_head().

◆ cidx_port

struct Port_info Plus_head::cidx_port

Portability information for category index.

Definition at line 853 of file dig_structs.h.

Referenced by dig_read_cidx(), dig_read_cidx_head(), dig_write_cidx(), and dig_write_cidx_head().

◆ cidx_up_to_date

int Plus_head::cidx_up_to_date

Category index to be updated.

Set to 1 when cidx is created and reset to 0 whenever any line is changed

Definition at line 1156 of file dig_structs.h.

Referenced by dig_cidx_free(), dig_cidx_init(), and dig_read_cidx().

◆ coor_mtime

long Plus_head::coor_mtime

Time of last coor modification.

Definition at line 1165 of file dig_structs.h.

Referenced by Vect_open_topo().

◆ coor_size

off_t Plus_head::coor_size

◆ do_uplist

int Plus_head::do_uplist

Indicates if the list of updated features is maintained.

Definition at line 1177 of file dig_structs.h.

◆ Edge_offset

off_t Plus_head::Edge_offset

Offset of array of edges in topo file.

Definition at line 1025 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ Face_spidx

struct RTree* Plus_head::Face_spidx

Faces spatial index.

Definition at line 1120 of file dig_structs.h.

◆ Face_spidx_offset

off_t Plus_head::Face_spidx_offset

Offset of faces in sidx file.

Definition at line 1091 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ head_size

long Plus_head::head_size

Topo header size.

Definition at line 824 of file dig_structs.h.

Referenced by dig_Rd_Plus_head().

◆ Hole_offset

off_t Plus_head::Hole_offset

Offset of array of holes in topo file.

Definition at line 1045 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ Hole_spidx

struct RTree* Plus_head::Hole_spidx

Holes spatial index.

Definition at line 1128 of file dig_structs.h.

◆ Hole_spidx_offset

off_t Plus_head::Hole_spidx_offset

Offset of holes in sidx file.

Definition at line 1099 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ Isle

◆ Isle_offset

off_t Plus_head::Isle_offset

Offset of array of isles in topo file.

Definition at line 1037 of file dig_structs.h.

Referenced by dig_load_plus(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), and dig_write_isles().

◆ Isle_spidx

struct RTree* Plus_head::Isle_spidx

◆ Isle_spidx_offset

off_t Plus_head::Isle_spidx_offset

Offset of isles in sidx file.

Definition at line 1087 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ Line

◆ Line_offset

off_t Plus_head::Line_offset

Offset of array of vector geometries in topo file.

Definition at line 1029 of file dig_structs.h.

Referenced by dig_load_plus(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), and dig_write_lines().

◆ Line_spidx

struct RTree* Plus_head::Line_spidx

Line spatial index.

Definition at line 1108 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), dig_select_lines(), dig_spidx_free(), dig_spidx_free_lines(), and dig_Wr_spidx_head().

◆ Line_spidx_offset

off_t Plus_head::Line_spidx_offset

Offset of lines in sidx file.

Definition at line 1079 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ mode

int Plus_head::mode

Access mode.

  • GV_MODE_READ
  • GV_MODE_WRITE
  • GV_MODE_RW

Definition at line 861 of file dig_structs.h.

◆ n_areas

◆ n_blines

plus_t Plus_head::n_blines

Current number of boundaries.

Definition at line 910 of file dig_structs.h.

Referenced by dig_free_plus_lines(), dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ n_cidx

int Plus_head::n_cidx

Number of category indexes (one for each field/layer)

Definition at line 1141 of file dig_structs.h.

Referenced by dig_cidx_free(), dig_cidx_init(), dig_cidx_sort(), dig_read_cidx(), dig_read_cidx_head(), dig_write_cidx(), and dig_write_cidx_head().

◆ n_clines

plus_t Plus_head::n_clines

Current number of centroids.

Definition at line 914 of file dig_structs.h.

Referenced by dig_free_plus_lines(), dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ n_edges

plus_t Plus_head::n_edges

Current number of edges.

Definition at line 943 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ n_faces

plus_t Plus_head::n_faces

Current number of faces.

Definition at line 959 of file dig_structs.h.

◆ n_flines

plus_t Plus_head::n_flines

Current number of faces.

Definition at line 918 of file dig_structs.h.

Referenced by dig_free_plus_lines(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), and Vect_get_num_faces().

◆ n_hfaces

plus_t Plus_head::n_hfaces

Current number of hole faces.

Definition at line 930 of file dig_structs.h.

◆ n_holes

plus_t Plus_head::n_holes

Current number of holes.

Definition at line 967 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), dig_Wr_Plus_head(), and Vect_get_num_holes().

◆ n_isles

◆ n_klines

plus_t Plus_head::n_klines

Current number of kernels.

Definition at line 922 of file dig_structs.h.

Referenced by dig_free_plus_lines(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), and Vect_get_num_kernels().

◆ n_lines

◆ n_llines

plus_t Plus_head::n_llines

Current number of lines.

Definition at line 906 of file dig_structs.h.

Referenced by dig_free_plus_lines(), dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ n_nodes

plus_t Plus_head::n_nodes

Current number of topological features derived from vector geometries.

Current number of nodes

Definition at line 939 of file dig_structs.h.

Referenced by dig_add_node(), dig_free_plus_nodes(), dig_load_plus(), dig_Rd_Plus_head(), dig_which_node(), dig_Wr_Plus_head(), dig_write_nodes(), Vect__load_map_nodes_pg(), Vect_get_node_coor(), Vect_get_num_nodes(), and Vect_node_alive().

◆ n_plines

plus_t Plus_head::n_plines

Current number of points.

Definition at line 902 of file dig_structs.h.

Referenced by dig_free_plus_lines(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), and Vect__load_map_lines_pg().

◆ n_uplines

int Plus_head::n_uplines

Number of updated lines.

Definition at line 1201 of file dig_structs.h.

Referenced by dig_line_reset_updated(), and Vect_get_num_updated_lines().

◆ n_upnodes

int Plus_head::n_upnodes

number of updated nodes

Definition at line 1213 of file dig_structs.h.

Referenced by dig_node_add_updated(), dig_node_reset_updated(), and Vect_get_num_updated_nodes().

◆ n_vfaces

plus_t Plus_head::n_vfaces

Current number of volume faces.

Definition at line 926 of file dig_structs.h.

◆ n_volumes

plus_t Plus_head::n_volumes

Current number of volumes.

Definition at line 963 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), dig_Wr_Plus_head(), and Vect_get_num_volumes().

◆ Node

◆ Node_offset

off_t Plus_head::Node_offset

Offset of array of nodes in topo file.

Definition at line 1021 of file dig_structs.h.

Referenced by dig_load_plus(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), and dig_write_nodes().

◆ Node_spidx

◆ Node_spidx_offset

off_t Plus_head::Node_spidx_offset

Offset of nodes in sidx file.

Definition at line 1075 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), dig_Wr_spidx(), and dig_Wr_spidx_head().

◆ off_t_size

int Plus_head::off_t_size

Offset size.

Because Plus_head is available to all releveant functions

Definition at line 817 of file dig_structs.h.

Referenced by dig_Rd_P_line(), dig_Rd_Plus_head(), dig_Rd_spidx_head(), dig_read_cidx_head(), dig_Wr_P_line(), dig_Wr_Plus_head(), dig_Wr_spidx_head(), dig_write_cidx_head(), and Vect__load_plus_head().

◆ port

struct Port_info Plus_head::port

Portability information.

Definition at line 845 of file dig_structs.h.

Referenced by dig_load_plus(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), dig_write_plus_file(), and Vect_save_topo().

◆ release_support

int Plus_head::release_support

Release memory occupied by support structures (topo, spatial, category)

Definition at line 838 of file dig_structs.h.

Referenced by Vect__init_head(), and Vect_set_release_support().

◆ spidx

struct Version_info Plus_head::spidx

Version info for spatial index file.

Definition at line 791 of file dig_structs.h.

Referenced by dig_Rd_spidx_head().

◆ Spidx_built

int Plus_head::Spidx_built

Spatial index built?

Set to 1 if spatial index is available

Definition at line 1053 of file dig_structs.h.

Referenced by Vect__init_head(), Vect_build_partial(), Vect_build_sidx(), Vect_save_sidx(), and Vect_sidx_dump().

◆ Spidx_file

int Plus_head::Spidx_file

Build new spatial index in file.

Set to 1 to build new indices in file

Definition at line 1065 of file dig_structs.h.

Referenced by dig_spidx_init().

◆ spidx_fp

struct gvfile Plus_head::spidx_fp

Spatial index file pointer.

Definition at line 1070 of file dig_structs.h.

Referenced by Vect_save_sidx().

◆ spidx_head_size

long Plus_head::spidx_head_size

Spatial index header size.

Definition at line 828 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ Spidx_new

int Plus_head::Spidx_new

Build new spatial index.

Set to 1 if new spatial index will be generated

Definition at line 1059 of file dig_structs.h.

Referenced by dig_find_area_box(), dig_find_isle_box(), dig_find_node(), dig_select_areas(), dig_select_isles(), dig_select_lines(), dig_select_nodes(), dig_spidx_free(), and Vect_save_sidx().

◆ spidx_port

struct Port_info Plus_head::spidx_port

Portability information for spatial index.

Definition at line 849 of file dig_structs.h.

Referenced by dig_Rd_spidx(), dig_Rd_spidx_head(), dig_Wr_spidx(), dig_Wr_spidx_head(), rtree_search(), and Vect_save_sidx().

◆ spidx_with_z

int Plus_head::spidx_with_z

2D/3D spatial index

  • WITH_Z
  • WITHOUT_Z

Definition at line 809 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), dig_spidx_init(), dig_Wr_spidx_head(), and Vect_build_partial().

◆ topo

struct Version_info Plus_head::topo

Version info for topology file.

Definition at line 789 of file dig_structs.h.

Referenced by dig_Rd_Plus_head().

◆ update_cidx

int Plus_head::update_cidx

Update category index if vector is modified.

By default, category index is not updated

Definition at line 1136 of file dig_structs.h.

Referenced by Vect__init_head(), and Vect_set_category_index_update().

◆ uplines

int* Plus_head::uplines

Array of updated lines.

List of lines and nodes updated (topo info for the line was changed) by last write/rewrite/delete operation. Lines/nodes in the list may be deleted (e.g. delete boundary: first added for delete area and then delete

Definition at line 1187 of file dig_structs.h.

Referenced by Vect_get_updated_line().

◆ uplines_offset

off_t* Plus_head::uplines_offset

Array of updated lines - offset.

Negative value for dead (deleted) lines - used by Vect_restore_line()

Definition at line 1193 of file dig_structs.h.

Referenced by Vect_get_updated_line_offset().

◆ uplist

◆ upnodes

int* Plus_head::upnodes

Array of updated nodes.

Definition at line 1205 of file dig_structs.h.

Referenced by dig_node_add_updated(), and Vect_get_updated_node().

◆ version

struct { ... } Plus_head::version

Backward compatibility version info.

Referenced by dig_Rd_Plus_head(), dig_Rd_spidx_head(), and dig_read_cidx_head().

◆ Volume_offset

off_t Plus_head::Volume_offset

Offset of array of volumes in topo file.

Definition at line 1041 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ Volume_spidx

struct RTree* Plus_head::Volume_spidx

Volumes spatial index.

Definition at line 1124 of file dig_structs.h.

◆ Volume_spidx_offset

off_t Plus_head::Volume_spidx_offset

Offset of volumes in sidx file.

Definition at line 1095 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ with_z


The documentation for this struct was generated from the following file: