SpatiaLite  4.1.1
 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.1, 2013 May 8
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 
909  GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseGml (const unsigned char
910  *in_buffer,
911  sqlite3 * sqlite_handle);
912 
926  GAIAGEO_DECLARE void gaiaOutGml (gaiaOutBufferPtr out_buf, int version,
927  int precision, gaiaGeomCollPtr geom);
928 
943  GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseGeoJSON (const unsigned char
944  *in_buffer);
945 
964  GAIAGEO_DECLARE void gaiaOutGeoJSON (gaiaOutBufferPtr out_buf,
965  gaiaGeomCollPtr geom, int precision,
966  int options);
978  GAIAGEO_DECLARE void gaiaOutSvg (gaiaOutBufferPtr out_buf,
979  gaiaGeomCollPtr geom, int relative,
980  int precision);
981 
995  GAIAGEO_DECLARE gaiaValuePtr gaiaCloneValue (gaiaValuePtr org);
996 
1006  GAIAGEO_DECLARE void gaiaFreeValue (gaiaValuePtr p);
1007 
1031  GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaAllocDbfField (char *name,
1032  unsigned char type,
1033  int offset,
1034  unsigned char length,
1035  unsigned char decimals);
1036 
1046  GAIAGEO_DECLARE void gaiaFreeDbfField (gaiaDbfFieldPtr p);
1047 
1062  GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaCloneDbfField (gaiaDbfFieldPtr org);
1063 
1073  GAIAGEO_DECLARE void gaiaSetNullValue (gaiaDbfFieldPtr field);
1074 
1085  GAIAGEO_DECLARE void gaiaSetIntValue (gaiaDbfFieldPtr field,
1086  sqlite3_int64 value);
1087 
1097  GAIAGEO_DECLARE void gaiaSetDoubleValue (gaiaDbfFieldPtr field,
1098  double value);
1099 
1109  GAIAGEO_DECLARE void gaiaSetStrValue (gaiaDbfFieldPtr field, char *str);
1110 
1123  GAIAGEO_DECLARE gaiaDbfListPtr gaiaAllocDbfList (void);
1124 
1137  GAIAGEO_DECLARE void gaiaFreeDbfList (gaiaDbfListPtr list);
1138 
1149  GAIAGEO_DECLARE int gaiaIsValidDbfList (gaiaDbfListPtr list);
1150 
1171  GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaAddDbfField (gaiaDbfListPtr list,
1172  char *name,
1173  unsigned char type,
1174  int offset,
1175  unsigned char length,
1176  unsigned char decimals);
1177 
1188  GAIAGEO_DECLARE void gaiaResetDbfEntity (gaiaDbfListPtr list);
1189 
1202  GAIAGEO_DECLARE gaiaDbfListPtr gaiaCloneDbfEntity (gaiaDbfListPtr org);
1203 
1216  GAIAGEO_DECLARE gaiaShapefilePtr gaiaAllocShapefile (void);
1217 
1230  GAIAGEO_DECLARE void gaiaFreeShapefile (gaiaShapefilePtr shp);
1231 
1247  GAIAGEO_DECLARE void gaiaOpenShpRead (gaiaShapefilePtr shp,
1248  const char *path,
1249  const char *charFrom,
1250  const char *charTo);
1251 
1273  GAIAGEO_DECLARE void gaiaOpenShpWrite (gaiaShapefilePtr shp,
1274  const char *path, int shape,
1275  gaiaDbfListPtr list,
1276  const char *charFrom,
1277  const char *charTo);
1278 
1299  GAIAGEO_DECLARE int gaiaReadShpEntity (gaiaShapefilePtr shp,
1300  int current_row, int srid);
1301 
1315  GAIAGEO_DECLARE void gaiaShpAnalyze (gaiaShapefilePtr shp);
1316 
1331  GAIAGEO_DECLARE int gaiaWriteShpEntity (gaiaShapefilePtr shp,
1332  gaiaDbfListPtr entity);
1333 
1346  GAIAGEO_DECLARE void gaiaFlushShpHeaders (gaiaShapefilePtr shp);
1347 
1360  GAIAGEO_DECLARE gaiaDbfPtr gaiaAllocDbf (void);
1361 
1374  GAIAGEO_DECLARE void gaiaFreeDbf (gaiaDbfPtr dbf);
1375 
1390  GAIAGEO_DECLARE void gaiaOpenDbfRead (gaiaDbfPtr dbf,
1391  const char *path,
1392  const char *charFrom,
1393  const char *charTo);
1394 
1409  GAIAGEO_DECLARE void gaiaOpenDbfWrite (gaiaDbfPtr dbf,
1410  const char *path,
1411  const char *charFrom,
1412  const char *charTo);
1413 
1434  GAIAGEO_DECLARE int gaiaReadDbfEntity (gaiaDbfPtr dbf, int current_row,
1435  int *deleted);
1436 
1451  GAIAGEO_DECLARE int gaiaWriteDbfEntity (gaiaDbfPtr dbf,
1452  gaiaDbfListPtr entity);
1453 
1466  GAIAGEO_DECLARE void gaiaFlushDbfHeader (gaiaDbfPtr dbf);
1467 
1468 
1469 
1470 #ifndef OMIT_ICONV /* ICONV enabled: supporting text reader */
1471 
1493  GAIAGEO_DECLARE gaiaTextReaderPtr gaiaTextReaderAlloc (const char *path,
1494  char field_separator,
1495  char text_separator,
1496  char
1497  decimal_separator,
1498  int
1499  first_line_titles,
1500  const char
1501  *encoding);
1502 
1511  GAIAGEO_DECLARE void gaiaTextReaderDestroy (gaiaTextReaderPtr reader);
1512 
1528  GAIAGEO_DECLARE int gaiaTextReaderParse (gaiaTextReaderPtr reader);
1529 
1545  GAIAGEO_DECLARE int gaiaTextReaderGetRow (gaiaTextReaderPtr reader,
1546  int row_num);
1547 
1561  GAIAGEO_DECLARE int gaiaTextReaderFetchField (gaiaTextReaderPtr reader,
1562  int field_num, int *type,
1563  const char **value);
1564 
1565 #endif /* end ICONV (text reader) */
1566 
1567 #ifdef __cplusplus
1568 }
1569 #endif
1570 
1571 #endif /* _GG_FORMATS_H */
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