GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71817
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Format_info_offset Struct Reference

Data structure used for building pseudo-topology. More...

#include <dig_structs.h>

Data Fields

intarray
 Offset list. More...
 
int array_num
 Number of items in offset list. More...
 
int array_alloc
 Space allocated for offset list. More...
 

Detailed Description

Data structure used for building pseudo-topology.

See Vect__build_sfa() (Format_info_ogr and Format_info_pg) for implementation issues.

Definition at line 397 of file dig_structs.h.

Field Documentation

int* Format_info_offset::array

Offset list.

Array where feature/part info is stored for each feature in GRASS. This is not used for GV_CENTROID. Because one feature may contain more elements (geometry collection also recursively), offset for one line may be stored in more records. First record is FID, next records are part indexes if necessary.

Example 1:

  1. ring in 3. polygon in 7. feature (multipolygon) of geometry collection which has FID = 123 123 (feature 123: geometry colletion) 6 (7. feature in geometry collection: multiPolygon) 2 (3. polygon) 4 (5. ring in the polygon)

Example 2: geometry collection FID '1' containing one point, one linestring and one polygon

Offset:

idx  offset note
----------------
0          1      FID
1          0      first part (point)

2          1      FID
3          1      second part (linestring)

4          1      FID
5          2      third part (polygon)
6          0      first ring of polygon

GRASS topology:

line idx
-----------------
1    0      point
2    2      line
3    4      boundary
4    1      centroid read from topo (idx == FID)

In PostGIS Topology mode the offset array is used for mapping
nodes.

Definition at line 446 of file dig_structs.h.

Referenced by V1_delete_line_ogr(), V1_delete_line_pg(), V1_read_line_ogr(), V1_read_line_pg(), V2_read_line_pg(), V2_write_line_sfa(), Vect__free_offset(), Vect_build_ogr(), Vect_build_pg(), Vect_fidx_dump(), Vect_open_fidx(), and Vect_save_fidx().

int Format_info_offset::array_alloc

Space allocated for offset list.

Definition at line 454 of file dig_structs.h.

Referenced by Vect_open_fidx().

int Format_info_offset::array_num

Number of items in offset list.

Definition at line 450 of file dig_structs.h.

Referenced by V1_delete_line_ogr(), V1_delete_line_pg(), V1_read_line_ogr(), V1_read_line_pg(), Vect_fidx_dump(), Vect_open_fidx(), and Vect_save_fidx().


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