SpatiaLite  4.3.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 4.3, 2015 June 29
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-2015
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 
60 #ifdef __cplusplus
61 extern "C"
62 {
63 #endif
64 
68  typedef struct gaiaPointStruct
69  {
70 /* an OpenGis POINT */
72  double X; /* X,Y coordinates */
74  double Y;
76  double Z; /* Z coordinate */
78  double M; /* M measure */
80  int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
82  struct gaiaPointStruct *Next; /* for double-linked list */
84  struct gaiaPointStruct *Prev; /* for double-linked list */
85  } gaiaPoint;
92 
96  typedef struct gaiaDynamicLineStruct
97  {
98 /* a generic DYNAMIC LINE object */
100  int Error;
102  int Srid;
104  gaiaPointPtr First; /* Points linked list - first */
106  gaiaPointPtr Last; /* Points linked list - last */
107  } gaiaDynamicLine;
114 
118  typedef struct gaiaLinestringStruct
119  {
120 /* an OpenGis LINESTRING */
122  int Points; /* number of vertices */
124  double *Coords; /* X,Y [vertices] array */
126  double MinX; /* MBR - BBOX */
128  double MinY; /* MBR - BBOX */
130  double MaxX; /* MBR - BBOX */
132  double MaxY; /* MBR - BBOX */
134  int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
136  struct gaiaLinestringStruct *Next; /* for linked list */
137  } gaiaLinestring;
144 
148  typedef struct gaiaRingStruct
149  {
150 /* a GIS ring - OpenGis LINESTRING, closed */
152  int Points; /* number of vertices */
154  double *Coords; /* X,Y [vertices] array */
156  int Clockwise; /* clockwise / counterclockwise */
158  double MinX; /* MBR - BBOX */
160  double MinY; /* MBR - BBOX */
162  double MaxX; /* MBR - BBOX */
164  double MaxY; /* MBR - BBOX */
166  int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
168  struct gaiaRingStruct *Next; /* for linked list */
170  struct gaiaPolygonStruct *Link; /* polygon reference */
171  } gaiaRing;
178 
182  typedef struct gaiaPolygonStruct
183  {
184 /* an OpenGis POLYGON */
186  gaiaRingPtr Exterior; /* exterior ring */
188  int NumInteriors; /* number of interior rings */
190  gaiaRingPtr Interiors; /* interior rings array */
192  int NextInterior; /* first free interior ring */
194  double MinX; /* MBR - BBOX */
196  double MinY; /* MBR - BBOX */
198  double MaxX; /* MBR - BBOX */
200  double MaxY; /* MBR - BBOX */
202  int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
204  struct gaiaPolygonStruct *Next; /* for linked list */
205  } gaiaPolygon;
212 
216  typedef struct gaiaGeomCollStruct
217  {
218 /* OpenGis GEOMETRYCOLLECTION */
220  int Srid; /* the SRID value for this GEOMETRY */
222  char endian_arch; /* littleEndian - bigEndian arch for target CPU */
224  char endian; /* littleEndian - bigEndian */
226  const unsigned char *blob; /* WKB encoded buffer */
228  unsigned long size; /* buffer size */
230  unsigned long offset; /* current offset [for parsing] */
232  gaiaPointPtr FirstPoint; /* Points linked list - first */
234  gaiaPointPtr LastPoint; /* Points linked list - last */
236  gaiaLinestringPtr FirstLinestring; /* Linestrings linked list - first */
238  gaiaLinestringPtr LastLinestring; /* Linestrings linked list - last */
240  gaiaPolygonPtr FirstPolygon; /* Polygons linked list - first */
242  gaiaPolygonPtr LastPolygon; /* Polygons linked list - last */
244  double MinX; /* MBR - BBOX */
246  double MinY; /* MBR - BBOX */
248  double MaxX; /* MBR - BBOX */
250  double MaxY; /* MBR - BBOX */
252  int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
254  int DeclaredType; /* the declared TYPE for this Geometry */
256  struct gaiaGeomCollStruct *Next; /* Vanuatu - used for linked list */
257  } gaiaGeomColl;
264 
268  typedef struct gaiaPreRingStruct
269  {
270 /* a LINESTRING used to build rings */
272  gaiaLinestringPtr Line; /* a LINESTRING pointer */
274  int AlreadyUsed; /* a switch to mark an already used line element */
276  struct gaiaPreRingStruct *Next; /* for linked list */
277  } gaiaPreRing;
284 
288  typedef struct gaiaValueStruct
289  {
290 /* a DBF field multitype value */
292  short Type; /* the type */
294  char *TxtValue; /* the text value */
296  sqlite3_int64 IntValue; /* the integer value */
298  double DblValue; /* the double value */
299  } gaiaValue;
304 
308  typedef struct gaiaDbfFieldStruct
309  {
310 /* a DBF field definition - shapefile attribute */
312  char *Name; /* field name */
314  unsigned char Type; /* field type */
316  int Offset; /* buffer offset [this field begins at *buffer+offset* and extends for *length* bytes */
318  unsigned char Length; /* field total length [in bytes] */
320  unsigned char Decimals; /* decimal positions */
322  gaiaValuePtr Value; /* the current multitype value for this attribute */
324  struct gaiaDbfFieldStruct *Next; /* pointer to next element in linked list */
325  } gaiaDbfField;
330 
334  typedef struct gaiaDbfListStruct
335  {
336 /* a linked list to contain the DBF fields definitions - shapefile attributes */
338  int RowId; /* the current RowId */
340  gaiaGeomCollPtr Geometry; /* geometry for current entity */
342  gaiaDbfFieldPtr First; /* pointer to first element in linked list */
344  gaiaDbfFieldPtr Last; /* pointer to last element in linker list */
345  } gaiaDbfList;
352 
356  typedef struct gaiaDbfStruct
357  {
358 /* DBF TYPE */
362  int Valid; /* 1 = ready to process */
364  char *Path; /* the DBF path */
366  FILE *flDbf; /* the DBF file handle */
368  gaiaDbfListPtr Dbf; /* the DBF attributes list */
370  unsigned char *BufDbf; /* the DBF I/O buffer */
372  int DbfHdsz; /* the DBF header length */
374  int DbfReclen; /* the DBF record length */
376  int DbfSize; /* current DBF size */
378  int DbfRecno; /* current DBF record number */
380  void *IconvObj; /* opaque reference to ICONV converter */
382  char *LastError; /* last error message */
383  } gaiaDbf;
389  typedef gaiaDbf *gaiaDbfPtr;
390 
394  typedef struct gaiaShapefileStruct
395  {
396 /* SHAPEFILE TYPE */
400  int Valid; /* 1 = ready to process */
402  int ReadOnly; /* read or write mode */
404  char *Path; /* the shapefile abstract path [no suffixes] */
406  FILE *flShx; /* the SHX file handle */
408  FILE *flShp; /* the SHP file handle */
410  FILE *flDbf; /* the DBF file handle */
412  int Shape; /* the SHAPE code for the whole shapefile */
414  gaiaDbfListPtr Dbf; /* the DBF attributes list */
416  unsigned char *BufDbf; /* the DBF I/O buffer */
418  int DbfHdsz; /* the DBF header length */
420  int DbfReclen; /* the DBF record length */
422  int DbfSize; /* current DBF size */
424  int DbfRecno; /* current DBF record number */
426  unsigned char *BufShp; /* the SHP I/O buffer */
428  int ShpBfsz; /* the SHP buffer current size */
430  int ShpSize; /* current SHP size */
432  int ShxSize; /* current SHX size */
434  double MinX; /* the MBR/BBOX for the whole shapefile */
436  double MinY;
438  double MaxX;
440  double MaxY;
442  void *IconvObj; /* opaque reference to ICONV converter */
444  char *LastError; /* last error message */
446  int EffectiveType; /* the effective Geometry-type, as determined by gaiaShpAnalyze() */
448  int EffectiveDims; /* the effective Dimensions [XY, XYZ, XYM, XYZM], as determined by gaiaShpAnalyze() */
449  } gaiaShapefile;
456 
460  typedef struct gaiaOutBufferStruct
461  {
462 /* a struct handling a dynamically growing output buffer */
464  char *Buffer;
470  int Error;
471  } gaiaOutBuffer;
478 
479 #ifndef OMIT_ICONV /* ICONV enabled: supporting text reader */
480 
482 #define VRTTXT_FIELDS_MAX 65535
483 
484 #define VRTTXT_BLOCK_MAX 65535
485 
487 #define VRTTXT_TEXT 1
488 
489 #define VRTTXT_INTEGER 2
490 
491 #define VRTTXT_DOUBLE 3
492 
493 #define VRTTXT_NULL 4
494 
498  struct vrttxt_line
499  {
500 /* a struct representing a full LINE (aka Record) */
502  off_t offset;
504  int len;
510  int error;
511  };
512 
516  struct vrttxt_row
517  {
518 /* a struct storing Row offsets */
520  int line_no;
522  off_t offset;
524  int len;
527  };
528 
533  {
534 /*
535 / for efficiency sake, individual Row offsets
536 / are grouped in reasonably sized blocks
537 */
541  int num_rows;
548  };
549 
554  {
555 /* a struct representing a Column (aka Field) header */
557  char *name;
559  int type;
560  };
561 
565  typedef struct vrttxt_reader
566  {
567 /* the main TXT-Reader struct */
571  FILE *text_file;
573  void *toUtf8; /* the UTF-8 ICONV converter */
583  int error;
589  struct vrttxt_row **rows;
591  int num_rows;
593  int line_no;
601  char *line_buffer;
612  } gaiaTextReader;
619 
620 #endif /* end ICONV (text reader) */
621 
625  typedef struct gaiaLayerExtentInfos
626  {
628  int Count;
630  double MinX; /* MBR - BBOX */
632  double MinY; /* MBR - BBOX */
634  double MaxX; /* MBR - BBOX */
636  double MaxY; /* MBR - BBOX */
637  } gaiaLayerExtent;
638 
645 
649  typedef struct gaiaLayerAuthInfos
650  {
654  int IsHidden;
655  } gaiaLayerAuth;
656 
663 
668  {
670  int MaxSize;
672 
679 
684  {
686  sqlite3_int64 MinValue;
688  sqlite3_int64 MaxValue;
690 
697 
702  {
704  double MinValue;
706  double MaxValue;
708 
715 
720  {
722  int Ordinal;
736  gaiaAttributeFieldMaxSizePtr MaxSize;
738  gaiaAttributeFieldIntRangePtr IntRange;
740  gaiaAttributeFieldDoubleRangePtr DoubleRange;
744 
751 
755  typedef struct gaiaVectorLayerItem
756  {
761  char *TableName;
765  int Srid;
778  gaiaLayerExtentPtr ExtentInfos;
780  gaiaLayerAuthPtr AuthInfos;
782  gaiaLayerAttributeFieldPtr First;
784  gaiaLayerAttributeFieldPtr Last;
787  } gaiaVectorLayer;
788 
795 
799  typedef struct gaiaVectorLayersListStr
800  {
802  gaiaVectorLayerPtr First;
804  gaiaVectorLayerPtr Last;
806  gaiaVectorLayerPtr Current;
808 
815 
816 #ifdef __cplusplus
817 }
818 #endif
819 
820 #endif /* _GG_STRUCTS_H */
gaiaRingPtr Interiors
array of interior rings
Definition: gg_structs.h:190
int IntegerValuesCount
total count of INTEGER values
Definition: gg_structs.h:728
int current_buf_sz
current buffer size
Definition: gg_structs.h:597
unsigned char Length
total DBF buffer field length (in bytes)
Definition: gg_structs.h:318
unsigned char Decimals
precision (decimal digits)
Definition: gg_structs.h:320
gaiaVectorLayerPtr Last
pointer to last vector layer (linked list)
Definition: gg_structs.h:804
int WriteOffset
current write offset
Definition: gg_structs.h:466
int NextInterior
index of first unused interior ring
Definition: gg_structs.h:192
double MinY
Total Extent: min Y.
Definition: gg_structs.h:436
double MinX
Total Extent: min X.
Definition: gg_structs.h:434
double MaxX
MBR: max X.
Definition: gg_structs.h:162
int len
line length (in bytes)
Definition: gg_structs.h:504
gaiaDynamicLine * gaiaDynamicLinePtr
Typedef for dynamically growing line/ring structure.
Definition: gg_structs.h:113
double Y
Y coordinate.
Definition: gg_structs.h:74
LayerAttributeField infos.
Definition: gg_structs.h:719
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:553
int type
data type: one of GAIA_NULL_VALUE, GAIA_INT_VALUE, GAIA_DOUBLE_VALUE, GAIA_TEXT_VALUE ...
Definition: gg_structs.h:559
int Valid
validity flag: 1 = ready to be processed
Definition: gg_structs.h:362
FILE * text_file
FILE handle.
Definition: gg_structs.h:571
Container similar to LINESTRING [internally used].
Definition: gg_structs.h:268
struct vrttxt_row_block * last
pointer to last block of records [linked list]
Definition: gg_structs.h:587
int DeclaredType
any valid Geometry Class type
Definition: gg_structs.h:254
double * Coords
COORDs mem-array.
Definition: gg_structs.h:124
gaiaPointPtr Last
pointer to last POINT [double linked list]
Definition: gg_structs.h:106
gaiaDbfList * gaiaDbfListPtr
Typedef for a list of DBF fields.
Definition: gg_structs.h:351
double M
M measure: only for XYM and XYZM dims.
Definition: gg_structs.h:78
Container for DBF field.
Definition: gg_structs.h:308
int ShxSize
SHX current file size.
Definition: gg_structs.h:432
int first_line_titles
TRUE if the first line contains column names.
Definition: gg_structs.h:581
gaiaLayerAttributeFieldPtr Last
pointer to last Field/Attribute (linked list)
Definition: gg_structs.h:784
FILE * flShp
FILE handle to SHP file.
Definition: gg_structs.h:408
int EffectiveDims
SHP actual dims: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM.
Definition: gg_structs.h:448
double MaxY
MBR: max Y.
Definition: gg_structs.h:200
double MinX
MBR: min X.
Definition: gg_structs.h:158
struct gaiaLinestringStruct gaiaLinestring
Container for OGC LINESTRING Geometry.
char * GeometryName
SQL name of the corresponding Geometry column.
Definition: gg_structs.h:763
double MaxX
Total Extent: max X.
Definition: gg_structs.h:438
struct gaiaLayerAttributeFieldInfos gaiaLayerAttributeField
LayerAttributeField infos.
double MinX
MBR: min X.
Definition: gg_structs.h:126
int ReadOnly
read or write mode
Definition: gg_structs.h:402
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:166
int SpatialIndex
one of GAIA_VECTOR_UNKNOWN, GAIA_SPATIAL_INDEX_NONE, GAIA_SPATIAL_INDEX_RTREE, GAIA_SPATIAL_INDEX_MBR...
Definition: gg_structs.h:776
gaiaGeomCollPtr Geometry
current Geometry
Definition: gg_structs.h:340
int TextValuesCount
total count of TEXT values
Definition: gg_structs.h:732
struct gaiaPreRingStruct gaiaPreRing
Container similar to LINESTRING [internally used].
const unsigned char * blob
BLOB-Geometry buffer.
Definition: gg_structs.h:226
double MaxY
Total Extent: max Y.
Definition: gg_structs.h:440
struct gaiaVectorLayerItem * Next
pointer to next item (linked list)
Definition: gg_structs.h:786
int DbfHdsz
header size (in bytes)
Definition: gg_structs.h:372
off_t offset
start offset
Definition: gg_structs.h:522
double MinX
MBR: min X.
Definition: gg_structs.h:244
int DbfSize
DBF current file size (in bytes)
Definition: gg_structs.h:422
gaiaLayerExtent * gaiaLayerExtentPtr
Typedef for Layer Extent infos.
Definition: gg_structs.h:644
gaiaOutBuffer * gaiaOutBufferPtr
Typedef for dynamically growing output buffer structure.
Definition: gg_structs.h:477
Container for OGC POINT Geometry.
Definition: gg_structs.h:68
int Valid
validity flag: 1 = ready to be processed
Definition: gg_structs.h:400
Vector Layer item.
Definition: gg_structs.h:755
gaiaAttributeFieldDoubleRangePtr DoubleRange
pointer to range of Double values infos (may be NULL)
Definition: gg_structs.h:740
Container for OGC POLYGON Geometry.
Definition: gg_structs.h:182
gaiaDbfFieldPtr Last
pointer to last DBF field [linked list]
Definition: gg_structs.h:344
struct gaiaDbfFieldStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:324
int ShpSize
SHP current file size.
Definition: gg_structs.h:430
int Shape
the SHP shape code
Definition: gg_structs.h:412
int MaxSize
MaxSize / MaxLength.
Definition: gg_structs.h:670
short Type
data type: one of GAIA_NULL_VALUE, GAIA_INT_VALUE, GAIA_DOUBLE_VALUE, GAIA_TEXT_VALUE ...
Definition: gg_structs.h:292
int Count
row count (aka feature count)
Definition: gg_structs.h:628
int error
validity flag
Definition: gg_structs.h:583
char * TxtValue
TEXT type value.
Definition: gg_structs.h:294
gaiaAttributeFieldDoubleRange * gaiaAttributeFieldDoubleRangePtr
Typedef for Attribute/Field Double range infos.
Definition: gg_structs.h:714
double MinY
MBR: min Y.
Definition: gg_structs.h:246
gaiaPoint * gaiaPointPtr
Typedef for OGC POINT structure.
Definition: gg_structs.h:91
int DbfRecno
current Record Number
Definition: gg_structs.h:378
double MinY
MBR: min Y.
Definition: gg_structs.h:160
FILE * flShx
FILE handle to SHX file.
Definition: gg_structs.h:406
int Srid
the SRID
Definition: gg_structs.h:102
Layer Extent infos.
Definition: gg_structs.h:625
struct gaiaDbfListStruct gaiaDbfList
Container for a list of DBF fields.
gaiaDbfFieldPtr First
pointer to first DBF field [linked list]
Definition: gg_structs.h:342
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:772
double MaxValue
Maximum value.
Definition: gg_structs.h:706
gaiaValue * gaiaValuePtr
Typedef for variant (multi-type) value structure.
Definition: gg_structs.h:303
int DoubleValuesCount
total count of DOUBLE values
Definition: gg_structs.h:730
int Points
number of points [aka vertices]
Definition: gg_structs.h:152
struct gaiaVectorLayersListStr gaiaVectorLayersList
Container for Vector Layers List.
double X
X coordinate.
Definition: gg_structs.h:72
int Error
validity flag
Definition: gg_structs.h:470
int BufferSize
current buffer size (in bytes)
Definition: gg_structs.h:468
gaiaLinestring * gaiaLinestringPtr
Typedef for OGC LINESTRING structure.
Definition: gg_structs.h:143
int RowId
current RowID
Definition: gg_structs.h:338
gaiaLinestringPtr LastLinestring
pointer to last LINESTRING [linked list]; may be NULL
Definition: gg_structs.h:238
unsigned char Type
DBF data type.
Definition: gg_structs.h:314
struct gaiaShapefileStruct gaiaShapefile
Container for SHP file handling.
gaiaDbfField * gaiaDbfFieldPtr
Typedef for DBF field structure.
Definition: gg_structs.h:329
Container for Virtual Text block of records.
Definition: gg_structs.h:532
Attribute/Field Double range infos.
Definition: gg_structs.h:701
int Ordinal
ordinal position
Definition: gg_structs.h:722
int num_fields
number of fields into this record
Definition: gg_structs.h:526
struct gaiaRingStruct gaiaRing
Container for OGC RING Geometry.
Container for a list of DBF fields.
Definition: gg_structs.h:334
char decimal_separator
decimal separator
Definition: gg_structs.h:579
gaiaPreRing * gaiaPreRingPtr
Typedef for gaiaPreRing structure.
Definition: gg_structs.h:283
double Z
Z coordinate: only for XYZ and XYZM dims.
Definition: gg_structs.h:76
int IsReadOnly
Read-Only layer: TRUE or FALSE.
Definition: gg_structs.h:652
gaiaVectorLayer * gaiaVectorLayerPtr
Typedef for Vector Layer item.
Definition: gg_structs.h:794
struct gaiaAttributeFieldDoubleRangeInfos gaiaAttributeFieldDoubleRange
Attribute/Field Double range infos.
int current_buf_off
current buffer offset [parsing]
Definition: gg_structs.h:599
char endian
BLOB Geometry endian arch.
Definition: gg_structs.h:224
gaiaLayerAttributeField * gaiaLayerAttributeFieldPtr
Typedef for Layer AttributeField infos.
Definition: gg_structs.h:750
double DblValue
DOUBLE type value.
Definition: gg_structs.h:298
Container for OGC RING Geometry.
Definition: gg_structs.h:148
int max_line_no
max Line Number
Definition: gg_structs.h:545
Container for Virtual Text record (line)
Definition: gg_structs.h:498
gaiaGeomColl * gaiaGeomCollPtr
Typedef for OGC GEOMETRYCOLLECTION structure.
Definition: gg_structs.h:263
gaiaLayerAuth * gaiaLayerAuthPtr
Typedef for Layer Auth infos.
Definition: gg_structs.h:662
sqlite3_int64 IntValue
INT type value.
Definition: gg_structs.h:296
struct gaiaPointStruct gaiaPoint
Container for OGC POINT Geometry.
int Clockwise
clockwise / counterclockwise
Definition: gg_structs.h:156
struct gaiaPolygonStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:204
int endian_arch
SHP endian arch.
Definition: gg_structs.h:398
double MinY
MBR: min Y.
Definition: gg_structs.h:128
double MaxX
MBR: max X.
Definition: gg_structs.h:248
struct gaiaLinestringStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:136
int DbfReclen
record length (in bytes)
Definition: gg_structs.h:374
gaiaAttributeFieldIntRange * gaiaAttributeFieldIntRangePtr
Typedef for Attribute/Field Integer range infos.
Definition: gg_structs.h:696
char field_separator
field separator character
Definition: gg_structs.h:575
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:134
off_t offset
current offset (parsing)
Definition: gg_structs.h:502
int Srid
the SRID
Definition: gg_structs.h:220
unsigned long size
BLOB-Geometry buffer size (in bytes)
Definition: gg_structs.h:228
int field_offsets[VRTTXT_FIELDS_MAX]
array of field offsets [current record]
Definition: gg_structs.h:605
char endian_arch
CPU endian arch.
Definition: gg_structs.h:222
gaiaLinestringPtr FirstLinestring
pointer to first LINESTRING [linked list]; may be NULL
Definition: gg_structs.h:236
#define VRTTXT_FIELDS_MAX
Virtual Text driver: MAX number of fields.
Definition: gg_structs.h:482
int len
record (line) length (in bytes)
Definition: gg_structs.h:524
void * toUtf8
handle to ICONV converter object
Definition: gg_structs.h:573
gaiaLayerAttributeFieldPtr First
pointer to first Field/Attribute (linked list)
Definition: gg_structs.h:782
gaiaLinestringPtr Line
pointer to LINESTRING
Definition: gg_structs.h:272
gaiaVectorLayerPtr First
pointer to first vector layer (linked list)
Definition: gg_structs.h:802
int DbfReclen
DBF record length (in bytes)
Definition: gg_structs.h:420
struct vrttxt_row_block * first
pointer to first block of records [linked list]
Definition: gg_structs.h:585
double MaxX
MBR: max X.
Definition: gg_structs.h:130
gaiaDbfListPtr Dbf
list of DBF fields
Definition: gg_structs.h:368
Container for dynamically growing line/ring.
Definition: gg_structs.h:96
Container for OGC LINESTRING Geometry.
Definition: gg_structs.h:118
struct gaiaPointStruct * Next
pointer to next item [double linked list]
Definition: gg_structs.h:82
gaiaPointPtr LastPoint
pointer to last POINT [linked list]; may be NULL
Definition: gg_structs.h:234
char * Path
DBF file pathname.
Definition: gg_structs.h:364
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:80
double MaxX
Extent: max X.
Definition: gg_structs.h:634
int line_no
Line Number.
Definition: gg_structs.h:520
int DbfSize
current file size
Definition: gg_structs.h:376
Container for dynamically growing output buffer.
Definition: gg_structs.h:460
void * IconvObj
handle to ICONV converter object
Definition: gg_structs.h:380
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:382
Attribute/Field Integer range infos.
Definition: gg_structs.h:683
unsigned char * BufDbf
I/O buffer.
Definition: gg_structs.h:370
unsigned char * BufShp
SHP I/O buffer.
Definition: gg_structs.h:426
char * Path
SHP 'abstract' path (no suffixes)
Definition: gg_structs.h:404
Container for Virtual Text file handling.
Definition: gg_structs.h:565
gaiaAttributeFieldMaxSizePtr MaxSize
pointer to MaxSize/Length infos (may be NULL)
Definition: gg_structs.h:736
int max_current_field
max field [current record]
Definition: gg_structs.h:609
gaiaAttributeFieldIntRangePtr IntRange
pointer to range of Integer values infos (may be NULL)
Definition: gg_structs.h:738
char * Name
field name
Definition: gg_structs.h:312
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:607
Container for Virtual Text record (line) offsets.
Definition: gg_structs.h:516
gaiaRingPtr Exterior
the exterior ring (mandatory)
Definition: gg_structs.h:186
double * Coords
COORDs mem-array.
Definition: gg_structs.h:154
struct gaiaPolygonStruct gaiaPolygon
Container for OGC POLYGON Geometry.
char * Buffer
current buffer
Definition: gg_structs.h:464
int min_line_no
min Line Number
Definition: gg_structs.h:543
gaiaVectorLayerPtr Current
pointer to currently set vector layer
Definition: gg_structs.h:806
int error
validity flag
Definition: gg_structs.h:510
char * field_buffer
current field buffer
Definition: gg_structs.h:603
char * line_buffer
I/O buffer.
Definition: gg_structs.h:601
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:252
int ShpBfsz
SHP current buffer size (in bytes)
Definition: gg_structs.h:428
gaiaPolygonPtr FirstPolygon
pointer to first POLYGON [linked list]; may be NULL
Definition: gg_structs.h:240
char * LastError
last error message (may be NULL)
Definition: gg_structs.h:444
unsigned long offset
current offset [BLOB parsing]
Definition: gg_structs.h:230
Container for SHP file handling.
Definition: gg_structs.h:394
char * TableName
SQL name of the corresponding table.
Definition: gg_structs.h:761
int GeometryType
one of GAIA_VECTOR_UNKNOWN, GAIA_VECTOR_POINT, GAIA_VECTOR_LINESTRING, GAIA_VECTOR_POLYGON, GAIA_VECTOR_MULTIPOINT, GAIA_VECTOR_MULTILINESTRING, GAIA_VECTOR_MULTIPOLYGON, GAIA_VECTOR_GEOMETRYCOLLECTION, GAIA_VECTOR_GEOMETRY
Definition: gg_structs.h:770
int AlreadyUsed
already used/visited item
Definition: gg_structs.h:274
int num_rows
number of records
Definition: gg_structs.h:591
sqlite3_int64 MaxValue
Maximum value.
Definition: gg_structs.h:688
int num_fields
number of field into the record
Definition: gg_structs.h:508
Container for Vector Layers List.
Definition: gg_structs.h:799
Container for DBF file handling.
Definition: gg_structs.h:356
double MinX
MBR: min X.
Definition: gg_structs.h:194
int current_line_ready
current record [line] ready for parsing
Definition: gg_structs.h:611
int line_no
current Line Number
Definition: gg_structs.h:593
gaiaVectorLayersList * gaiaVectorLayersListPtr
Typedef for Vector Layers List.
Definition: gg_structs.h:814
struct gaiaPreRingStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:276
int max_fields
max number of columns (fields)
Definition: gg_structs.h:595
unsigned char * BufDbf
DBF I/O buffer.
Definition: gg_structs.h:416
int NumInteriors
number of interior rings (may be, none)
Definition: gg_structs.h:188
gaiaPolygon * gaiaPolygonPtr
Typedef for OGC POLYGON structure.
Definition: gg_structs.h:211
double MaxY
Extent: max Y.
Definition: gg_structs.h:636
int DbfHdsz
DBF header size (in bytes)
Definition: gg_structs.h:418
int Points
number of points [aka vertices]
Definition: gg_structs.h:122
char text_separator
text separator character (quote)
Definition: gg_structs.h:577
int field_offsets[VRTTXT_FIELDS_MAX]
array of field offsets (where each field starts)
Definition: gg_structs.h:506
gaiaTextReader * gaiaTextReaderPtr
Typedef for Virtual Text file handling structure.
Definition: gg_structs.h:618
int IsHidden
Hidden layer: TRUE or FALSE.
Definition: gg_structs.h:654
int LayerType
one of GAIA_VECTOR_UNKNOWN, GAIA_VECTOR_TABLE, GAIA_VECTOR_VIEW, GAIA_VECTOR_VIRTUAL ...
Definition: gg_structs.h:759
gaiaPointPtr First
pointer to first POINT [double linked list]
Definition: gg_structs.h:104
gaiaAttributeFieldMaxSize * gaiaAttributeFieldMaxSizePtr
Typedef for Attribute/Field MaxSize/Length infos.
Definition: gg_structs.h:678
Attribute/Field MaxSize/Length infos.
Definition: gg_structs.h:667
int NullValuesCount
total count of NULL values
Definition: gg_structs.h:726
gaiaPolygonPtr LastPolygon
pointer to last POLYGON [linked list]; may be NULL
Definition: gg_structs.h:242
struct gaiaDbfFieldStruct gaiaDbfField
Container for DBF field.
int Srid
SRID value.
Definition: gg_structs.h:765
gaiaLayerAuthPtr AuthInfos
pointer to Auth infos (may be NULL)
Definition: gg_structs.h:780
double MaxY
MBR: max Y.
Definition: gg_structs.h:164
struct gaiaPointStruct * Prev
pointer to previous item [double linked list]
Definition: gg_structs.h:84
double MinY
MBR: min Y.
Definition: gg_structs.h:196
double MaxY
MBR: max Y.
Definition: gg_structs.h:250
int endian_arch
DBF endian arch.
Definition: gg_structs.h:360
int BlobValuesCount
total count of BLOB values
Definition: gg_structs.h:734
struct gaiaLayerAuthInfos gaiaLayerAuth
Layer Auth infos.
FILE * flDbf
FILE handle to DBF file.
Definition: gg_structs.h:410
int DimensionModel
one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM
Definition: gg_structs.h:202
struct vrttxt_row rows[VRTTXT_BLOCK_MAX]
array of records [lines]
Definition: gg_structs.h:539
Container for OGC GEOMETRYCOLLECTION Geometry.
Definition: gg_structs.h:216
double MinY
Extent: min Y.
Definition: gg_structs.h:632
Layer Auth infos.
Definition: gg_structs.h:649
struct gaiaGeomCollStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:256
gaiaDbfListPtr Dbf
list of DBF fields
Definition: gg_structs.h:414
struct vrttxt_row ** rows
array of pointers to individual records [lines]
Definition: gg_structs.h:589
struct gaiaGeomCollStruct gaiaGeomColl
Container for OGC GEOMETRYCOLLECTION Geometry.
int EffectiveType
SHP actual OGC Geometry type.
Definition: gg_structs.h:446
int Error
invalid object
Definition: gg_structs.h:100
gaiaDbf * gaiaDbfPtr
Typedef for DBF file handler structure.
Definition: gg_structs.h:389
struct gaiaLayerAttributeFieldInfos * Next
pointer to next item (linked list)
Definition: gg_structs.h:742
double MinValue
Minimum value.
Definition: gg_structs.h:704
gaiaRing * gaiaRingPtr
Typedef for OGC RING structure.
Definition: gg_structs.h:177
struct gaiaDynamicLineStruct gaiaDynamicLine
Container for dynamically growing line/ring.
char * name
column name
Definition: gg_structs.h:557
gaiaLayerExtentPtr ExtentInfos
pointer to Extent infos (may be NULL)
Definition: gg_structs.h:778
gaiaValuePtr Value
current variant [multi-type] value
Definition: gg_structs.h:322
struct gaiaRingStruct * Next
pointer to next item [linked list]
Definition: gg_structs.h:168
FILE * flDbf
FILE handle.
Definition: gg_structs.h:366
gaiaPointPtr FirstPoint
pointer to first POINT [linked list]; may be NULL
Definition: gg_structs.h:232
#define VRTTXT_BLOCK_MAX
Virtual Text driver: MAX block size (in bytes)
Definition: gg_structs.h:484
struct gaiaDbfStruct gaiaDbf
Container for DBF file handling.
sqlite3_int64 MinValue
Minimum value.
Definition: gg_structs.h:686
char * AttributeFieldName
SQL name of the corresponding column.
Definition: gg_structs.h:724
gaiaShapefile * gaiaShapefilePtr
Typedef for SHP file handler structure.
Definition: gg_structs.h:455
double MinX
Extent: min X.
Definition: gg_structs.h:630
struct vrttxt_column_header columns[VRTTXT_FIELDS_MAX]
array of columns (fields)
Definition: gg_structs.h:569
double MaxY
MBR: max X.
Definition: gg_structs.h:132
void * IconvObj
handle to ICONV converter object
Definition: gg_structs.h:442
int DbfRecno
DBF current Record Number.
Definition: gg_structs.h:424
double MaxX
MBR: max X.
Definition: gg_structs.h:198
struct gaiaPolygonStruct * Link
pointer to belonging Polygon
Definition: gg_structs.h:170
int Offset
DBF buffer offset [where the field value starts].
Definition: gg_structs.h:316
struct vrttxt_row_block * next
pointer to next item [linked list]
Definition: gg_structs.h:547
int num_rows
number of records into the array
Definition: gg_structs.h:541
Container for variant (multi-type) value.
Definition: gg_structs.h:288