SpatiaLite  4.2.0
 All Data Structures Files Functions Variables Typedefs Macros Pages
gg_formats.h
Go to the documentation of this file.
1 /*
2  gg_formats.h -- Gaia common support for geometries: formats
3 
4  version 4.2, 2014 July 25
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-2013
27 the Initial Developer. All Rights Reserved.
28 
29 Contributor(s):
30 Klaus Foerster klaus.foerster@svg.cc
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_FORMATS_H
54 #ifndef DOXYGEN_SHOULD_SKIP_THIS
55 #define _GG_FORMATS_H
56 #endif
57 
58 #ifdef __cplusplus
59 extern "C"
60 {
61 #endif
62 
63 /* function prototypes */
64 
70  GAIAGEO_DECLARE int gaiaEndianArch (void);
71 
87  GAIAGEO_DECLARE short gaiaImport16 (const unsigned char *p,
88  int little_endian,
89  int little_endian_arch);
90 
106  GAIAGEO_DECLARE int gaiaImport32 (const unsigned char *p, int little_endian,
107  int little_endian_arch);
108 
124  GAIAGEO_DECLARE unsigned int gaiaImportU32 (const unsigned char *p,
125  int little_endian,
126  int little_endian_arch);
127 
143  GAIAGEO_DECLARE float gaiaImportF32 (const unsigned char *p,
144  int little_endian,
145  int little_endian_arch);
146 
162  GAIAGEO_DECLARE double gaiaImport64 (const unsigned char *p,
163  int little_endian,
164  int little_endian_arch);
165 
181  GAIAGEO_DECLARE sqlite3_int64 gaiaImportI64 (const unsigned char *p,
182  int little_endian,
183  int little_endian_arch);
184 
199  GAIAGEO_DECLARE void gaiaExport16 (unsigned char *p, short value,
200  int little_endian,
201  int little_endian_arch);
202 
217  GAIAGEO_DECLARE void gaiaExport32 (unsigned char *p, int value,
218  int little_endian,
219  int little_endian_arch);
220 
235  GAIAGEO_DECLARE void gaiaExportU32 (unsigned char *p, unsigned int value,
236  int little_endian,
237  int little_endian_arch);
238 
253  GAIAGEO_DECLARE void gaiaExportF32 (unsigned char *p, float value,
254  int little_endian,
255  int little_endian_arch);
256 
271  GAIAGEO_DECLARE void gaiaExport64 (unsigned char *p, double value,
272  int little_endian,
273  int little_endian_arch);
274 
289  GAIAGEO_DECLARE void gaiaExportI64 (unsigned char *p, sqlite3_int64 value,
290  int little_endian,
291  int little_endian_arch);
292 
308  GAIAGEO_DECLARE void gaiaOutBufferInitialize (gaiaOutBufferPtr buf);
309 
321  GAIAGEO_DECLARE void gaiaOutBufferReset (gaiaOutBufferPtr buf);
322 
336  GAIAGEO_DECLARE void gaiaAppendToOutBuffer (gaiaOutBufferPtr buf,
337  const char *text);
338 
355  GAIAGEO_DECLARE void gaiaMakePoint (double x, double y, int srid,
356  unsigned char **result, int *size);
357 
375  GAIAGEO_DECLARE void gaiaMakePointZ (double x, double y, double z, int srid,
376  unsigned char **result, int *size);
377 
395  GAIAGEO_DECLARE void gaiaMakePointM (double x, double y, double m, int srid,
396  unsigned char **result, int *size);
397 
416  GAIAGEO_DECLARE void gaiaMakePointZM (double x, double y, double z,
417  double m, int srid,
418  unsigned char **result, int *size);
419 
435  GAIAGEO_DECLARE void gaiaMakeLine (gaiaGeomCollPtr geom1,
436  gaiaGeomCollPtr geom2,
437  unsigned char **result, int *size);
438 
454  GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromSpatiaLiteBlobWkb (const unsigned
455  char *blob,
456  unsigned int
457  size);
458 
473  GAIAGEO_DECLARE void gaiaToSpatiaLiteBlobWkb (gaiaGeomCollPtr geom,
474  unsigned char **result,
475  int *size);
476 
493  GAIAGEO_DECLARE void gaiaToCompressedBlobWkb (gaiaGeomCollPtr geom,
494  unsigned char **result,
495  int *size);
496 
512  GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromWkb (const unsigned char *blob,
513  unsigned int size);
514 
532  GAIAGEO_DECLARE void gaiaToWkb (gaiaGeomCollPtr geom,
533  unsigned char **result, int *size);
534 
549  GAIAGEO_DECLARE char *gaiaToHexWkb (gaiaGeomCollPtr geom);
550 
562  GAIAGEO_DECLARE void gaiaToEWKB (gaiaOutBufferPtr out_buf,
563  gaiaGeomCollPtr geom);
564 
580  GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromEWKB (const unsigned char
581  *in_buffer);
582 
597  GAIAGEO_DECLARE unsigned char *gaiaParseHexEWKB (const unsigned char
598  *blob_hex, int *blob_size);
599 
618  GAIAGEO_DECLARE int
619  gaiaEwkbGetPoint (gaiaGeomCollPtr geom, unsigned char *blob,
620  int offset, int blob_size, int endian,
621  int endian_arch, int dims);
622 
641  GAIAGEO_DECLARE int
642  gaiaEwkbGetLinestring (gaiaGeomCollPtr geom, unsigned char *blob,
643  int offset, int blob_size, int endian,
644  int endian_arch, int dims);
645 
662  GAIAGEO_DECLARE int
663  gaiaEwkbGetPolygon (gaiaGeomCollPtr geom, unsigned char *blob,
664  int offset, int blob_size, int endian,
665  int endian_arch, int dims);
666 
685  GAIAGEO_DECLARE int
686  gaiaEwkbGetMultiGeometry (gaiaGeomCollPtr geom, unsigned char *blob,
687  int offset, int blob_size, int endian,
688  int endian_arch, int dims);
689 
705  GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromFgf (const unsigned char *blob,
706  unsigned int size);
707 
723  GAIAGEO_DECLARE void gaiaToFgf (gaiaGeomCollPtr geom,
724  unsigned char **result, int *size,
725  int coord_dims);
726 
744  GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseWkt (const unsigned char
745  *in_buffer, short type);
746 
759  GAIAGEO_DECLARE void gaiaOutWkt (gaiaOutBufferPtr out_buf,
760  gaiaGeomCollPtr geom);
761 
775  GAIAGEO_DECLARE void gaiaOutWktStrict (gaiaOutBufferPtr out_buf,
776  gaiaGeomCollPtr geom, int precision);
777 
792  GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseEWKT (const unsigned char
793  *in_buffer);
794 
805  GAIAGEO_DECLARE void gaiaToEWKT (gaiaOutBufferPtr out_buf,
806  gaiaGeomCollPtr geom);
807 
818  GAIAGEO_DECLARE void gaiaOutPointZ (gaiaOutBufferPtr out_buf,
819  gaiaPointPtr point);
820 
831  GAIAGEO_DECLARE void gaiaOutLinestringZ (gaiaOutBufferPtr out_buf,
832  gaiaLinestringPtr linestring);
833 
844  GAIAGEO_DECLARE void gaiaOutPolygonZ (gaiaOutBufferPtr out_buf,
845  gaiaPolygonPtr polygon);
860  GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseKml (const unsigned char
861  *in_buffer);
862 
874  GAIAGEO_DECLARE void gaiaOutBareKml (gaiaOutBufferPtr out_buf,
875  gaiaGeomCollPtr geom, int precision);
876 
890  GAIAGEO_DECLARE void gaiaOutFullKml (gaiaOutBufferPtr out_buf,
891  const char *name, const char *desc,
892  gaiaGeomCollPtr geom, int precision);
893 
910  GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseGml (const unsigned char
911  *in_buffer,
912  sqlite3 * sqlite_handle);
913 
931  GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseGml_r (const void *p_cache,
932  const unsigned char
933  *in_buffer,
934  sqlite3 * sqlite_handle);
935 
949  GAIAGEO_DECLARE void gaiaOutGml (gaiaOutBufferPtr out_buf, int version,
950  int precision, gaiaGeomCollPtr geom);
951 
966  GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseGeoJSON (const unsigned char
967  *in_buffer);
968 
987  GAIAGEO_DECLARE void gaiaOutGeoJSON (gaiaOutBufferPtr out_buf,
988  gaiaGeomCollPtr geom, int precision,
989  int options);
1001  GAIAGEO_DECLARE void gaiaOutSvg (gaiaOutBufferPtr out_buf,
1002  gaiaGeomCollPtr geom, int relative,
1003  int precision);
1004 
1018  GAIAGEO_DECLARE gaiaValuePtr gaiaCloneValue (gaiaValuePtr org);
1019 
1029  GAIAGEO_DECLARE void gaiaFreeValue (gaiaValuePtr p);
1030 
1054  GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaAllocDbfField (char *name,
1055  unsigned char type,
1056  int offset,
1057  unsigned char length,
1058  unsigned char decimals);
1059 
1069  GAIAGEO_DECLARE void gaiaFreeDbfField (gaiaDbfFieldPtr p);
1070 
1085  GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaCloneDbfField (gaiaDbfFieldPtr org);
1086 
1096  GAIAGEO_DECLARE void gaiaSetNullValue (gaiaDbfFieldPtr field);
1097 
1108  GAIAGEO_DECLARE void gaiaSetIntValue (gaiaDbfFieldPtr field,
1109  sqlite3_int64 value);
1110 
1120  GAIAGEO_DECLARE void gaiaSetDoubleValue (gaiaDbfFieldPtr field,
1121  double value);
1122 
1132  GAIAGEO_DECLARE void gaiaSetStrValue (gaiaDbfFieldPtr field, char *str);
1133 
1146  GAIAGEO_DECLARE gaiaDbfListPtr gaiaAllocDbfList (void);
1147 
1160  GAIAGEO_DECLARE void gaiaFreeDbfList (gaiaDbfListPtr list);
1161 
1172  GAIAGEO_DECLARE int gaiaIsValidDbfList (gaiaDbfListPtr list);
1173 
1194  GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaAddDbfField (gaiaDbfListPtr list,
1195  char *name,
1196  unsigned char type,
1197  int offset,
1198  unsigned char length,
1199  unsigned char decimals);
1200 
1211  GAIAGEO_DECLARE void gaiaResetDbfEntity (gaiaDbfListPtr list);
1212 
1225  GAIAGEO_DECLARE gaiaDbfListPtr gaiaCloneDbfEntity (gaiaDbfListPtr org);
1226 
1239  GAIAGEO_DECLARE gaiaShapefilePtr gaiaAllocShapefile (void);
1240 
1253  GAIAGEO_DECLARE void gaiaFreeShapefile (gaiaShapefilePtr shp);
1254 
1270  GAIAGEO_DECLARE void gaiaOpenShpRead (gaiaShapefilePtr shp,
1271  const char *path,
1272  const char *charFrom,
1273  const char *charTo);
1274 
1296  GAIAGEO_DECLARE void gaiaOpenShpWrite (gaiaShapefilePtr shp,
1297  const char *path, int shape,
1298  gaiaDbfListPtr list,
1299  const char *charFrom,
1300  const char *charTo);
1301 
1322  GAIAGEO_DECLARE int gaiaReadShpEntity (gaiaShapefilePtr shp,
1323  int current_row, int srid);
1324 
1338  GAIAGEO_DECLARE void gaiaShpAnalyze (gaiaShapefilePtr shp);
1339 
1354  GAIAGEO_DECLARE int gaiaWriteShpEntity (gaiaShapefilePtr shp,
1355  gaiaDbfListPtr entity);
1356 
1369  GAIAGEO_DECLARE void gaiaFlushShpHeaders (gaiaShapefilePtr shp);
1370 
1383  GAIAGEO_DECLARE gaiaDbfPtr gaiaAllocDbf (void);
1384 
1397  GAIAGEO_DECLARE void gaiaFreeDbf (gaiaDbfPtr dbf);
1398 
1413  GAIAGEO_DECLARE void gaiaOpenDbfRead (gaiaDbfPtr dbf,
1414  const char *path,
1415  const char *charFrom,
1416  const char *charTo);
1417 
1432  GAIAGEO_DECLARE void gaiaOpenDbfWrite (gaiaDbfPtr dbf,
1433  const char *path,
1434  const char *charFrom,
1435  const char *charTo);
1436 
1457  GAIAGEO_DECLARE int gaiaReadDbfEntity (gaiaDbfPtr dbf, int current_row,
1458  int *deleted);
1459 
1474  GAIAGEO_DECLARE int gaiaWriteDbfEntity (gaiaDbfPtr dbf,
1475  gaiaDbfListPtr entity);
1476 
1489  GAIAGEO_DECLARE void gaiaFlushDbfHeader (gaiaDbfPtr dbf);
1490 
1491 
1492 
1493 #ifndef OMIT_ICONV /* ICONV enabled: supporting text reader */
1494 
1516  GAIAGEO_DECLARE gaiaTextReaderPtr gaiaTextReaderAlloc (const char *path,
1517  char field_separator,
1518  char text_separator,
1519  char
1520  decimal_separator,
1521  int
1522  first_line_titles,
1523  const char
1524  *encoding);
1525 
1534  GAIAGEO_DECLARE void gaiaTextReaderDestroy (gaiaTextReaderPtr reader);
1535 
1551  GAIAGEO_DECLARE int gaiaTextReaderParse (gaiaTextReaderPtr reader);
1552 
1568  GAIAGEO_DECLARE int gaiaTextReaderGetRow (gaiaTextReaderPtr reader,
1569  int row_num);
1570 
1584  GAIAGEO_DECLARE int gaiaTextReaderFetchField (gaiaTextReaderPtr reader,
1585  int field_num, int *type,
1586  const char **value);
1587 
1588 #endif /* end ICONV (text reader) */
1589 
1590 #ifdef __cplusplus
1591 }
1592 #endif
1593 
1594 #endif /* _GG_FORMATS_H */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseGml_r(const void *p_cache, const unsigned char *in_buffer, sqlite3 *sqlite_handle)
Creates a Geometry object from GML notation.
GAIAGEO_DECLARE void gaiaMakeLine(gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, unsigned char **result, int *size)
Creates a BLOB-Geometry representing a Segment (2-Points Linestring)
GAIAGEO_DECLARE void gaiaFreeDbf(gaiaDbfPtr dbf)
Destroys a DBF File object.
GAIAGEO_DECLARE int gaiaEndianArch(void)
Test CPU endianness.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseKml(const unsigned char *in_buffer)
Creates a Geometry object from KML notation.
GAIAGEO_DECLARE void gaiaResetDbfEntity(gaiaDbfListPtr list)
Resets a DBF List object to its initial empty state.
GAIAGEO_DECLARE void gaiaExport64(unsigned char *p, double value, int little_endian, int little_endian_arch)
Export a DOUBLE value in endian-aware fashion.
GAIAGEO_DECLARE int gaiaImport32(const unsigned char *p, int little_endian, int little_endian_arch)
Import an INT-32 value in endian-aware fashion.
GAIAGEO_DECLARE void gaiaSetStrValue(gaiaDbfFieldPtr field, char *str)
Sets a TEXT current value for a DBF Field object.
GAIAGEO_DECLARE char * gaiaToHexWkb(gaiaGeomCollPtr geom)
Encodes a Geometry object into (hex) WKB notation.
GAIAGEO_DECLARE void gaiaFreeDbfField(gaiaDbfFieldPtr p)
Destroys a DBF Field object.
GAIAGEO_DECLARE void gaiaToWkb(gaiaGeomCollPtr geom, unsigned char **result, int *size)
Encodes a Geometry object into WKB notation.
Container for DBF field.
Definition: gg_structs.h:308
GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaCloneDbfField(gaiaDbfFieldPtr org)
Allocates a new DBF Field object [duplicating an existing one].
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromEWKB(const unsigned char *in_buffer)
Creates a Geometry object from EWKB notation.
GAIAGEO_DECLARE void gaiaMakePointZ(double x, double y, double z, int srid, unsigned char **result, int *size)
Creates a BLOB-Geometry representing a PointZ.
GAIAGEO_DECLARE void gaiaOutFullKml(gaiaOutBufferPtr out_buf, const char *name, const char *desc, gaiaGeomCollPtr geom, int precision)
Encodes a Geometry object into KML notation.
GAIAGEO_DECLARE int gaiaEwkbGetMultiGeometry(gaiaGeomCollPtr geom, unsigned char *blob, int offset, int blob_size, int endian, int endian_arch, int dims)
Attempts to decode a MultiGeometry from within an EWKB binary buffer.
GAIAGEO_DECLARE gaiaDbfListPtr gaiaCloneDbfEntity(gaiaDbfListPtr org)
Allocates a new DBF List object [duplicating an existing one].
GAIAGEO_DECLARE gaiaDbfPtr gaiaAllocDbf(void)
Allocates a new DBF File object.
Container for OGC POINT Geometry.
Definition: gg_structs.h:68
GAIAGEO_DECLARE int gaiaEwkbGetPoint(gaiaGeomCollPtr geom, unsigned char *blob, int offset, int blob_size, int endian, int endian_arch, int dims)
Attempts to decode a Point from within an EWKB binary buffer.
Container for OGC POLYGON Geometry.
Definition: gg_structs.h:182
GAIAGEO_DECLARE void gaiaOutGml(gaiaOutBufferPtr out_buf, int version, int precision, gaiaGeomCollPtr geom)
Encodes a Geometry object into GML notation.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseGml(const unsigned char *in_buffer, sqlite3 *sqlite_handle)
Creates a Geometry object from GML notation.
GAIAGEO_DECLARE int gaiaWriteDbfEntity(gaiaDbfPtr dbf, gaiaDbfListPtr entity)
Writes a record into a DBF File object.
GAIAGEO_DECLARE void gaiaOutGeoJSON(gaiaOutBufferPtr out_buf, gaiaGeomCollPtr geom, int precision, int options)
Encodes a Geometry object into GeoJSON notation.
GAIAGEO_DECLARE void gaiaOutBareKml(gaiaOutBufferPtr out_buf, gaiaGeomCollPtr geom, int precision)
Encodes a Geometry object into KML notation.
GAIAGEO_DECLARE short gaiaImport16(const unsigned char *p, int little_endian, int little_endian_arch)
Import an INT-16 value in endian-aware fashion.
GAIAGEO_DECLARE int gaiaReadDbfEntity(gaiaDbfPtr dbf, int current_row, int *deleted)
Reads a record from a DBF File object.
GAIAGEO_DECLARE int gaiaTextReaderParse(gaiaTextReaderPtr reader)
Prescans the external file associated to a Text Reade object.
GAIAGEO_DECLARE void gaiaTextReaderDestroy(gaiaTextReaderPtr reader)
Destroys a Text Reader object.
GAIAGEO_DECLARE void gaiaOutBufferReset(gaiaOutBufferPtr buf)
Resets a dynamically growing Text output buffer to its initial (empty) state.
GAIAGEO_DECLARE void gaiaExportF32(unsigned char *p, float value, int little_endian, int little_endian_arch)
Export a FLOAT-32 value in endian-aware fashion.
GAIAGEO_DECLARE gaiaDbfListPtr gaiaAllocDbfList(void)
Creates an initially empty DBF List object.
GAIAGEO_DECLARE int gaiaReadShpEntity(gaiaShapefilePtr shp, int current_row, int srid)
Reads a feature from a Shapefile object.
GAIAGEO_DECLARE void gaiaMakePointZM(double x, double y, double z, double m, int srid, unsigned char **result, int *size)
Creates a BLOB-Geometry representing a PointZM.
Container for a list of DBF fields.
Definition: gg_structs.h:334
GAIAGEO_DECLARE int gaiaIsValidDbfList(gaiaDbfListPtr list)
Checks a DBF List object for validity.
GAIAGEO_DECLARE sqlite3_int64 gaiaImportI64(const unsigned char *p, int little_endian, int little_endian_arch)
Import an INT-64 in endian-aware fashion.
GAIAGEO_DECLARE void gaiaExport16(unsigned char *p, short value, int little_endian, int little_endian_arch)
Export an INT-16 value in endian-aware fashion.
GAIAGEO_DECLARE void gaiaMakePoint(double x, double y, int srid, unsigned char **result, int *size)
Creates a BLOB-Geometry representing a Point.
GAIAGEO_DECLARE unsigned int gaiaImportU32(const unsigned char *p, int little_endian, int little_endian_arch)
Import an UINT-32 value in endian-aware fashion.
GAIAGEO_DECLARE void gaiaSetIntValue(gaiaDbfFieldPtr field, sqlite3_int64 value)
Sets an INTEGER current value for a DBF Field object.
GAIAGEO_DECLARE void gaiaSetDoubleValue(gaiaDbfFieldPtr field, double value)
Sets a DOUBLE current value for a DBF Field object.
GAIAGEO_DECLARE void gaiaToFgf(gaiaGeomCollPtr geom, unsigned char **result, int *size, int coord_dims)
Encodes a Geometry object into FGF notation.
GAIAGEO_DECLARE void gaiaOutLinestringZ(gaiaOutBufferPtr out_buf, gaiaLinestringPtr linestring)
Encodes a WKT 3D Linestring [XYZ].
GAIAGEO_DECLARE int gaiaTextReaderFetchField(gaiaTextReaderPtr reader, int field_num, int *type, const char **value)
Retrieves an individual field value from the current Line.
GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaAllocDbfField(char *name, unsigned char type, int offset, unsigned char length, unsigned char decimals)
Allocates a new DBF Field object.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromFgf(const unsigned char *blob, unsigned int size)
Creates a Geometry object from FGF notation.
GAIAGEO_DECLARE int gaiaEwkbGetLinestring(gaiaGeomCollPtr geom, unsigned char *blob, int offset, int blob_size, int endian, int endian_arch, int dims)
Attempts to decode a Point from within an EWKB binary buffer.
GAIAGEO_DECLARE int gaiaTextReaderGetRow(gaiaTextReaderPtr reader, int row_num)
Reads a line from a Text Reader object.
GAIAGEO_DECLARE void gaiaExportU32(unsigned char *p, unsigned int value, int little_endian, int little_endian_arch)
Export an UINT-32 value in endian-aware fashion.
GAIAGEO_DECLARE gaiaValuePtr gaiaCloneValue(gaiaValuePtr org)
Allocates a new DBF Field Value object [duplicating an existing one].
GAIAGEO_DECLARE void gaiaOutSvg(gaiaOutBufferPtr out_buf, gaiaGeomCollPtr geom, int relative, int precision)
Encodes a Geometry object into SVG notation.
GAIAGEO_DECLARE void gaiaFlushShpHeaders(gaiaShapefilePtr shp)
Writes into an output Shapefile any required header / footer.
GAIAGEO_DECLARE void gaiaToSpatiaLiteBlobWkb(gaiaGeomCollPtr geom, unsigned char **result, int *size)
Creates a BLOB-Geometry corresponding to a Geometry object.
GAIAGEO_DECLARE void gaiaOpenShpRead(gaiaShapefilePtr shp, const char *path, const char *charFrom, const char *charTo)
Open a Shapefile in read mode.
GAIAGEO_DECLARE void gaiaOutWkt(gaiaOutBufferPtr out_buf, gaiaGeomCollPtr geom)
Encodes a Geometry object into WKT notation.
Container for OGC LINESTRING Geometry.
Definition: gg_structs.h:118
GAIAGEO_DECLARE void gaiaFreeDbfList(gaiaDbfListPtr list)
Destroys a DBF List object.
Container for dynamically growing output buffer.
Definition: gg_structs.h:460
GAIAGEO_DECLARE double gaiaImport64(const unsigned char *p, int little_endian, int little_endian_arch)
Import an DOUBLE-64 in endian-aware fashion.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseGeoJSON(const unsigned char *in_buffer)
Creates a Geometry object from GeoJSON notation.
GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaAddDbfField(gaiaDbfListPtr list, char *name, unsigned char type, int offset, unsigned char length, unsigned char decimals)
Inserts a further DBF Field object into a DBF List object.
GAIAGEO_DECLARE void gaiaExport32(unsigned char *p, int value, int little_endian, int little_endian_arch)
Export an INT-32 value in endian-aware fashion.
Container for Virtual Text file handling.
Definition: gg_structs.h:565
GAIAGEO_DECLARE void gaiaSetNullValue(gaiaDbfFieldPtr field)
Sets a NULL current value for a DBF Field object.
GAIAGEO_DECLARE int gaiaEwkbGetPolygon(gaiaGeomCollPtr geom, unsigned char *blob, int offset, int blob_size, int endian, int endian_arch, int dims)
Attempts to decode a Polygon from within an EWKB binary buffer.
GAIAGEO_DECLARE void gaiaOutBufferInitialize(gaiaOutBufferPtr buf)
Initializes a dynamically growing Text output buffer.
GAIAGEO_DECLARE void gaiaMakePointM(double x, double y, double m, int srid, unsigned char **result, int *size)
Creates a BLOB-Geometry representing a PointM.
Container for SHP file handling.
Definition: gg_structs.h:394
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromSpatiaLiteBlobWkb(const unsigned char *blob, unsigned int size)
Creates a Geometry object from the corresponding BLOB-Geometry.
Container for DBF file handling.
Definition: gg_structs.h:356
GAIAGEO_DECLARE void gaiaShpAnalyze(gaiaShapefilePtr shp)
Prescans a Shapefile object gathering informations.
GAIAGEO_DECLARE void gaiaOutPointZ(gaiaOutBufferPtr out_buf, gaiaPointPtr point)
Encodes a WKT 3D Point [XYZ].
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseWkt(const unsigned char *in_buffer, short type)
Creates a Geometry object from WKT notation.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromWkb(const unsigned char *blob, unsigned int size)
Creates a Geometry object from WKB notation.
GAIAGEO_DECLARE void gaiaOpenShpWrite(gaiaShapefilePtr shp, const char *path, int shape, gaiaDbfListPtr list, const char *charFrom, const char *charTo)
Open a Shapefile in read mode.
GAIAGEO_DECLARE gaiaTextReaderPtr gaiaTextReaderAlloc(const char *path, char field_separator, char text_separator, char decimal_separator, int first_line_titles, const char *encoding)
Creates a Text Reader object.
Container for OGC GEOMETRYCOLLECTION Geometry.
Definition: gg_structs.h:216
GAIAGEO_DECLARE void gaiaToEWKB(gaiaOutBufferPtr out_buf, gaiaGeomCollPtr geom)
Encodes a Geometry object into EWKB notation.
GAIAGEO_DECLARE float gaiaImportF32(const unsigned char *p, int little_endian, int little_endian_arch)
Import a FLOAT-32 value in endian-aware fashion.
GAIAGEO_DECLARE void gaiaToCompressedBlobWkb(gaiaGeomCollPtr geom, unsigned char **result, int *size)
Creates a Compressed BLOB-Geometry corresponding to a Geometry object.
GAIAGEO_DECLARE void gaiaFreeValue(gaiaValuePtr p)
Resets a DBF Field Value object to its initial empty state.
GAIAGEO_DECLARE void gaiaFreeShapefile(gaiaShapefilePtr shp)
Destroys a Shapefile object.
GAIAGEO_DECLARE void gaiaFlushDbfHeader(gaiaDbfPtr dbf)
Writes into an output DBF File any required header / footer.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseEWKT(const unsigned char *in_buffer)
Creates a Geometry object from EWKT notation.
GAIAGEO_DECLARE void gaiaAppendToOutBuffer(gaiaOutBufferPtr buf, const char *text)
Appends a text string at the end of Text output buffer.
GAIAGEO_DECLARE gaiaShapefilePtr gaiaAllocShapefile(void)
Allocates a new Shapefile object.
GAIAGEO_DECLARE void gaiaOpenDbfWrite(gaiaDbfPtr dbf, const char *path, const char *charFrom, const char *charTo)
Open a DBF File in write mode.
GAIAGEO_DECLARE void gaiaOpenDbfRead(gaiaDbfPtr dbf, const char *path, const char *charFrom, const char *charTo)
Open a DBF File in read mode.
GAIAGEO_DECLARE void gaiaOutWktStrict(gaiaOutBufferPtr out_buf, gaiaGeomCollPtr geom, int precision)
Encodes a Geometry object into strict 2D WKT notation.
GAIAGEO_DECLARE void gaiaExportI64(unsigned char *p, sqlite3_int64 value, int little_endian, int little_endian_arch)
Export an INT-64 value in endian-aware fashion.
GAIAGEO_DECLARE int gaiaWriteShpEntity(gaiaShapefilePtr shp, gaiaDbfListPtr entity)
Writes a feature into a Shapefile object.
GAIAGEO_DECLARE void gaiaOutPolygonZ(gaiaOutBufferPtr out_buf, gaiaPolygonPtr polygon)
Encodes a WKT 3D Polygon [XYZ].
GAIAGEO_DECLARE void gaiaToEWKT(gaiaOutBufferPtr out_buf, gaiaGeomCollPtr geom)
Encodes a Geometry object into EWKT notation.
GAIAGEO_DECLARE unsigned char * gaiaParseHexEWKB(const unsigned char *blob_hex, int *blob_size)
Translates an EWKB notation from hexadecimal into binary.
Container for variant (multi-type) value.
Definition: gg_structs.h:288