GRASS 8 Programmer's Manual 8.6.0dev(2026)-ddeab64dbf
Loading...
Searching...
No Matches
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.
 
int with_z
 2D/3D vector data
 
int spidx_with_z
 2D/3D spatial index
 
int off_t_size
 Offset size.
 
long head_size
 Topo header size.
 
long spidx_head_size
 Spatial index header size.
 
long cidx_head_size
 Category index header size.
 
int release_support
 Release memory occupied by support structures (topo, spatial, category)
 
struct Port_info port
 Portability information.
 
struct Port_info spidx_port
 Portability information for spatial index.
 
struct Port_info cidx_port
 Portability information for category index.
 
int mode
 Access mode.
 
int built
 Highest level of topology currently available.
 
struct bound_box box
 Bounding box of features.
 
struct P_node ** Node
 Array of nodes.
 
struct P_line ** Line
 Array of vector geometries.
 
struct P_area ** Area
 Array of areas.
 
struct P_isle ** Isle
 Array of isles.
 
plus_t n_plines
 Current number of points.
 
plus_t n_llines
 Current number of lines.
 
plus_t n_blines
 Current number of boundaries.
 
plus_t n_clines
 Current number of centroids.
 
plus_t n_flines
 Current number of faces.
 
plus_t n_klines
 Current number of kernels.
 
plus_t n_vfaces
 Current number of volume faces.
 
plus_t n_hfaces
 Current number of hole faces.
 
plus_t n_nodes
 Current number of topological features derived from vector geometries.
 
plus_t n_edges
 Current number of edges.
 
plus_t n_lines
 Current number of lines.
 
plus_t n_areas
 Current number of areas.
 
plus_t n_isles
 Current number of isles.
 
plus_t n_faces
 Current number of faces.
 
plus_t n_volumes
 Current number of volumes.
 
plus_t n_holes
 Current number of holes.
 
plus_t alloc_nodes
 Number of allocated nodes.
 
plus_t alloc_edges
 Number of allocated edges.
 
plus_t alloc_lines
 Number of allocated lines.
 
plus_t alloc_areas
 Number of allocated areas.
 
plus_t alloc_isles
 Number of allocated isles.
 
plus_t alloc_faces
 Number of allocated faces.
 
plus_t alloc_volumes
 Number of allocated volumes.
 
plus_t alloc_holes
 Number of allocated holes.
 
off_t Node_offset
 Offset of array of nodes in topo file.
 
off_t Edge_offset
 Offset of array of edges in topo file.
 
off_t Line_offset
 Offset of array of vector geometries in topo file.
 
off_t Area_offset
 Offset of array of areas in topo file.
 
off_t Isle_offset
 Offset of array of isles in topo file.
 
off_t Volume_offset
 Offset of array of volumes in topo file.
 
off_t Hole_offset
 Offset of array of holes in topo file.
 
int Spidx_built
 Spatial index built?
 
int Spidx_new
 Build new spatial index.
 
int Spidx_file
 Build new spatial index in file.
 
struct gvfile spidx_fp
 Spatial index file pointer.
 
off_t Node_spidx_offset
 Offset of nodes in sidx file.
 
off_t Line_spidx_offset
 Offset of lines in sidx file.
 
off_t Area_spidx_offset
 Offset of areas in sidx file.
 
off_t Isle_spidx_offset
 Offset of isles in sidx file.
 
off_t Face_spidx_offset
 Offset of faces in sidx file.
 
off_t Volume_spidx_offset
 Offset of volumes in sidx file.
 
off_t Hole_spidx_offset
 Offset of holes in sidx file.
 
struct RTreeNode_spidx
 Node spatial index.
 
struct RTreeLine_spidx
 Line spatial index.
 
struct RTreeArea_spidx
 Area spatial index.
 
struct RTreeIsle_spidx
 Isles spatial index.
 
struct RTreeFace_spidx
 Faces spatial index.
 
struct RTreeVolume_spidx
 Volumes spatial index.
 
struct RTreeHole_spidx
 Holes spatial index.
 
int update_cidx
 Update category index if vector is modified.
 
int n_cidx
 Number of category indexes (one for each field/layer)
 
int a_cidx
 Allocated space for category indexes.
 
struct Cat_indexcidx
 Array of category indexes.
 
int cidx_up_to_date
 Category index to be updated.
 
off_t coor_size
 Size of coor file.
 
long coor_mtime
 Time of last coor modification.
 
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.
 

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 757 of file dig_structs.h.

Field Documentation

◆ a_cidx

int Plus_head::a_cidx

Allocated space for category indexes.

Definition at line 1117 of file dig_structs.h.

Referenced by dig_read_cidx_head().

◆ alloc_areas

plus_t Plus_head::alloc_areas

