SpatiaLite  5.1.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.1.0, 2023 August 4
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-2023
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
362 
366  typedef struct gaiaMemFileStruct
367  {
368 /* Memory File Type */
369  char *path;
370  void *buf;
371  uint64_t size;
372  uint64_t offset;
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 */
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() */
492 
496  typedef struct gaiaOutBufferStruct
497  {
498 /* a struct handling a dynamically growing output buffer */
500  char *Buffer;
506  int Error;
514 
515 #ifndef OMIT_ICONV /* ICONV enabled: supporting text reader */
516 
518 #define VRTTXT_FIELDS_MAX 65535
520 #define VRTTXT_BLOCK_MAX 65535
521 
523 #define VRTTXT_TEXT 1
525 #define VRTTXT_INTEGER 2
527 #define VRTTXT_DOUBLE 3
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;
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 */
674 
681 
685  typedef struct gaiaLayerAuthInfos
686  {
690  int IsHidden;
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;
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;
868 
875 
876 #ifdef __cplusplus
877 }
878 #endif
879 
880 #endif /* _GG_STRUCTS_H */
gaiaVectorLayer * gaiaVectorLayerPtr
Typedef for Vector Layer item.
Definition: gg_structs.h:836
struct gaiaLayerAttributeFieldInfos gaiaLayerAttributeField
LayerAttributeField infos.
gaiaDbfField * gaiaDbfFieldPtr
Typedef for DBF field structure.
Definition: gg_structs.h:339
struct gaiaAttributeFieldIntRangeInfos gaiaAttributeFieldIntRange
Attribute/Field Integer range infos.
gaiaValue * gaiaValuePtr
Typedef for variant (multi-type) value structure.
Definition: gg_structs.h:313
#define VRTTXT_BLOCK_MAX
Virtual Text driver: MAX block size (in bytes)
Definition: gg_structs.h:520
gaiaLayerAttributeField * gaiaLayerAttributeFieldPtr
Typedef for Layer AttributeField infos.
Definition: gg_structs.h:792
struct gaiaRingStruct gaiaRing
Container for OGC RING Geometry.
struct gaiaDbfListStruct gaiaDbfList
Container for a list of DBF fields.
struct gaiaAttributeFieldDoubleRangeInfos gaiaAttributeFieldDoubleRange
Attribute/Field Double range infos.
struct gaiaOutBufferStruct gaiaOutBuffer
Container for dynamically growing output buffer.
struct gaiaVectorLayersListStr gaiaVectorLayersList
Container for Vector Layers List.
struct gaiaDbfFieldStruct gaiaDbfField
Container for DBF field.
struct gaiaGeomCollStruct gaiaGeomColl
Container for OGC GEOMETRYCOLLECTION Geometry.
gaiaPolygon * gaiaPolygonPtr
Typedef for OGC POLYGON structure.
Definition: gg_structs.h:221
gaiaTextReader * gaiaTextReaderPtr
Typedef for Virtual Text file handling structure.
Definition: gg_structs.h:654
gaiaLayerAuth * gaiaLayerAuthPtr
Typedef for Layer Auth infos.
Definition: gg_structs.h:704
gaiaOutBuffer * gaiaOutBufferPtr
Typedef for dynamically growing output buffer structure.
Definition: gg_structs.h:513
gaiaAttributeFieldIntRange * gaiaAttributeFieldIntRangePtr
Typedef for Attribute/Field Integer range infos.
Definition: gg_structs.h:738
gaiaPreRing * gaiaPreRingPtr
Typedef for gaiaPreRing structure.
Definition: gg_structs.h:293
struct vrttxt_reader gaiaTextReader
Container for Virtual Text file handling.
gaiaDbfList * gaiaDbfListPtr
Typedef for a list of DBF fields.
Definition: gg_structs.h:361
struct gaiaPreRingStruct gaiaPreRing
Container similar to LINESTRING [internally used].
struct gaiaMemFileStruct gaiaMemFile
A Memory based File.
gaiaAttributeFieldMaxSize * gaiaAttributeFieldMaxSizePtr
Typedef for Attribute/Field MaxSize/Length infos.
Definition: gg_structs.h:720
gaiaDynamicLine * gaiaDynamicLinePtr
Typedef for dynamically growing line/ring structure.
Definition: gg_structs.h:123
#define VRTTXT_FIELDS_MAX
Virtual Text driver: MAX number of fields.
Definition: gg_structs.h:518
struct gaiaDbfStruct gaiaDbf
Container for DBF file handling.
struct gaiaVectorLayerItem gaiaVectorLayer
Vector Layer item.
gaiaMemFile * gaiaMemFilePtr
Typedef for Memory File structure.
Definition: gg_structs.h:379
struct gaiaAttributeFieldMaxSizeInfos gaiaAttributeFieldMaxSize
Attribute/Field MaxSize/Length infos.
struct gaiaPolygonStruct gaiaPolygon
Container for OGC POLYGON Geometry.
gaiaAttributeFieldDoubleRange * gaiaAttributeFieldDoubleRangePtr
Typedef for Attribute/Field Double range infos.
Definition: gg_structs.h:756
gaiaShapefile * gaiaShapefilePtr
Typedef for SHP file handler structure.
Definition: gg_structs.h:491
gaiaPoint * gaiaPointPtr
Typedef for OGC POINT structure.
Definition: gg_structs.h:101
gaiaProjArea * gaiaProjAreaPtr
Typedef for BBOX corresponding to PROJ.6 AREA.
Definition: gg_structs.h:874
gaiaLayerExtent * gaiaLayerExtentPtr
Typedef for Layer Extent infos.
Definition: gg_structs.h:680
struct gaiaLayerExtentInfos gaiaLayerExtent
Layer Extent infos.
struct gaiaShapefileStruct gaiaShapefile
Container for SHP file handling.
gaiaGeomColl * gaiaGeomCollPtr
Typedef for OGC GEOMETRYCOLLECTION structure.
Definition: gg_structs.h:273
gaiaVectorLayersList * gaiaVectorLayersListPtr
Typedef for Vector Layers List.
Definition: gg_structs.h:856
struct gaiaLayerAuthInfos gaiaLayerAuth
Layer Auth infos.
struct gaiaProjAreaStr gaiaProjArea
BBOX corresponding to PROJ.6 AREA.
struct gaiaValueStruct gaiaValue
Container for variant (multi-type) value.
struct gaiaDynamicLineStruct gaiaDynamicLine
Container for dynamically growing line/ring.
gaiaRing * gaiaRingPtr
Typedef for OGC RING structure.
Definition: gg_structs.h:187
struct gaiaLinestringStruct gaiaLinestring
Container for OGC LINESTRING Geometry.
gaiaLinestring * gaiaLinestringPtr
Typedef for OGC LINESTRING structure.
Definition: gg_structs.h:153
gaiaDbf * gaiaDbfPtr
Typedef for DBF file handler structure.
Definition: gg_structs.h:419
struct gaiaPointStruct gaiaPoint
Container for OGC POINT Geometry.
Attribute/Field Double range infos.
Definition: gg_structs.h:744
double MinValue
Minimum value.
Definition: gg_structs.h:746
double MaxValue
Maximum value.
Definition: gg_structs.h:748
Attribute/Field Integer range infos.
Definition: gg_structs.h:726
sqlite3_int64 MinValue
Minimum value.
Definition: gg_structs.h:728
sqlite3_int64 MaxValue
Maximum value.
Definition: gg_structs.h:730
Attribute/Field MaxSize/Length infos.
Definition: gg_structs.h:710
int MaxSize
MaxSize / MaxLength.
Definition: gg_structs.h:712
Container for DBF field.
Definition: gg_structs.h:319
unsigned char Length
total DBF buffer field length (in bytes)
Definition: gg_structs.h:328
int Offset
DBF buffer offset [where the field value starts].
Definition: gg_structs.h:326
struct gaiaDbfFieldStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:334
char * Name
field name
Definition: gg_structs.h:322
unsigned char Decimals
precision (decimal digits)
Definition: gg_structs.h:330
gaiaValuePtr Value
current variant [multi-type] value
Definition: gg_structs.h:332
unsigned char Type
DBF data type.
Definition: gg_structs.h:324
Container for a list of DBF fields.
Definition: gg_structs.h:345
gaiaDbfFieldPtr First
pointer to first DBF field [linked list]
Definition: gg_structs.h:352
gaiaDbfFieldPtr Last
pointer to last DBF field [linked list]
Definition: gg_structs.h:354
gaiaGeomCollPtr Geometry
current Geometry
Definition: gg_structs.h:350
int RowId
current RowID
Definition: gg_structs.h:348
Container for DBF file handling.
Definition: gg_structs.h:385
int endian_arch
DBF endian arch.
Definition: gg_structs.h:388
FILE * flDbf
FILE handle.
Definition: gg_structs.h:394
int DbfReclen
record length (in bytes)
Definition: gg_structs.h:404
gaiaMemFilePtr memDbf
Memory based DBF file.
Definition: gg_structs.h:396
int DbfRecno
current Record Number
Definition: gg_structs.h:408
char * LastError
last error message (may be NULL)
Definition: gg_structs.h:412
gaiaDbfListPtr Dbf
list of DBF fields
Definition: gg_structs.h:398
int DbfSize
current file size
Definition: gg_structs.h:406
int DbfHdsz
header size (in bytes)
Definition: gg_structs.h:402
unsigned char * BufDbf
I/O buffer.
Definition: gg_structs.h:400
void * IconvObj
handle to ICONV converter object
Definition: gg_structs.h:410
char * Path
DBF file pathname.
Definition: gg_structs.h:392
int Valid
validity flag: 1 = ready to be processed
Definition: gg_structs.h:390
Container for dynamically growing line/ring.
Definition: gg_structs.h:107
int Srid
the SRID
Definition: gg_structs.h:112
gaiaPointPtr First
pointer to first POINT [double linked list]
Definition: gg_structs.h:114
gaiaPointPtr Last
pointer to last POINT [double linked list]
Definition: gg_structs.h:116
int Error
invalid object
Definition: gg_structs.h:110
Container for OGC GEOMETRYCOLLECTION Geometry.
Definition: gg_structs.h:227
gaiaPointPtr LastPoint
pointer to last POINT [linked list]; may be NULL
Definition: gg_structs.h:244
unsigned long size
BLOB-Geometry buffer size (in bytes)
Definition: gg_structs.h:238
gaiaLinestringPtr LastLinestring
pointer to last LINESTRING [linked list]; may be NULL
Definition: gg_structs.h:248
gaiaPolygonPtr LastPolygon
pointer to last POLYGON [linked list]; may be NULL
Definition: gg_structs.h:252
double MaxX
MBR: max X.
Definition: gg_structs.h:258
const unsigned char * blob
BLOB-Geometry buffer.
Definition: gg_structs.h:236
double MinY
MBR: min Y.
Definition: gg_structs.h:256
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:262
char endian
BLOB Geometry endian arch.
Definition: gg_structs.h:234
unsigned long offset
current offset [BLOB parsing]
Definition: gg_structs.h:240
gaiaLinestringPtr FirstLinestring
pointer to first LINESTRING [linked list]; may be NULL
Definition: gg_structs.h:246
int Srid
the SRID
Definition: gg_structs.h:230
gaiaPolygonPtr FirstPolygon
pointer to first POLYGON [linked list]; may be NULL
Definition: gg_structs.h:250
char endian_arch
CPU endian arch.
Definition: gg_structs.h:232
double MinX
MBR: min X.
Definition: gg_structs.h:254
struct gaiaGeomCollStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:266
double MaxY
MBR: max Y.
Definition: gg_structs.h:260
int DeclaredType
any valid Geometry Class type
Definition: gg_structs.h:264
gaiaPointPtr FirstPoint
pointer to first POINT [linked list]; may be NULL
Definition: gg_structs.h:242
LayerAttributeField infos.
Definition: gg_structs.h:762
gaiaAttributeFieldDoubleRangePtr DoubleRange
pointer to range of Double values infos (may be NULL)
Definition: gg_structs.h:782
gaiaAttributeFieldIntRangePtr IntRange
pointer to range of Integer values infos (may be NULL)
Definition: gg_structs.h:780
int Ordinal
ordinal position
Definition: gg_structs.h:764
int BlobValuesCount
total count of BLOB values
Definition: gg_structs.h:776
struct gaiaLayerAttributeFieldInfos * Next
pointer to next item (linked list)
Definition: gg_structs.h:784
int DoubleValuesCount
total count of DOUBLE values
Definition: gg_structs.h:772
char * AttributeFieldName
SQL name of the corresponding column.
Definition: gg_structs.h:766
gaiaAttributeFieldMaxSizePtr MaxSize
pointer to MaxSize/Length infos (may be NULL)
Definition: gg_structs.h:778
int TextValuesCount
total count of TEXT values
Definition: gg_structs.h:774
int IntegerValuesCount
total count of INTEGER values
Definition: gg_structs.h:770
int NullValuesCount
total count of NULL values
Definition: gg_structs.h:768
Layer Auth infos.
Definition: gg_structs.h:686
int HasTriggerDelete
Flag indicating if the Capabilities of the SpatialView supports Deleting: TRUE or FALSE.
Definition: gg_structs.h:696
int HasTriggerInsert
Flag indicating if the Capabilities of the SpatialView supports Inserting: TRUE or FALSE.
Definition: gg_structs.h:692
int IsHidden
Hidden layer: TRUE or FALSE.
Definition: gg_structs.h:690
int HasTriggerUpdate
Flag indicating if the Capabilities of the SpatialView supports Updating: TRUE or FALSE.
Definition: gg_structs.h:694
int IsReadOnly
Read-Only layer: TRUE or FALSE.
Definition: gg_structs.h:688
Layer Extent infos.
Definition: gg_structs.h:662
double MinX
Extent: min X.
Definition: gg_structs.h:666
double MaxX
Extent: max X.
Definition: gg_structs.h:670
int Count
row count (aka feature count)
Definition: gg_structs.h:664
double MaxY
Extent: max Y.
Definition: gg_structs.h:672
double MinY
Extent: min Y.
Definition: gg_structs.h:668
Container for OGC LINESTRING Geometry.
Definition: gg_structs.h:129
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:144
double MaxY
MBR: max X.
Definition: gg_structs.h:142
int Points
number of points [aka vertices]
Definition: gg_structs.h:132
double MinY
MBR: min Y.
Definition: gg_structs.h:138
struct gaiaLinestringStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:146
double MinX
MBR: min X.
Definition: gg_structs.h:136
double * Coords
COORDs mem-array.
Definition: gg_structs.h:134
double MaxX
MBR: max X.
Definition: gg_structs.h:140
A Memory based File.
Definition: gg_structs.h:367
Container for dynamically growing output buffer.
Definition: gg_structs.h:497
char * Buffer
current buffer
Definition: gg_structs.h:500
int BufferSize
current buffer size (in bytes)
Definition: gg_structs.h:504
int WriteOffset
current write offset
Definition: gg_structs.h:502
int Error
validity flag
Definition: gg_structs.h:506
Container for OGC POINT Geometry.
Definition: gg_structs.h:79
double X
X coordinate.
Definition: gg_structs.h:82
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:90
struct gaiaPointStruct * Next
pointer to next item [double linked list]
Definition: gg_structs.h:92
struct gaiaPointStruct * Prev
pointer to previous item [double linked list]
Definition: gg_structs.h:94
double Z
Z coordinate: only for XYZ and XYZM dims.
Definition: gg_structs.h:86
double M
M measure: only for XYM and XYZM dims.
Definition: gg_structs.h:88
double Y
Y coordinate.
Definition: gg_structs.h:84
Container for OGC POLYGON Geometry.
Definition: gg_structs.h:193
double MinX
MBR: min X.
Definition: gg_structs.h:204
struct gaiaPolygonStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:214
gaiaRingPtr Interiors
array of interior rings
Definition: gg_structs.h:200
gaiaRingPtr Exterior
the exterior ring (mandatory)
Definition: gg_structs.h:196
double MinY
MBR: min Y.
Definition: gg_structs.h:206
int NextInterior
index of first unused interior ring
Definition: gg_structs.h:202
double MaxX
MBR: max X.
Definition: gg_structs.h:208
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:212
int NumInteriors
number of interior rings (may be, none)
Definition: gg_structs.h:198
double MaxY
MBR: max Y.
Definition: gg_structs.h:210
Container similar to LINESTRING [internally used].
Definition: gg_structs.h:279
struct gaiaPreRingStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:286
int AlreadyUsed
already used/visited item
Definition: gg_structs.h:284
gaiaLinestringPtr Line
pointer to LINESTRING
Definition: gg_structs.h:282
BBOX corresponding to PROJ.6 AREA.
Definition: gg_structs.h:862
Container for OGC RING Geometry.
Definition: gg_structs.h:159
double MaxY
MBR: max Y.
Definition: gg_structs.h:174
double MinX
MBR: min X.
Definition: gg_structs.h:168
struct gaiaRingStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:178
int Clockwise
clockwise / counterclockwise
Definition: gg_structs.h:166
int Points
number of points [aka vertices]
Definition: gg_structs.h:162
struct gaiaPolygonStruct * Link
pointer to belonging Polygon
Definition: gg_structs.h:180
double MaxX
MBR: max X.
Definition: gg_structs.h:172
double MinY
MBR: min Y.
Definition: gg_structs.h:170
double * Coords
COORDs mem-array.
Definition: gg_structs.h:164
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:176
Container for SHP file handling.
Definition: gg_structs.h:425
gaiaMemFilePtr memShx
Memory based SHX file.
Definition: gg_structs.h:442
FILE * flShx
FILE handle to SHX file.
Definition: gg_structs.h:436
int Valid
validity flag: 1 = ready to be processed
Definition: gg_structs.h:430
double MaxX
Total Extent: max X.
Definition: gg_structs.h:474
FILE * flShp
FILE handle to SHP file.
Definition: gg_structs.h:438
gaiaMemFilePtr memShp
Memory based SHP file.
Definition: gg_structs.h:444
int ShpSize
SHP current file size.
Definition: gg_structs.h:466
gaiaMemFilePtr memDbf
Memory based DBF file.
Definition: gg_structs.h:446
unsigned char * BufShp
SHP I/O buffer.
Definition: gg_structs.h:462
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
Total Extent: max Y.
Definition: gg_structs.h:476
double MinX
Total Extent: min X.
Definition: gg_structs.h:470
char * Path
SHP 'abstract' path (no suffixes)
Definition: gg_structs.h:434
int endian_arch
SHP endian arch.
Definition: gg_structs.h:428
void * IconvObj
handle to ICONV converter object
Definition: gg_structs.h:478
int EffectiveType
SHP actual OGC Geometry type.
Definition: gg_structs.h:482
FILE * flDbf
FILE handle to DBF file.
Definition: gg_structs.h:440
int ShpBfsz
SHP current buffer size (in bytes)
Definition: gg_structs.h:464
int DbfRecno
DBF current Record Number.
Definition: gg_structs.h:460
gaiaDbfListPtr Dbf
list of DBF fields
Definition: gg_structs.h:450
int DbfReclen
DBF record length (in bytes)
Definition: gg_structs.h:456
int DbfSize
DBF current file size (in bytes)
Definition: gg_structs.h:458
int Shape
the SHP shape code
Definition: gg_structs.h:448
unsigned char * BufDbf
DBF I/O buffer.
Definition: gg_structs.h:452
int DbfHdsz
DBF header size (in bytes)
Definition: gg_structs.h:454
int ReadOnly
read or write mode
Definition: gg_structs.h:432
double MinY
Total Extent: min Y.
Definition: gg_structs.h:472
int ShxSize
SHX current file size.
Definition: gg_structs.h:468
char * LastError
last error message (may be NULL)
Definition: gg_structs.h:480
Container for variant (multi-type) value.
Definition: gg_structs.h:299
short Type
data type: one of GAIA_NULL_VALUE, GAIA_INT_VALUE, GAIA_DOUBLE_VALUE, GAIA_TEXT_VALUE
Definition: gg_structs.h:302
sqlite3_int64 IntValue
INT type value.
Definition: gg_structs.h:306
double DblValue
DOUBLE type value.
Definition: gg_structs.h:308
char * TxtValue
TEXT type value.
Definition: gg_structs.h:304
Vector Layer item.
Definition: gg_structs.h:798
int Srid
SRID value.
Definition: gg_structs.h:807
int LayerType
one of GAIA_VECTOR_UNKNOWN, GAIA_VECTOR_TABLE, GAIA_VECTOR_VIEW, GAIA_VECTOR_VIRTUAL
Definition: gg_structs.h:801
gaiaLayerExtentPtr ExtentInfos
pointer to Extent infos (may be NULL)
Definition: gg_structs.h:820
int GeometryType
one of GAIA_VECTOR_UNKNOWN, GAIA_VECTOR_POINT, GAIA_VECTOR_LINESTRING, GAIA_VECTOR_POLYGON,...
Definition: gg_structs.h:812
struct gaiaVectorLayerItem * Next
pointer to next item (linked list)
Definition: gg_structs.h:828
char * GeometryName
SQL name of the corresponding Geometry column.
Definition: gg_structs.h:805
gaiaLayerAttributeFieldPtr Last
pointer to last Field/Attribute (linked list)
Definition: gg_structs.h:826
int SpatialIndex
one of GAIA_VECTOR_UNKNOWN, GAIA_SPATIAL_INDEX_NONE, GAIA_SPATIAL_INDEX_RTREE, GAIA_SPATIAL_INDEX_MBR...
Definition: gg_structs.h:818
gaiaLayerAttributeFieldPtr First
pointer to first Field/Attribute (linked list)
Definition: gg_structs.h:824
gaiaLayerAuthPtr AuthInfos
pointer to Auth infos (may be NULL)
Definition: gg_structs.h:822
char * TableName
SQL name of the corresponding table.
Definition: gg_structs.h:803
int Dimensions
one of GAIA_VECTOR_UNKNOWN, GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:814
Container for Vector Layers List.
Definition: gg_structs.h:842
gaiaVectorLayerPtr Last
pointer to last vector layer (linked list)
Definition: gg_structs.h:846
gaiaVectorLayerPtr Current
pointer to currently set vector layer
Definition: gg_structs.h:848
gaiaVectorLayerPtr First
pointer to first vector layer (linked list)
Definition: gg_structs.h:844
Container for Virtual Text column (field) header.
Definition: gg_structs.h:590
char * name
column name
Definition: gg_structs.h:593
int type
data type: one of GAIA_NULL_VALUE, GAIA_INT_VALUE, GAIA_DOUBLE_VALUE, GAIA_TEXT_VALUE
Definition: gg_structs.h:595
Container for Virtual Text record (line)
Definition: gg_structs.h:535
int field_offsets[VRTTXT_FIELDS_MAX]
array of field offsets (where each field starts)
Definition: gg_structs.h:542
int num_fields
number of field into the record
Definition: gg_structs.h:544
int error
validity flag
Definition: gg_structs.h:546
int len
line length (in bytes)
Definition: gg_structs.h:540
gaia_off_t offset
current offset (parsing)
Definition: gg_structs.h:538
Container for Virtual Text file handling.
Definition: gg_structs.h:602
int max_fields
max number of columns (fields)
Definition: gg_structs.h:631
int current_buf_sz
current buffer size
Definition: gg_structs.h:633
int current_buf_off
current buffer offset [parsing]
Definition: gg_structs.h:635
char field_separator
field separator character
Definition: gg_structs.h:611
struct vrttxt_column_header columns[VRTTXT_FIELDS_MAX]
array of columns (fields)
Definition: gg_structs.h:605
int line_no
current Line Number
Definition: gg_structs.h:629
char text_separator
text separator character (quote)
Definition: gg_structs.h:613
void * toUtf8
handle to ICONV converter object
Definition: gg_structs.h:609
int num_rows
number of records
Definition: gg_structs.h:627
char * field_buffer
current field buffer
Definition: gg_structs.h:639
int error
validity flag
Definition: gg_structs.h:619
int field_lens[VRTTXT_FIELDS_MAX]
array of field lengths [current record]
Definition: gg_structs.h:643
char * line_buffer
I/O buffer.
Definition: gg_structs.h:637
struct vrttxt_row ** rows
array of pointers to individual records [lines]
Definition: gg_structs.h:625
int current_line_ready
current record [line] ready for parsing
Definition: gg_structs.h:647
int field_offsets[VRTTXT_FIELDS_MAX]
array of field offsets [current record]
Definition: gg_structs.h:641
struct vrttxt_row_block * first
pointer to first block of records [linked list]
Definition: gg_structs.h:621
struct vrttxt_row_block * last
pointer to last block of records [linked list]
Definition: gg_structs.h:623
int first_line_titles
TRUE if the first line contains column names.
Definition: gg_structs.h:617
int max_current_field
max field [current record]
Definition: gg_structs.h:645
FILE * text_file
FILE handle.
Definition: gg_structs.h:607
char decimal_separator
decimal separator
Definition: gg_structs.h:615
Container for Virtual Text block of records.
Definition: gg_structs.h:569
struct vrttxt_row rows[VRTTXT_BLOCK_MAX]
array of records [lines]
Definition: gg_structs.h:575
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
int max_line_no
max Line Number
Definition: gg_structs.h:581
int min_line_no
min Line Number
Definition: gg_structs.h:579
Container for Virtual Text record (line) offsets.
Definition: gg_structs.h:553
int line_no
Line Number.
Definition: gg_structs.h:556
int len
record (line) length (in bytes)
Definition: gg_structs.h:560
int num_fields
number of fields into this record
Definition: gg_structs.h:562
gaia_off_t offset
start offset
Definition: gg_structs.h:558