|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-ddeab64dbf
|
Basic topology-related info. More...
#include <dig_structs.h>

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 RTree * | Node_spidx | |
| Node spatial index. | ||
| struct RTree * | Line_spidx | |
| Line spatial index. | ||
| struct RTree * | Area_spidx | |
| Area spatial index. | ||
| struct RTree * | Isle_spidx | |
| Isles spatial index. | ||
| struct RTree * | Face_spidx | |
| Faces spatial index. | ||
| struct RTree * | Volume_spidx | |
| Volumes spatial index. | ||
| struct RTree * | Hole_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_index * | cidx | |
| 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. | ||
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.
| 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().
| 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().
| plus_t Plus_head::alloc_edges |
| plus_t Plus_head::alloc_faces |
| plus_t Plus_head::alloc_holes |
| 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().
| 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().
| 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().
| int Plus_head::alloc_uplines |
Allocated array of lines.
Definition at line 1169 of file dig_structs.h.
| int Plus_head::alloc_upnodes |
Allocated array of nodes.
Definition at line 1181 of file dig_structs.h.
| plus_t Plus_head::alloc_volumes |
Array of areas.
Definition at line 863 of file dig_structs.h.
Referenced by dig_add_area(), dig_area_add_isle(), dig_area_del_isle(), dig_del_area(), dig_del_isle(), dig_Wr_Plus_head(), V2__add_line_to_topo_nat(), Vect__load_plus_pg(), Vect_attach_centroids(), Vect_build_nat(), Vect_get_area_box(), Vect_isle_find_area(), and Vect_topo_dump().
| 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 spatial index.
Definition at line 1084 of file dig_structs.h.
Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().
| 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().
Bounding box of features.
Definition at line 849 of file dig_structs.h.
Referenced by dig_Rd_Plus_head(), dig_Wr_Plus_head(), V2__add_line_to_topo_nat(), V2_write_line_sfa(), Vect__load_plus_head(), Vect_attach_centroids(), Vect_attach_isle(), Vect_attach_isles(), Vect_build_nat(), and Vect_topo_dump().
| int Plus_head::built |
Highest level of topology currently available.
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().
| 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().
Array of category indexes.
Definition at line 1121 of file dig_structs.h.
| 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().
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().
| 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().
| long Plus_head::coor_mtime |
Time of last coor modification.
Definition at line 1137 of file dig_structs.h.
| off_t Plus_head::coor_size |
Size of coor file.
Definition at line 1133 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(), and dig_write_cidx_head().
| int Plus_head::do_uplist |
Indicates if the list of updated features is maintained.
Definition at line 1149 of file dig_structs.h.
| 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().
Faces spatial index.
Definition at line 1092 of file dig_structs.h.
| 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().
| long Plus_head::head_size |
| 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().
Holes spatial index.
Definition at line 1100 of file dig_structs.h.
| 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().
Array of isles.
Definition at line 867 of file dig_structs.h.
Referenced by dig_add_isle(), dig_del_area(), dig_del_isle(), dig_Wr_Plus_head(), Vect__load_plus_pg(), Vect_attach_isle(), Vect_attach_isles(), Vect_get_isle_box(), Vect_isle_find_area(), and Vect_topo_dump().
| 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().
Isles spatial index.
Definition at line 1088 of file dig_structs.h.
Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().
| 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().
Array of vector geometries.
Definition at line 859 of file dig_structs.h.
Referenced by dig_add_area(), dig_add_isle(), dig_angle_next_line(), dig_build_area_with_line(), dig_del_area(), dig_del_isle(), dig_del_line(), dig_line_get_area(), dig_line_set_area(), dig_node_angle_check(), dig_Wr_Plus_head(), V2__add_line_to_topo_nat(), V2_rewrite_line_nat(), Vect__build_downgrade(), Vect__load_map_lines_pg(), Vect__load_plus_pg(), Vect_attach_centroids(), Vect_build_nat(), Vect_build_partial(), Vect_get_line_box(), Vect_isle_find_area(), Vect_select_lines_by_box(), and Vect_topo_dump().
| 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 spatial index.
Definition at line 1080 of file dig_structs.h.
Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().
| 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().
| int Plus_head::mode |
Access mode.
Definition at line 833 of file dig_structs.h.
Referenced by Vect_build_partial(), and Vect_open_sidx().
| plus_t Plus_head::n_areas |
Current number of areas.
Definition at line 923 of file dig_structs.h.
Referenced by dig_add_area(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), Vect__load_plus_head(), Vect__load_plus_pg(), Vect_build_nat(), Vect_build_partial(), and Vect_topo_dump().
| plus_t Plus_head::n_blines |
Current number of boundaries.
Definition at line 882 of file dig_structs.h.
Referenced by dig_add_line(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), Vect__load_map_lines_pg(), Vect__load_plus_head(), Vect_build_nat(), Vect_build_partial(), and Vect_select_lines_by_box().
| 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().
| plus_t Plus_head::n_clines |
Current number of centroids.
Definition at line 886 of file dig_structs.h.
Referenced by dig_add_line(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), Vect__load_map_lines_pg(), Vect__load_plus_head(), Vect_build_nat(), Vect_build_partial(), and Vect_select_lines_by_box().
| 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().
| plus_t Plus_head::n_faces |
Current number of faces.
Definition at line 931 of file dig_structs.h.
| 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().
| plus_t Plus_head::n_hfaces |
Current number of hole faces.
Definition at line 902 of file dig_structs.h.
| 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().
| plus_t Plus_head::n_isles |
Current number of isles.
Definition at line 927 of file dig_structs.h.
Referenced by dig_add_isle(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), Vect__load_plus_head(), Vect__load_plus_pg(), Vect_build_nat(), Vect_build_partial(), and Vect_topo_dump().
| 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().
| plus_t Plus_head::n_lines |
Current number of lines.
Definition at line 919 of file dig_structs.h.
Referenced by dig_add_line(), dig_Rd_Plus_head(), dig_restore_line(), dig_Wr_Plus_head(), V2__delete_line_from_topo_nat(), V2_delete_line_nat(), V2_restore_line_nat(), V2_rewrite_line_nat(), Vect__build_downgrade(), Vect__load_map_lines_pg(), Vect__load_plus_head(), Vect__load_plus_pg(), Vect_build_nat(), Vect_build_partial(), and Vect_topo_dump().
| plus_t Plus_head::n_llines |
Current number of lines.
Definition at line 878 of file dig_structs.h.
Referenced by dig_add_line(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), Vect__load_map_lines_pg(), Vect__load_plus_head(), Vect_build_partial(), and Vect_select_lines_by_box().
| 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().
| plus_t Plus_head::n_plines |
Current number of points.
Definition at line 874 of file dig_structs.h.
Referenced by dig_add_line(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), Vect__load_map_lines_pg(), Vect__load_plus_head(), Vect_build_partial(), and Vect_select_lines_by_box().
| int Plus_head::n_uplines |
Number of updated lines.
Definition at line 1173 of file dig_structs.h.
| int Plus_head::n_upnodes |
number of updated nodes
Definition at line 1185 of file dig_structs.h.
| plus_t Plus_head::n_vfaces |
Current number of volume faces.
Definition at line 898 of file dig_structs.h.
| 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().
Array of nodes.
Definition at line 855 of file dig_structs.h.
Referenced by dig_add_node(), dig_angle_next_line(), dig_del_line(), dig_node_add_line(), dig_node_line_angle(), dig_which_node(), dig_Wr_Plus_head(), V2__add_line_to_topo_nat(), Vect_isle_find_area(), and Vect_topo_dump().
| 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 spatial index.
Definition at line 1076 of file dig_structs.h.
Referenced by dig_Rd_spidx_head(), and dig_Wr_spidx_head().
| 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().
| 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().
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().
| int Plus_head::release_support |
Release memory occupied by support structures (topo, spatial, category)
Definition at line 810 of file dig_structs.h.
| struct Version_info Plus_head::spidx |
Version info for spatial index file.
Definition at line 763 of file dig_structs.h.
| 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().
| 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.
Spatial index file pointer.
Definition at line 1042 of file dig_structs.h.
Referenced by Vect_save_sidx().
| 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().
| 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().
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().
| int Plus_head::spidx_with_z |
2D/3D spatial index
Definition at line 781 of file dig_structs.h.
Referenced by dig_Rd_spidx_head(), dig_Wr_spidx_head(), and Vect_build_partial().
| 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().
| 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().
| 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.
| 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 { ... } 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().
| int* Plus_head::upnodes |
Array of updated nodes.
Definition at line 1177 of file dig_structs.h.
| struct { ... } Plus_head::version |
Backward compatibility version info.
Referenced by dig_Rd_Plus_head(), dig_Rd_spidx_head(), and dig_read_cidx_head().
| 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().
Volumes spatial index.
Definition at line 1096 of file dig_structs.h.
| 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().
| int Plus_head::with_z |
2D/3D vector data
Definition at line 774 of file dig_structs.h.
Referenced by dig_Rd_Plus_head(), dig_Wr_Plus_head(), and Vect_build_partial().