Number of allocated areas.

i.e. array size - 1

Definition at line 964 of file dig_structs.h.

Referenced by dig_add_area().

◆ alloc_edges

plus_t Plus_head::alloc_edges

Number of allocated edges.

i.e. array size - 1

Definition at line 952 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 976 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 988 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 970 of file dig_structs.h.

Referenced by dig_add_isle().

◆ alloc_lines

plus_t Plus_head::alloc_lines

Number of allocated lines.

i.e. array size - 1

Definition at line 958 of file dig_structs.h.

Referenced by dig_add_line().

◆ alloc_nodes

plus_t Plus_head::alloc_nodes

Number of allocated nodes.

i.e. array size - 1

Definition at line 946 of file dig_structs.h.

Referenced by dig_add_node().

◆ alloc_uplines

int Plus_head::alloc_uplines

Allocated array of lines.

Definition at line 1169 of file dig_structs.h.

◆ alloc_upnodes

int Plus_head::alloc_upnodes

Allocated array of nodes.

Definition at line 1181 of file dig_structs.h.

◆ alloc_volumes

plus_t Plus_head::alloc_volumes

Number of allocated volumes.

i.e. array size - 1

Definition at line 982 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 1005 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ Area_spidx

struct RTree* Plus_head::Area_spidx

Area spatial index.

Definition at line 1084 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ Area_spidx_offset

off_t Plus_head::Area_spidx_offset

Offset of areas in sidx file.

Definition at line 1055 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ 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 845 of file dig_structs.h.

Referenced by V2__add_line_to_topo_nat(), V2__delete_line_from_topo_nat(), V2_delete_line_sfa(), V2_write_line_sfa(), Vect__build_downgrade(), Vect__build_sfa(), Vect__load_map_lines_pg(), Vect__load_plus_pg(), Vect_build_nat(), Vect_build_ogr(), Vect_build_partial(), and Vect_build_pg().

◆ cidx [1/2]

struct Version_info Plus_head::cidx

Version info for category index file.

Definition at line 765 of file dig_structs.h.

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

◆ cidx [2/2]

struct Cat_index* Plus_head::cidx

Array of category indexes.

Definition at line 1121 of file dig_structs.h.

◆ cidx_head_size

long Plus_head::cidx_head_size

Category index header size.

Definition at line 804 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 825 of file dig_structs.h.

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

◆ 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 1128 of file dig_structs.h.

Referenced by dig_read_cidx(), V2_delete_line_nat(), V2_delete_line_sfa(), V2_restore_line_nat(), V2_rewrite_line_nat(), V2_write_line_sfa(), Vect__open_topo_pg(), and Vect_build_partial().

◆ coor_mtime

long Plus_head::coor_mtime

Time of last coor modification.

Definition at line 1137 of file dig_structs.h.

◆ 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 1149 of file dig_structs.h.

◆ Edge_offset

off_t Plus_head::Edge_offset

Offset of array of edges in topo file.

Definition at line 997 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 1092 of file dig_structs.h.

◆ Face_spidx_offset

off_t Plus_head::Face_spidx_offset

Offset of faces in sidx file.

Definition at line 1063 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 796 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 1017 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 1100 of file dig_structs.h.

◆ Hole_spidx_offset

off_t Plus_head::Hole_spidx_offset

Offset of holes in sidx file.

Definition at line 1071 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 1009 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ Isle_spidx

struct RTree* Plus_head::Isle_spidx

Isles spatial index.

Definition at line 1088 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ Isle_spidx_offset

off_t Plus_head::Isle_spidx_offset

Offset of isles in sidx file.

Definition at line 1059 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 1001 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ Line_spidx

struct RTree* Plus_head::Line_spidx

Line spatial index.

Definition at line 1080 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ Line_spidx_offset

off_t Plus_head::Line_spidx_offset

Offset of lines in sidx file.

Definition at line 1051 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 833 of file dig_structs.h.

Referenced by Vect_build_partial(), and Vect_open_sidx().

◆ n_areas

◆ n_blines

◆ n_cidx

int Plus_head::n_cidx

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

Definition at line 1113 of file dig_structs.h.

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

◆ n_clines

◆ n_edges

plus_t Plus_head::n_edges

Current number of edges.

Definition at line 915 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 931 of file dig_structs.h.

◆ n_flines

plus_t Plus_head::n_flines

Current number of faces.

Definition at line 890 of file dig_structs.h.

Referenced by dig_add_line(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), Vect_build_partial(), and Vect_select_lines_by_box().

◆ n_hfaces

plus_t Plus_head::n_hfaces

Current number of hole faces.

Definition at line 902 of file dig_structs.h.

◆ n_holes

plus_t Plus_head::n_holes

Current number of holes.

Definition at line 939 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ n_isles

