SpatiaLite  5.0.0
gg_structs.h
Go to the documentation of this file.
1 /*
2  gg_structs.h -- Gaia common support for geometries: structures
3 
4  version 5.0, 2020 August 1
5 
6  Author: Sandro Furieri a.furieri@lqt.it
7 
8  ------------------------------------------------------------------------------
9 
10  Version: MPL 1.1/GPL 2.0/LGPL 2.1
11 
12  The contents of this file are subject to the Mozilla Public License Version
13  1.1 (the "License"); you may not use this file except in compliance with
14  the License. You may obtain a copy of the License at
15  http://www.mozilla.org/MPL/
16 
17 Software distributed under the License is distributed on an "AS IS" basis,
18 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
19 for the specific language governing rights and limitations under the
20 License.
21 
22 The Original Code is the SpatiaLite library
23 
24 The Initial Developer of the Original Code is Alessandro Furieri
25 
26 Portions created by the Initial Developer are Copyright (C) 2008-2020
27 the Initial Developer. All Rights Reserved.
28 
29 Contributor(s):
30 
31 
32 Alternatively, the contents of this file may be used under the terms of
33 either the GNU General Public License Version 2 or later (the "GPL"), or
34 the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
35 in which case the provisions of the GPL or the LGPL are applicable instead
36 of those above. If you wish to allow use of your version of this file only
37 under the terms of either the GPL or the LGPL, and not to allow others to
38 use your version of this file under the terms of the MPL, indicate your
39 decision by deleting the provisions above and replace them with the notice
40 and other provisions required by the GPL or the LGPL. If you do not delete
41 the provisions above, a recipient may use your version of this file under
42 the terms of any one of the MPL, the GPL or the LGPL.
43 
44 */
45 
46 
53 #ifndef _GG_STRUCTS_H
54 #ifndef DOXYGEN_SHOULD_SKIP_THIS
55 #define _GG_STRUCTS_H
56 #endif
57 
58 #include <sys/types.h>
59 #include <stdint.h>
60 
61 #ifdef __cplusplus
62 extern "C"
63 {
64 #endif
65 
66 /* supporting files bigger than 2 GB */
67 #ifdef _WIN32 /* windows */
68 #define gaia_off_t __int64
69 #define gaia_fseek _fseeki64
70 #else /* not windows */
71 #define gaia_off_t off_t
72 #define gaia_fseek fseeko
73 #endif
74 
78  typedef struct gaiaPointStruct
79  {
80 /* an OpenGis POINT */
82  double X; /* X,Y coordinates */
84  double Y;
86  double Z; /* Z coordinate */
88  double M; /* M measure */
90  int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
92  struct gaiaPointStruct *Next; /* for double-linked list */
94  struct gaiaPointStruct *Prev; /* for double-linked list */
95  } gaiaPoint;
102 
106  typedef struct gaiaDynamicLineStruct
107  {
108 /* a generic DYNAMIC LINE object */
110  int Error;
112  int Srid;
114  gaiaPointPtr First; /* Points linked list - first */
116  gaiaPointPtr Last; /* Points linked list - last */
117  } gaiaDynamicLine;
124 
128  typedef struct gaiaLinestringStruct
129  {
130 /* an OpenGis LINESTRING */
132  int Points; /* number of vertices */
134  double *Coords; /* X,Y [vertices] array */
136  double MinX; /* MBR - BBOX */
138  double MinY; /* MBR - BBOX */
140  double MaxX; /* MBR - BBOX */
142  double MaxY; /* MBR - BBOX */
144  int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
146  struct gaiaLinestringStruct *Next; /* for linked list */
147  } gaiaLinestring;
154 
158  typedef struct gaiaRingStruct
159  {
160 /* a GIS ring - OpenGis LINESTRING, closed */
162  int Points; /* number of vertices */
164  double *Coords; /* X,Y [vertices] array */
166  int Clockwise; /* clockwise / counterclockwise */
168  double MinX; /* MBR - BBOX */
170  double MinY; /* MBR - BBOX */
172  double MaxX; /* MBR - BBOX */
174  double MaxY; /* MBR - BBOX */
176  int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
178  struct gaiaRingStruct *Next; /* for linked list */
180  struct gaiaPolygonStruct *Link; /* polygon reference */
181  } gaiaRing;
188 
192  typedef struct gaiaPolygonStruct
193  {
194 /* an OpenGis POLYGON */
196  gaiaRingPtr Exterior; /* exterior ring */
198  int NumInteriors; /* number of interior rings */
200  gaiaRingPtr Interiors; /* interior rings array */
202  int NextInterior; /* first free interior ring */
204  double MinX; /* MBR - BBOX */
206  double MinY; /* MBR - BBOX */
208  double MaxX; /* MBR - BBOX */
210  double MaxY; /* MBR - BBOX */
212  int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
214  struct gaiaPolygonStruct *Next; /* for linked list */
215  } gaiaPolygon;
222 
226  typedef struct gaiaGeomCollStruct
227  {
228 /* OpenGis GEOMETRYCOLLECTION */
230  int Srid; /* the SRID value for this GEOMETRY */
232  char endian_arch; /* littleEndian - bigEndian arch for target CPU */
234  char endian; /* littleEndian - bigEndian */
236  const unsigned char *blob; /* WKB encoded buffer */
238  unsigned long size; /* buffer size */
240  unsigned long offset; /* current offset [for parsing] */
242  gaiaPointPtr FirstPoint; /* Points linked list - first */
244  gaiaPointPtr LastPoint; /* Points linked list - last */
246  gaiaLinestringPtr FirstLinestring; /* Linestrings linked list - first */
248  gaiaLinestringPtr LastLinestring; /* Linestrings linked list - last */
250  gaiaPolygonPtr FirstPolygon; /* Polygons linked list - first */
252  gaiaPolygonPtr LastPolygon; /* Polygons linked list - last */
254  double MinX; /* MBR - BBOX */
256  double MinY; /* MBR - BBOX */
258  double MaxX; /* MBR - BBOX */
260  double MaxY; /* MBR - BBOX */
262  int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
264  int DeclaredType; /* the declared TYPE for this Geometry */
266  struct gaiaGeomCollStruct *Next; /* Vanuatu - used for linked list */
267  } gaiaGeomColl;
274 
278  typedef struct gaiaPreRingStruct
279  {
280 /* a LINESTRING used to build rings */
282  gaiaLinestringPtr Line; /* a LINESTRING pointer */
284  int AlreadyUsed; /* a switch to mark an already used line element */
286  struct gaiaPreRingStruct *Next; /* for linked list */
287  } gaiaPreRing;
294 
298  typedef struct gaiaValueStruct
299  {
300 /* a DBF field multitype value */
302  short Type; /* the type */
304  char *TxtValue; /* the text value */
306  sqlite3_int64 IntValue; /* the integer value */
308  double DblValue; /* the double value */
309  } gaiaValue;
314 
318  typedef struct gaiaDbfFieldStruct
319  {
320 /* a DBF field definition - shapefile attribute */
322  char *Name; /* field name */
324  unsigned char Type; /* field type */
326  int Offset; /* buffer offset [this field begins at *buffer+offset* and extends for *length* bytes */
328  unsigned char Length; /* field total length [in bytes] */
330  unsigned char Decimals; /* decimal positions */
332  gaiaValuePtr Value; /* the current multitype value for this attribute */
334  struct gaiaDbfFieldStruct *Next; /* pointer to next element in linked list */
335  } gaiaDbfField;
340 
344  typedef struct gaiaDbfListStruct
345  {
346 /* a linked list to contain the DBF fields definitions - shapefile attributes */
348  int RowId; /* the current RowId */
350  gaiaGeomCollPtr Geometry; /* geometry for current entity */
352  gaiaDbfFieldPtr First; /* pointer to first element in linked list */
354  gaiaDbfFieldPtr Last; /* pointer to last element in linker list */
355  } gaiaDbfList;
362 
366  typedef struct gaiaMemFileStruct
367  {
368 /* Memory File Type */
369  char *path;
370  void *buf;
371  uint32_t size;
372  uint32_t offset;
373  } gaiaMemFile;
380 
384  typedef struct gaiaDbfStruct
385  {
386 /* DBF TYPE */
390  int Valid; /* 1 = ready to process */
392  char *Path; /* the DBF path */
394  FILE *flDbf; /* the DBF file handle */
396  gaiaMemFilePtr memDbf; /* the DBF memory file */
398  gaiaDbfListPtr Dbf; /* the DBF attributes list */
400  unsigned char *BufDbf; /* the DBF I/O buffer */
402  int DbfHdsz; /* the DBF header length */
404  int DbfReclen; /* the DBF record length */
406  int DbfSize; /* current DBF size */
408  int DbfRecno; /* current DBF record number */
410  void *IconvObj; /* opaque reference to ICONV converter */
412  char *LastError; /* last error message */
413  } gaiaDbf;
419  typedef gaiaDbf *gaiaDbfPtr;
420 
424  typedef struct gaiaShapefileStruct
425  {
426 /* SHAPEFILE TYPE */
430  int Valid; /* 1 = ready to process */
432  int ReadOnly; /* read or write mode */
434  char *Path; /* the shapefile abstract path [no suffixes] */
436  FILE *flShx; /* the SHX file handle */
438  FILE *flShp; /* the SHP file handle */
440  FILE *flDbf; /* the DBF file handle */
442  gaiaMemFilePtr memShx; /* the SHX memory file */
444  gaiaMemFilePtr memShp; /* the SHP memory file */
446  gaiaMemFilePtr memDbf; /* the DBF memory file */
448  int Shape; /* the SHAPE code for the whole shapefile */
450  gaiaDbfListPtr Dbf; /* the DBF attributes list */
452  unsigned char *BufDbf; /* the DBF I/O buffer */
454  int DbfHdsz; /* the DBF header length */
456  int DbfReclen; /* the DBF record length */
458  int DbfSize; /* current DBF size */
460  int DbfRecno; /* current DBF record number */
462  unsigned char *BufShp; /* the SHP I/O buffer */
464  int ShpBfsz; /* the SHP buffer current size */
466  int ShpSize; /* current SHP size */
468  int ShxSize; /* current SHX size */
470  double MinX; /* the MBR/BBOX for the whole shapefile */
472  double MinY;
474  double MaxX;
476  double MaxY;
478  void *IconvObj; /* opaque reference to ICONV converter */
480  char *LastError; /* last error message */
482  int EffectiveType; /* the effective Geometry-type, as determined by gaiaShpAnalyze() */
484  int EffectiveDims; /* the effective Dimensions [XY, XYZ, XYM, XYZM], as determined by gaiaShpAnalyze() */
485  } gaiaShapefile;
492 
496  typedef struct gaiaOutBufferStruct
497  {
498 /* a struct handling a dynamically growing output buffer */
500  char *Buffer;
506  int Error;
507  } gaiaOutBuffer;
514 
515 #ifndef OMIT_ICONV /* ICONV enabled: supporting text reader */
516 
518 #define VRTTXT_FIELDS_MAX 65535
519 
520 #define VRTTXT_BLOCK_MAX 65535
521 
523 #define VRTTXT_TEXT 1
524 
525 #define VRTTXT_INTEGER 2
526 
527 #define VRTTXT_DOUBLE 3
528 
529 #define VRTTXT_NULL 4
530 
534  struct vrttxt_line
535  {
536 /* a struct representing a full LINE (aka Record) */
538  gaia_off_t offset;
540  int len;
546  int error;
547  };
548 
552  struct vrttxt_row
553  {
554 /* a struct storing Row offsets */
556  int line_no;
558  gaia_off_t offset;
560  int len;
563  };
564 
569  {
570 /*
571 / for efficiency sake, individual Row offsets
572 / are grouped in reasonably sized blocks
573 */
577  int num_rows;
584  };
585 
590  {
591 /* a struct representing a Column (aka Field) header */
593  char *name;
595  int type;
596  };
597 
601  typedef struct vrttxt_reader
602  {
603 /* the main TXT-Reader struct */
607  FILE *text_file;
609  void *toUtf8; /* the UTF-8 ICONV converter */
619  int error;
625  struct vrttxt_row **rows;
627  int num_rows;
629  int line_no;
637  char *line_buffer;
648  } gaiaTextReader;
655 
656 #endif /* end ICONV (text reader) */
657 
661  typedef struct gaiaLayerExtentInfos
662  {
664  int Count;
666  double MinX; /* MBR - BBOX */
668  double MinY; /* MBR - BBOX */
670  double MaxX; /* MBR - BBOX */
672  double MaxY; /* MBR - BBOX */
673  } gaiaLayerExtent;
674 
681 
685  typedef struct gaiaLayerAuthInfos
686  {
690  int IsHidden;
697  } gaiaLayerAuth;
698 
705 
710  {
712  int MaxSize;
714 
721 
726  {
728  sqlite3_int64 MinValue;
730  sqlite3_int64 MaxValue;
732 
739 
744  {
746  double MinValue;
748  double MaxValue;
750 
757 
762  {
764  int Ordinal;
786 
793 
797  typedef struct gaiaVectorLayerItem
798  {
803  char *TableName;
807  int Srid;
829  } gaiaVectorLayer;
830 
837 
841  typedef struct gaiaVectorLayersListStr
842  {
850 
857 
861  typedef struct gaiaProjAreaStr
862  {
863  double WestLongitude;
864  double SouthLatitude;
865  double EastLongitude;
866  double NorthLatitude;
867  } gaiaProjArea;
868 
875 
876 #ifdef __cplusplus
877 }
878 #endif
879 
880 #endif /* _GG_STRUCTS_H */
gaiaRingPtr Interiors
array of interior rings
Definition: gg_structs.h:200
int IntegerValuesCount
total count of INTEGER values
Definition: gg_structs.h:770
int current_buf_sz
current buffer size
Definition: gg_structs.h:633
unsigned char Length
total DBF buffer field length (in bytes)
Definition: gg_structs.h:328
unsigned char Decimals
precision (decimal digits)
Definition: gg_structs.h:330
gaiaVectorLayerPtr Last
pointer to last vector layer (linked list)
Definition: gg_structs.h:846
int WriteOffset
current write offset
Definition: gg_structs.h:502
int NextInterior
index of first unused interior ring
Definition: gg_structs.h:202
double MinY
Total Extent: min Y.
Definition: gg_structs.h:472
double MinX
Total Extent: min X.
Definition: gg_structs.h:470
double MaxX
MBR: max X.
Definition: gg_structs.h:172
int len
line length (in bytes)
Definition: gg_structs.h:540
gaiaDynamicLine * gaiaDynamicLinePtr
Typedef for dynamically growing line/ring structure.
Definition: gg_structs.h:123
double Y
Y coordinate.
Definition: gg_structs.h:84
LayerAttributeField infos.
Definition: gg_structs.h:761
struct gaiaLayerExtentInfos gaiaLayerExtent
Layer Extent infos.
struct gaiaVectorLayerItem gaiaVectorLayer
Vector Layer item.
struct gaiaAttributeFieldMaxSizeInfos gaiaAttributeFieldMaxSize
Attribute/Field MaxSize/Length infos.
Container for Virtual Text column (field) header.
Definition: gg_structs.h:589
int type
data type: one of GAIA_NULL_VALUE, GAIA_INT_VALUE, GAIA_DOUBLE_VALUE, GAIA_TEXT_VALUE
Definition: gg_structs.h:595
int HasTriggerDelete
Flag indicating if the Capabilities of the SpatialView supports Deleting: TRUE or FALSE.
Definition: gg_structs.h:696
int Valid
validity flag: 1 = ready to be processed
Definition: gg_structs.h:390
FILE * text_file
FILE handle.
Definition: gg_structs.h:607
Container similar to LINESTRING [internally used].
Definition: gg_structs.h:278
struct vrttxt_row_block * last
pointer to last block of records [linked list]
Definition: gg_structs.h:623
int DeclaredType
any valid Geometry Class type
Definition: gg_structs.h:264
double * Coords
COORDs mem-array.
Definition: gg_structs.h:134
gaiaPointPtr Last
pointer to last POINT [double linked list]
Definition: gg_structs.h:116
gaiaDbfList * gaiaDbfListPtr
Typedef for a list of DBF fields.
Definition: gg_structs.h:361
double M
M measure: only for XYM and XYZM dims.
Definition: gg_structs.h:88
Container for DBF field.
Definition: gg_structs.h:318
int ShxSize
SHX current file size.
Definition: gg_structs.h:468
int first_line_titles
TRUE if the first line contains column names.
Definition: gg_structs.h:617
gaiaLayerAttributeFieldPtr Last
pointer to last Field/Attribute (linked list)
Definition: gg_structs.h:826
FILE * flShp
FILE handle to SHP file.
Definition: gg_structs.h:438
int EffectiveDims
SHP actual dims: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM.
Definition: gg_structs.h:484
double MaxY
MBR: max Y.
Definition: gg_structs.h:210
double MinX
MBR: min X.
Definition: gg_structs.h:168
struct gaiaLinestringStruct gaiaLinestring
Container for OGC LINESTRING Geometry.
char * GeometryName
SQL name of the corresponding Geometry column.
Definition: gg_structs.h:805
double MaxX
Total Extent: max X.
Definition: gg_structs.h:474
struct gaiaLayerAttributeFieldInfos gaiaLayerAttributeField
LayerAttributeField infos.
double MinX
MBR: min X.
Definition: gg_structs.h:136
gaiaMemFile * gaiaMemFilePtr
Typedef for Memory File structure.
Definition: gg_structs.h:379
int ReadOnly
read or write mode
Definition: gg_structs.h:432
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:176
int SpatialIndex
one of GAIA_VECTOR_UNKNOWN, GAIA_SPATIAL_INDEX_NONE, GAIA_SPATIAL_INDEX_RTREE, GAIA_SPATIAL_INDEX_MBR...
Definition: gg_structs.h:818
gaiaGeomCollPtr Geometry
current Geometry
Definition: gg_structs.h:350
int TextValuesCount
total count of TEXT values
Definition: gg_structs.h:774
struct gaiaPreRingStruct gaiaPreRing
Container similar to LINESTRING [internally used].
const unsigned char * blob
BLOB-Geometry buffer.
Definition: gg_structs.h:236
double MaxY
Total Extent: max Y.
Definition: gg_structs.h:476
struct gaiaVectorLayerItem * Next
pointer to next item (linked list)
Definition: gg_structs.h:828
int DbfHdsz
header size (in bytes)
Definition: gg_structs.h:402
gaiaProjArea * gaiaProjAreaPtr
Typedef for BBOX corresponding to PROJ.6 AREA.
Definition: gg_structs.h:874
double MinX
MBR: min X.
Definition: gg_structs.h:254
int DbfSize
DBF current file size (in bytes)
Definition: gg_structs.h:458
gaiaLayerExtent * gaiaLayerExtentPtr
Typedef for Layer Extent infos.
Definition: gg_structs.h:680
gaiaOutBuffer * gaiaOutBufferPtr
Typedef for dynamically growing output buffer structure.
Definition: gg_structs.h:513
Container for OGC POINT Geometry.
Definition: gg_structs.h:78
int Valid
validity flag: 1 = ready to be processed
Definition: gg_structs.h:430
Vector Layer item.
Definition: gg_structs.h:797
gaiaAttributeFieldDoubleRangePtr DoubleRange
pointer to range of Double values infos (may be NULL)
Definition: gg_structs.h:782
Container for OGC POLYGON Geometry.
Definition: gg_structs.h:192
gaia_off_t offset
start offset
Definition: gg_structs.h:558
gaiaDbfFieldPtr Last
pointer to last DBF field [linked list]
Definition: gg_structs.h:354
struct gaiaDbfFieldStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:334
int ShpSize
SHP current file size.
Definition: gg_structs.h:466
int Shape
the SHP shape code
Definition: gg_structs.h:448
int MaxSize
MaxSize / MaxLength.
Definition: gg_structs.h:712
short Type
data type: one of GAIA_NULL_VALUE, GAIA_INT_VALUE, GAIA_DOUBLE_VALUE, GAIA_TEXT_VALUE
Definition: gg_structs.h:302
int Count
row count (aka feature count)
Definition: gg_structs.h:664
int error
validity flag
Definition: gg_structs.h:619
char * TxtValue
TEXT type value.
Definition: gg_structs.h:304
gaiaAttributeFieldDoubleRange * gaiaAttributeFieldDoubleRangePtr
Typedef for Attribute/Field Double range infos.
Definition: gg_structs.h:756
double MinY
MBR: min Y.
Definition: gg_structs.h:256
gaiaPoint * gaiaPointPtr
Typedef for OGC POINT structure.
Definition: gg_structs.h:101
int DbfRecno
current Record Number
Definition: gg_structs.h:408
double MinY
MBR: min Y.
Definition: gg_structs.h:170
FILE * flShx
FILE handle to SHX file.
Definition: gg_structs.h:436
int Srid
the SRID
Definition: gg_structs.h:112
Layer Extent infos.
Definition: gg_structs.h:661
struct gaiaDbfListStruct gaiaDbfList
Container for a list of DBF fields.
gaiaDbfFieldPtr First
pointer to first DBF field [linked list]
Definition: gg_structs.h:352
struct gaiaValueStruct gaiaValue
Container for variant (multi-type) value.
int Dimensions
one of GAIA_VECTOR_UNKNOWN, GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:814
double MaxValue
Maximum value.
Definition: gg_structs.h:748
gaiaValue * gaiaValuePtr
Typedef for variant (multi-type) value structure.
Definition: gg_structs.h:313
int DoubleValuesCount
total count of DOUBLE values
Definition: gg_structs.h:772
int Points
number of points [aka vertices]
Definition: gg_structs.h:162
struct gaiaVectorLayersListStr gaiaVectorLayersList
Container for Vector Layers List.
double X
X coordinate.
Definition: gg_structs.h:82
int Error
validity flag
Definition: gg_structs.h:506
int BufferSize
current buffer size (in bytes)
Definition: gg_structs.h:504
gaiaLinestring * gaiaLinestringPtr
Typedef for OGC LINESTRING structure.
Definition: gg_structs.h:153
int RowId
current RowID
Definition: gg_structs.h:348
gaiaLinestringPtr LastLinestring
pointer to last LINESTRING [linked list]; may be NULL
Definition: gg_structs.h:248
unsigned char Type
DBF data type.
Definition: gg_structs.h:324
struct gaiaShapefileStruct gaiaShapefile
Container for SHP file handling.
gaiaDbfField * gaiaDbfFieldPtr
Typedef for DBF field structure.
Definition: gg_structs.h:339
Container for Virtual Text block of records.
Definition: gg_structs.h:568
Attribute/Field Double range infos.
Definition: gg_structs.h:743
int Ordinal
ordinal position
Definition: gg_structs.h:764
int num_fields
number of fields into this record
Definition: gg_structs.h:562
struct gaiaRingStruct gaiaRing
Container for OGC RING Geometry.
Container for a list of DBF fields.
Definition: gg_structs.h:344
char decimal_separator
decimal separator
Definition: gg_structs.h:615
gaiaPreRing * gaiaPreRingPtr
Typedef for gaiaPreRing structure.
Definition: gg_structs.h:293
double Z
Z coordinate: only for XYZ and XYZM dims.
Definition: gg_structs.h:86
int IsReadOnly
Read-Only layer: TRUE or FALSE.
Definition: gg_structs.h:688
gaiaMemFilePtr memShx
Memory based SHX file.
Definition: gg_structs.h:442
gaiaVectorLayer * gaiaVectorLayerPtr
Typedef for Vector Layer item.
Definition: gg_structs.h:836
struct gaiaAttributeFieldDoubleRangeInfos gaiaAttributeFieldDoubleRange
Attribute/Field Double range infos.
int current_buf_off
current buffer offset [parsing]
Definition: gg_structs.h:635
char endian
BLOB Geometry endian arch.
Definition: gg_structs.h:234
gaiaLayerAttributeField * gaiaLayerAttributeFieldPtr
Typedef for Layer AttributeField infos.
Definition: gg_structs.h:792
double DblValue
DOUBLE type value.
Definition: gg_structs.h:308
Container for OGC RING Geometry.
Definition: gg_structs.h:158
int max_line_no
max Line Number
Definition: gg_structs.h:581
Container for Virtual Text record (line)
Definition: gg_structs.h:534
gaiaGeomColl * gaiaGeomCollPtr
Typedef for OGC GEOMETRYCOLLECTION structure.
Definition: gg_structs.h:273
gaiaLayerAuth * gaiaLayerAuthPtr
Typedef for Layer Auth infos.
Definition: gg_structs.h:704
sqlite3_int64 IntValue
INT type value.
Definition: gg_structs.h:306
struct gaiaPointStruct gaiaPoint
Container for OGC POINT Geometry.
int Clockwise
clockwise / counterclockwise
Definition: gg_structs.h:166
struct gaiaPolygonStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:214
int endian_arch
SHP endian arch.
Definition: gg_structs.h:428
double MinY
MBR: min Y.
Definition: gg_structs.h:138
double MaxX
MBR: max X.
Definition: gg_structs.h:258
struct gaiaLinestringStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:146
int DbfReclen
record length (in bytes)
Definition: gg_structs.h:404
gaiaAttributeFieldIntRange * gaiaAttributeFieldIntRangePtr
Typedef for Attribute/Field Integer range infos.
Definition: gg_structs.h:738
char field_separator
field separator character
Definition: gg_structs.h:611
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:144
int Srid
the SRID
Definition: gg_structs.h:230
unsigned long size
BLOB-Geometry buffer size (in bytes)
Definition: gg_structs.h:238
int field_offsets[VRTTXT_FIELDS_MAX]
array of field offsets [current record]
Definition: gg_structs.h:641
char endian_arch
CPU endian arch.
Definition: gg_structs.h:232
gaiaLinestringPtr FirstLinestring
pointer to first LINESTRING [linked list]; may be NULL
Definition: gg_structs.h:246
#define VRTTXT_FIELDS_MAX
Virtual Text driver: MAX number of fields.
Definition: gg_structs.h:518
int len
record (line) length (in bytes)
Definition: gg_structs.h:560
void * toUtf8
handle to ICONV converter object
Definition: gg_structs.h:609
gaiaLayerAttributeFieldPtr First
pointer to first Field/Attribute (linked list)
Definition: gg_structs.h:824
gaiaLinestringPtr Line
pointer to LINESTRING
Definition: gg_structs.h:282
gaiaVectorLayerPtr First
pointer to first vector layer (linked list)
Definition: gg_structs.h:844
int DbfReclen
DBF record length (in bytes)
Definition: gg_structs.h:456
struct vrttxt_row_block * first
pointer to first block of records [linked list]
Definition: gg_structs.h:621
double MaxX
MBR: max X.
Definition: gg_structs.h:140
gaiaDbfListPtr Dbf
list of DBF fields
Definition: gg_structs.h:398
struct gaiaProjAreaStr gaiaProjArea
BBOX corresponding to PROJ.6 AREA.
Container for dynamically growing line/ring.
Definition: gg_structs.h:106
Container for OGC LINESTRING Geometry.
Definition: gg_structs.h:128
struct gaiaPointStruct * Next
pointer to next item [double linked list]
Definition: gg_structs.h:92
gaiaPointPtr LastPoint
pointer to last POINT [linked list]; may be NULL
Definition: gg_structs.h:244
char * Path
DBF file pathname.
Definition: gg_structs.h:392
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:90
double MaxX
Extent: max X.
Definition: gg_structs.h:670
int line_no
Line Number.
Definition: gg_structs.h:556
int DbfSize
current file size
Definition: gg_structs.h:406
Container for dynamically growing output buffer.
Definition: gg_structs.h:496
void * IconvObj
handle to ICONV converter object
Definition: gg_structs.h:410
struct gaiaAttributeFieldIntRangeInfos gaiaAttributeFieldIntRange
Attribute/Field Integer range infos.
struct vrttxt_reader gaiaTextReader
Container for Virtual Text file handling.
char * LastError
last error message (may be NULL)
Definition: gg_structs.h:412
Attribute/Field Integer range infos.
Definition: gg_structs.h:725
unsigned char * BufDbf
I/O buffer.
Definition: gg_structs.h:400
unsigned char * BufShp
SHP I/O buffer.
Definition: gg_structs.h:462
char * Path
SHP 'abstract' path (no suffixes)
Definition: gg_structs.h:434
Container for Virtual Text file handling.
Definition: gg_structs.h:601
gaiaAttributeFieldMaxSizePtr MaxSize
pointer to MaxSize/Length infos (may be NULL)
Definition: gg_structs.h:778
int max_current_field
max field [current record]
Definition: gg_structs.h:645
gaiaAttributeFieldIntRangePtr IntRange
pointer to range of Integer values infos (may be NULL)
Definition: gg_structs.h:780
char * Name
field name
Definition: gg_structs.h:322
struct gaiaOutBufferStruct gaiaOutBuffer
Container for dynamically growing output buffer.
int field_lens[VRTTXT_FIELDS_MAX]
array of field lengths [current record]
Definition: gg_structs.h:643
Container for Virtual Text record (line) offsets.
Definition: gg_structs.h:552
gaiaRingPtr Exterior
the exterior ring (mandatory)
Definition: gg_structs.h:196
double * Coords
COORDs mem-array.
Definition: gg_structs.h:164
struct gaiaPolygonStruct gaiaPolygon
Container for OGC POLYGON Geometry.
char * Buffer
current buffer
Definition: gg_structs.h:500
int min_line_no
min Line Number
Definition: gg_structs.h:579
gaiaMemFilePtr memDbf
Memory based DBF file.
Definition: gg_structs.h:446
gaiaVectorLayerPtr Current
pointer to currently set vector layer
Definition: gg_structs.h:848
int error
validity flag
Definition: gg_structs.h:546
char * field_buffer
current field buffer
Definition: gg_structs.h:639
char * line_buffer
I/O buffer.
Definition: gg_structs.h:637
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:262
int ShpBfsz
SHP current buffer size (in bytes)
Definition: gg_structs.h:464
gaiaPolygonPtr FirstPolygon
pointer to first POLYGON [linked list]; may be NULL
Definition: gg_structs.h:250
char * LastError
last error message (may be NULL)
Definition: gg_structs.h:480
unsigned long offset
current offset [BLOB parsing]
Definition: gg_structs.h:240
Container for SHP file handling.
Definition: gg_structs.h:424
char * TableName
SQL name of the corresponding table.
Definition: gg_structs.h:803
int GeometryType
one of GAIA_VECTOR_UNKNOWN, GAIA_VECTOR_POINT, GAIA_VECTOR_LINESTRING, GAIA_VECTOR_POLYGON,...
Definition: gg_structs.h:812
gaiaMemFilePtr memDbf
Memory based DBF file.
Definition: gg_structs.h:396
int AlreadyUsed
already used/visited item
Definition: gg_structs.h:284
int num_rows
number of records
Definition: gg_structs.h:627
sqlite3_int64 MaxValue
Maximum value.
Definition: gg_structs.h:730
int num_fields
number of field into the record
Definition: gg_structs.h:544
Container for Vector Layers List.
Definition: gg_structs.h:841
BBOX corresponding to PROJ.6 AREA.
Definition: gg_structs.h:861
Container for DBF file handling.
Definition: gg_structs.h:384
double MinX
MBR: min X.
Definition: gg_structs.h:204
int current_line_ready
current record [line] ready for parsing
Definition: gg_structs.h:647
A Memory based File.
Definition: gg_structs.h:366
int line_no
current Line Number
Definition: gg_structs.h:629
gaiaVectorLayersList * gaiaVectorLayersListPtr
Typedef for Vector Layers List.
Definition: gg_structs.h:856
struct gaiaPreRingStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:286
int max_fields
max number of columns (fields)
Definition: gg_structs.h:631
unsigned char * BufDbf
DBF I/O buffer.
Definition: gg_structs.h:452
int NumInteriors
number of interior rings (may be, none)
Definition: gg_structs.h:198
gaiaPolygon * gaiaPolygonPtr
Typedef for OGC POLYGON structure.
Definition: gg_structs.h:221
double MaxY
Extent: max Y.
Definition: gg_structs.h:672
int DbfHdsz
DBF header size (in bytes)
Definition: gg_structs.h:454
int Points
number of points [aka vertices]
Definition: gg_structs.h:132
char text_separator
text separator character (quote)
Definition: gg_structs.h:613
int field_offsets[VRTTXT_FIELDS_MAX]
array of field offsets (where each field starts)
Definition: gg_structs.h:542
gaiaTextReader * gaiaTextReaderPtr
Typedef for Virtual Text file handling structure.
Definition: gg_structs.h:654
int IsHidden
Hidden layer: TRUE or FALSE.
Definition: gg_structs.h:690
int LayerType
one of GAIA_VECTOR_UNKNOWN, GAIA_VECTOR_TABLE, GAIA_VECTOR_VIEW, GAIA_VECTOR_VIRTUAL
Definition: gg_structs.h:801
gaiaPointPtr First
pointer to first POINT [double linked list]
Definition: gg_structs.h:114
gaiaAttributeFieldMaxSize * gaiaAttributeFieldMaxSizePtr
Typedef for Attribute/Field MaxSize/Length infos.
Definition: gg_structs.h:720
gaiaMemFilePtr memShp
Memory based SHP file.
Definition: gg_structs.h:444
Attribute/Field MaxSize/Length infos.
Definition: gg_structs.h:709
int NullValuesCount
total count of NULL values
Definition: gg_structs.h:768
gaiaPolygonPtr LastPolygon
pointer to last POLYGON [linked list]; may be NULL
Definition: gg_structs.h:252
struct gaiaDbfFieldStruct gaiaDbfField
Container for DBF field.
int Srid
SRID value.
Definition: gg_structs.h:807
gaiaLayerAuthPtr AuthInfos
pointer to Auth infos (may be NULL)
Definition: gg_structs.h:822
double MaxY
MBR: max Y.
Definition: gg_structs.h:174
struct gaiaPointStruct * Prev
pointer to previous item [double linked list]
Definition: gg_structs.h:94
double MinY
MBR: min Y.
Definition: gg_structs.h:206
struct gaiaMemFileStruct gaiaMemFile
A Memory based File.
double MaxY
MBR: max Y.
Definition: gg_structs.h:260
int endian_arch
DBF endian arch.
Definition: gg_structs.h:388
int BlobValuesCount
total count of BLOB values
Definition: gg_structs.h:776
struct gaiaLayerAuthInfos gaiaLayerAuth
Layer Auth infos.
FILE * flDbf
FILE handle to DBF file.
Definition: gg_structs.h:440
int HasTriggerInsert
Flag indicating if the Capabilities of the SpatialView supports Inserting: TRUE or FALSE.
Definition: gg_structs.h:692
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:212
struct vrttxt_row rows[VRTTXT_BLOCK_MAX]
array of records [lines]
Definition: gg_structs.h:575
Container for OGC GEOMETRYCOLLECTION Geometry.
Definition: gg_structs.h:226
double MinY
Extent: min Y.
Definition: gg_structs.h:668
Layer Auth infos.
Definition: gg_structs.h:685
struct gaiaGeomCollStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:266
gaiaDbfListPtr Dbf
list of DBF fields
Definition: gg_structs.h:450
int HasTriggerUpdate
Flag indicating if the Capabilities of the SpatialView supports Updating: TRUE or FALSE.
Definition: gg_structs.h:694
struct vrttxt_row ** rows
array of pointers to individual records [lines]
Definition: gg_structs.h:625
gaia_off_t offset
current offset (parsing)
Definition: gg_structs.h:538
struct gaiaGeomCollStruct gaiaGeomColl
Container for OGC GEOMETRYCOLLECTION Geometry.
int EffectiveType
SHP actual OGC Geometry type.
Definition: gg_structs.h:482
int Error
invalid object
Definition: gg_structs.h:110
gaiaDbf * gaiaDbfPtr
Typedef for DBF file handler structure.
Definition: gg_structs.h:419
struct gaiaLayerAttributeFieldInfos * Next
pointer to next item (linked list)
Definition: gg_structs.h:784
double MinValue
Minimum value.
Definition: gg_structs.h:746
gaiaRing * gaiaRingPtr
Typedef for OGC RING structure.
Definition: gg_structs.h:187
struct gaiaDynamicLineStruct gaiaDynamicLine
Container for dynamically growing line/ring.
char * name
column name
Definition: gg_structs.h:593
gaiaLayerExtentPtr ExtentInfos
pointer to Extent infos (may be NULL)
Definition: gg_structs.h:820
gaiaValuePtr Value
current variant [multi-type] value
Definition: gg_structs.h:332
struct gaiaRingStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:178
FILE * flDbf
FILE handle.
Definition: gg_structs.h:394
gaiaPointPtr FirstPoint
pointer to first POINT [linked list]; may be NULL
Definition: gg_structs.h:242
#define VRTTXT_BLOCK_MAX
Virtual Text driver: MAX block size (in bytes)
Definition: gg_structs.h:520
struct gaiaDbfStruct gaiaDbf
Container for DBF file handling.
sqlite3_int64 MinValue
Minimum value.
Definition: gg_structs.h:728
char * AttributeFieldName
SQL name of the corresponding column.
Definition: gg_structs.h:766
gaiaShapefile * gaiaShapefilePtr
Typedef for SHP file handler structure.
Definition: gg_structs.h:491
double MinX
Extent: min X.
Definition: gg_structs.h:666
struct vrttxt_column_header columns[VRTTXT_FIELDS_MAX]
array of columns (fields)
Definition: gg_structs.h:605
double MaxY
MBR: max X.
Definition: gg_structs.h:142
void * IconvObj
handle to ICONV converter object
Definition: gg_structs.h:478
int DbfRecno
DBF current Record Number.
Definition: gg_structs.h:460
double MaxX
MBR: max X.
Definition: gg_structs.h:208
struct gaiaPolygonStruct * Link
pointer to belonging Polygon
Definition: gg_structs.h:180
int Offset
DBF buffer offset [where the field value starts].
Definition: gg_structs.h:326
struct vrttxt_row_block * next
pointer to next item [linked list]
Definition: gg_structs.h:583
int num_rows
number of records into the array
Definition: gg_structs.h:577
Container for variant (multi-type) value.
Definition: gg_structs.h:298