◆ n_klines

plus_t Plus_head::n_klines

Current number of kernels.

Definition at line 894 of file dig_structs.h.

Referenced by dig_add_line(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), Vect_build_partial(), and Vect_select_lines_by_box().

◆ n_lines

◆ n_llines

◆ n_nodes

plus_t Plus_head::n_nodes

Current number of topological features derived from vector geometries.

Current number of nodes

Definition at line 911 of file dig_structs.h.

Referenced by dig_add_node(), dig_Rd_Plus_head(), dig_which_node(), dig_Wr_Plus_head(), Vect__load_map_nodes_pg(), Vect__load_plus_head(), Vect_build_partial(), and Vect_topo_dump().

◆ n_plines

plus_t Plus_head::n_plines

◆ n_uplines

int Plus_head::n_uplines

Number of updated lines.

Definition at line 1173 of file dig_structs.h.

◆ n_upnodes

int Plus_head::n_upnodes

number of updated nodes

Definition at line 1185 of file dig_structs.h.

◆ n_vfaces

plus_t Plus_head::n_vfaces

Current number of volume faces.

Definition at line 898 of file dig_structs.h.

◆ n_volumes

plus_t Plus_head::n_volumes

Current number of volumes.

Definition at line 935 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ Node

◆ Node_offset

off_t Plus_head::Node_offset

Offset of array of nodes in topo file.

Definition at line 993 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), and dig_Wr_Plus_head().

◆ Node_spidx

struct RTree* Plus_head::Node_spidx

Node spatial index.

Definition at line 1076 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ Node_spidx_offset

off_t Plus_head::Node_spidx_offset

Offset of nodes in sidx file.

Definition at line 1047 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ off_t_size

int Plus_head::off_t_size

Offset size.

Because Plus_head is available to all relevant functions

Definition at line 789 of file dig_structs.h.

Referenced by dig_Rd_Plus_head(), dig_Rd_spidx_head(), dig_read_cidx_head(), 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 817 of file dig_structs.h.

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

◆ release_support

int Plus_head::release_support

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

Definition at line 810 of file dig_structs.h.

◆ spidx

struct Version_info Plus_head::spidx

Version info for spatial index file.

Definition at line 763 of file dig_structs.h.

◆ Spidx_built

int Plus_head::Spidx_built

Spatial index built?

Set to 1 if spatial index is available

Definition at line 1025 of file dig_structs.h.

Referenced by Vect_save_sidx().

◆ 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 1037 of file dig_structs.h.

◆ spidx_fp

struct gvfile Plus_head::spidx_fp

Spatial index file pointer.

Definition at line 1042 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 800 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 1031 of file dig_structs.h.

Referenced by Vect__load_plus_pg(), Vect__open_topo_pg(), and Vect_save_sidx().

◆ spidx_port

struct Port_info Plus_head::spidx_port

Portability information for spatial index.

Definition at line 821 of file dig_structs.h.

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

◆ spidx_with_z

int Plus_head::spidx_with_z

2D/3D spatial index

  • WITH_Z
  • WITHOUT_Z

Definition at line 781 of file dig_structs.h.

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

◆ topo

struct Version_info Plus_head::topo

Version info for topology file.

Definition at line 761 of file dig_structs.h.

Referenced by Vect_attach_centroids().

◆ update_cidx

int Plus_head::update_cidx

Update category index if vector is modified.

By default, category index is not updated

Definition at line 1108 of file dig_structs.h.

Referenced by V2__add_line_to_topo_nat(), V2__delete_line_from_topo_nat(), V2_delete_line_nat(), V2_delete_line_sfa(), V2_restore_line_nat(), V2_rewrite_line_nat(), V2_write_line_sfa(), Vect__load_plus_pg(), and Vect__open_topo_pg().

◆ 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 1159 of file dig_structs.h.

◆ 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 1165 of file dig_structs.h.

◆ [struct]

struct { ... } Plus_head::uplist

List of updated lines/nodes.

Note: Vect_set_updated() must be called to maintain this list

Referenced by dig_del_line(), V2__add_line_to_topo_nat(), V2__delete_line_from_topo_nat(), V2_rewrite_line_nat(), and V2_write_line_sfa().

◆ upnodes

int* Plus_head::upnodes

Array of updated nodes.

Definition at line 1177 of file dig_structs.h.

◆ [struct]

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 1013 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 1096 of file dig_structs.h.

◆ Volume_spidx_offset

off_t Plus_head::Volume_spidx_offset

Offset of volumes in sidx file.

Definition at line 1067 of file dig_structs.h.

Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().

◆ with_z

int Plus_head::with_z

2D/3D vector data

  • WITH_Z
  • WITHOUT_Z

Definition at line 774 of file dig_structs.h.

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


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