SpatiaLite  4.3.0
spatialite.h
Go to the documentation of this file.
1 /*
2  spatialite.h -- Gaia spatial support for SQLite
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 Alternatively, the contents of this file may be used under the terms of
32 either the GNU General Public License Version 2 or later (the "GPL"), or
33 the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
34 in which case the provisions of the GPL or the LGPL are applicable instead
35 of those above. If you wish to allow use of your version of this file only
36 under the terms of either the GPL or the LGPL, and not to allow others to
37 use your version of this file under the terms of the MPL, indicate your
38 decision by deleting the provisions above and replace them with the notice
39 and other provisions required by the GPL or the LGPL. If you do not delete
40 the provisions above, a recipient may use your version of this file under
41 the terms of any one of the MPL, the GPL or the LGPL.
42 
43 */
44 
50 #ifndef DOXYGEN_SHOULD_SKIP_THIS
51 #ifdef _WIN32
52 #ifdef DLL_EXPORT
53 #define SPATIALITE_DECLARE __declspec(dllexport)
54 #else
55 #define SPATIALITE_DECLARE extern
56 #endif
57 #else
58 #define SPATIALITE_DECLARE __attribute__ ((visibility("default")))
59 #endif
60 #endif
61 
62 #ifndef _SPATIALITE_H
63 #ifndef DOXYGEN_SHOULD_SKIP_THIS
64 #define _SPATIALITE_H
65 #endif
66 
67 #define SPLITE_AXIS_1 0x51
68 #define SPLITE_AXIS_2 0x52
69 #define SPLITE_AXIS_NAME 0x3e
70 #define SPLITE_AXIS_ORIENTATION 0x3f
71 
72 #ifdef __cplusplus
73 extern "C"
74 {
75 #endif
76 
77 #include <spatialite/gaiageo.h>
78 
79 #ifdef LOADABLE_EXTENSION
80  SPATIALITE_DECLARE int
81  sqlite3_spatialite_init (sqlite3 * db, char **pzErrMsg,
82  const sqlite3_api_routines * pApi);
83 #endif
84 
91  SPATIALITE_DECLARE void spatialite_initialize (void);
92 
101  SPATIALITE_DECLARE void spatialite_shutdown (void);
102 
108  SPATIALITE_DECLARE const char *spatialite_version (void);
109 
115  SPATIALITE_DECLARE const char *spatialite_target_cpu (void);
116 
123  SPATIALITE_DECLARE void *spatialite_alloc_connection (void);
124 
139  SPATIALITE_DECLARE void spatialite_init (int verbose);
140 
154  SPATIALITE_DECLARE void spatialite_init_ex (sqlite3 * db_handle,
155  const void *ptr, int verbose);
156 
163  SPATIALITE_DECLARE void spatialite_init_geos (void);
164 
175  SPATIALITE_DECLARE void spatialite_cleanup (void);
176 
188  SPATIALITE_DECLARE void spatialite_cleanup_ex (const void *ptr);
189 
205  SPATIALITE_DECLARE int dump_shapefile (sqlite3 * sqlite, char *table,
206  char *column, char *shp_path,
207  char *charset, char *geom_type,
208  int verbose, int *rows,
209  char *err_msg);
210 
234  SPATIALITE_DECLARE int load_shapefile (sqlite3 * sqlite, char *shp_path,
235  char *table, char *charset, int srid,
236  char *column, int coerce2d,
237  int compressed, int verbose,
238  int spatial_index, int *rows,
239  char *err_msg);
240 
277  SPATIALITE_DECLARE int load_shapefile_ex (sqlite3 * sqlite, char *shp_path,
278  char *table, char *charset,
279  int srid, char *geo_column,
280  char *gtype, char *pk_column,
281  int coerce2d, int compressed,
282  int verbose, int spatial_index,
283  int *rows, char *err_msg);
284 
322  SPATIALITE_DECLARE int load_shapefile_ex2 (sqlite3 * sqlite, char *shp_path,
323  char *table, char *charset,
324  int srid, char *geo_column,
325  char *gtype, char *pk_column,
326  int coerce2d, int compressed,
327  int verbose, int spatial_index,
328  int text_date, int *rows,
329  char *err_msg);
330 
349  SPATIALITE_DECLARE int load_dbf (sqlite3 * sqlite, char *dbf_path,
350  char *table, char *charset, int verbose,
351  int *rows, char *err_msg);
352 
370  SPATIALITE_DECLARE int load_dbf_ex (sqlite3 * sqlite, char *dbf_path,
371  char *table, char *pk_column,
372  char *charset, int verbose, int *rows,
373  char *err_msg);
374 
393  SPATIALITE_DECLARE int load_dbf_ex2 (sqlite3 * sqlite, char *dbf_path,
394  char *table, char *pk_column,
395  char *charset, int verbose,
396  int text_date, int *rows,
397  char *err_msg);
398 
412  SPATIALITE_DECLARE int dump_dbf (sqlite3 * sqlite, char *table,
413  char *dbf_path, char *charset,
414  char *err_msg);
415 
430  SPATIALITE_DECLARE int dump_dbf_ex (sqlite3 * sqlite, char *table,
431  char *dbf_path, char *charset,
432  int *rows, char *err_msg);
433 
447  SPATIALITE_DECLARE int load_XL (sqlite3 * sqlite, const char *path,
448  const char *table,
449  unsigned int worksheetIndex,
450  int first_titles, unsigned int *rows,
451  char *err_msg);
452 
460  SPATIALITE_DECLARE double math_round (double value);
461 
469  SPATIALITE_DECLARE sqlite3_int64 math_llabs (sqlite3_int64 value);
470 
486  SPATIALITE_DECLARE int spatial_ref_sys_init (sqlite3 * sqlite, int verbose);
487 
500  SPATIALITE_DECLARE int spatial_ref_sys_init2 (sqlite3 * sqlite, int mode,
501  int verbose);
502 
511  SPATIALITE_DECLARE int insert_epsg_srid (sqlite3 * sqlite, int srid);
512 
523  SPATIALITE_DECLARE int srid_is_geographic (sqlite3 * sqlite, int srid,
524  int *geographic);
525 
536  SPATIALITE_DECLARE int srid_is_projected (sqlite3 * sqlite, int srid,
537  int *projected);
538 
550  SPATIALITE_DECLARE int srid_has_flipped_axes (sqlite3 * sqlite, int srid,
551  int *flipped);
552 
564  SPATIALITE_DECLARE char *srid_get_spheroid (sqlite3 * sqlite, int srid);
565 
577  SPATIALITE_DECLARE char *srid_get_prime_meridian (sqlite3 * sqlite,
578  int srid);
579 
591  SPATIALITE_DECLARE char *srid_get_projection (sqlite3 * sqlite, int srid);
592 
604  SPATIALITE_DECLARE char *srid_get_datum (sqlite3 * sqlite, int srid);
605 
617  SPATIALITE_DECLARE char *srid_get_unit (sqlite3 * sqlite, int srid);
618 
632  SPATIALITE_DECLARE char *srid_get_axis (sqlite3 * sqlite, int srid,
633  char axis, char mode);
634 
646  SPATIALITE_DECLARE int
647  is_kml_constant (sqlite3 * sqlite, char *table, char *column);
648 
664  SPATIALITE_DECLARE int dump_kml (sqlite3 * sqlite, char *table,
665  char *geom_col, char *kml_path,
666  char *name_col, char *desc_col,
667  int precision);
668 
685  SPATIALITE_DECLARE int dump_kml_ex (sqlite3 * sqlite, char *table,
686  char *geom_col, char *kml_path,
687  char *name_col, char *desc_col,
688  int precision, int *rows);
689 
702  SPATIALITE_DECLARE void check_duplicated_rows (sqlite3 * sqlite,
703  char *table,
704  int *dupl_count);
705 
717  SPATIALITE_DECLARE void remove_duplicated_rows (sqlite3 * sqlite,
718  char *table);
719 
733  SPATIALITE_DECLARE void remove_duplicated_rows_ex (sqlite3 * sqlite,
734  char *table,
735  int *removed);
736 
752  SPATIALITE_DECLARE void remove_duplicated_rows_ex2 (sqlite3 * sqlite,
753  char *table,
754  int *removed,
755  int transaction);
756 
776  SPATIALITE_DECLARE void elementary_geometries (sqlite3 * sqlite,
777  char *inTable,
778  char *geometry,
779  char *outTable, char *pKey,
780  char *multiId);
781 
802  SPATIALITE_DECLARE void elementary_geometries_ex (sqlite3 * sqlite,
803  char *inTable,
804  char *geometry,
805  char *outTable,
806  char *pKey, char *multiId,
807  int *rows);
808 
831  SPATIALITE_DECLARE void elementary_geometries_ex2 (sqlite3 * sqlite,
832  char *inTable,
833  char *geometry,
834  char *outTable,
835  char *pKey,
836  char *multiId, int *rows,
837  int transaction);
838 
861  SPATIALITE_DECLARE int dump_geojson (sqlite3 * sqlite, char *table,
862  char *geom_col, char *outfile_path,
863  int precision, int option);
864 
888  SPATIALITE_DECLARE int dump_geojson_ex (sqlite3 * sqlite, char *table,
889  char *geom_col, char *outfile_path,
890  int precision, int option,
891  int *rows);
892 
916  SPATIALITE_DECLARE int update_layer_statistics (sqlite3 * sqlite,
917  const char *table,
918  const char *column);
919 
935  SPATIALITE_DECLARE int gaiaStatisticsInvalidate (sqlite3 * handle,
936  const char *table,
937  const char *geometry);
938 
963  SPATIALITE_DECLARE gaiaGeomCollPtr gaiaGetLayerExtent (sqlite3 * handle,
964  const char *table,
965  const char *geometry,
966  int mode);
967 
991  SPATIALITE_DECLARE gaiaVectorLayersListPtr gaiaGetVectorLayersList (sqlite3
992  *
993  handle,
994  const
995  char
996  *table,
997  const
998  char
999  *geometry,
1000  int
1001  mode);
1002 
1013  SPATIALITE_DECLARE int gaiaCreateMetaCatalogTables (sqlite3 * handle);
1014 
1026  SPATIALITE_DECLARE int gaiaUpdateMetaCatalogStatistics (sqlite3 * handle,
1027  const char *table,
1028  const char *column);
1029 
1042  SPATIALITE_DECLARE int gaiaUpdateMetaCatalogStatisticsFromMaster (sqlite3 *
1043  handle,
1044  const char
1045  *master_table,
1046  const char
1047  *table_name,
1048  const char
1049  *column_name);
1050 
1058  SPATIALITE_DECLARE void gaiaFreeVectorLayersList (gaiaVectorLayersListPtr
1059  ptr);
1060 
1079  SPATIALITE_DECLARE int gaiaDropTable (sqlite3 * sqlite, const char *table);
1080 
1098  SPATIALITE_DECLARE int gaiaDropTableEx (sqlite3 * sqlite,
1099  const char *prefix,
1100  const char *table);
1101 
1121  SPATIALITE_DECLARE int gaiaDropTableEx2 (sqlite3 * sqlite,
1122  const char *prefix,
1123  const char *table,
1124  int transaction);
1125 
1151  SPATIALITE_DECLARE int check_geometry_column (sqlite3 * sqlite,
1152  const char *table,
1153  const char *geom,
1154  const char *report_path,
1155  int *n_rows, int *n_invalids,
1156  char **err_msg);
1157 
1184  SPATIALITE_DECLARE int check_geometry_column_r (const void *p_cache,
1185  sqlite3 * sqlite,
1186  const char *table,
1187  const char *geom,
1188  const char *report_path,
1189  int *n_rows,
1190  int *n_invalids,
1191  char **err_msg);
1192 
1214  SPATIALITE_DECLARE int check_all_geometry_columns (sqlite3 * sqlite,
1215  const char *output_dir,
1216  int *n_invalids,
1217  char **err_msg);
1218 
1241  SPATIALITE_DECLARE int check_all_geometry_columns_r (const void *p_cache,
1242  sqlite3 * sqlite,
1243  const char *output_dir,
1244  int *n_invalids,
1245  char **err_msg);
1246 
1280  SPATIALITE_DECLARE int sanitize_geometry_column (sqlite3 * sqlite,
1281  const char *table,
1282  const char *geom,
1283  const char *tmp_table,
1284  const char *report_path,
1285  int *n_invalids,
1286  int *n_repaired,
1287  int *n_discarded,
1288  int *n_failures,
1289  char **err_msg);
1290 
1325  SPATIALITE_DECLARE int sanitize_geometry_column_r (const void *p_cache,
1326  sqlite3 * sqlite,
1327  const char *table,
1328  const char *geom,
1329  const char *tmp_table,
1330  const char *report_path,
1331  int *n_invalids,
1332  int *n_repaired,
1333  int *n_discarded,
1334  int *n_failures,
1335  char **err_msg);
1336 
1363  SPATIALITE_DECLARE int sanitize_all_geometry_columns (sqlite3 * sqlite,
1364  const char
1365  *tmp_prefix,
1366  const char
1367  *output_dir,
1368  int *not_repaired,
1369  char **err_msg);
1370 
1398  SPATIALITE_DECLARE int sanitize_all_geometry_columns_r (const void *p_cache,
1399  sqlite3 * sqlite,
1400  const char
1401  *tmp_prefix,
1402  const char
1403  *output_dir,
1404  int *not_repaired,
1405  char **err_msg);
1406 
1407  SPATIALITE_DECLARE int gaiaGPKG2Spatialite (sqlite3 * handle_in,
1408  const char *gpkg_in_path,
1409  sqlite3 * handle_out,
1410  const char *splite_out_path);
1411  SPATIALITE_DECLARE int gaiaSpatialite2GPKG (sqlite3 * handle_in,
1412  const char *splite_in_path,
1413  sqlite3 * handle_out,
1414  const char *gpkg_out_path);
1415 
1416 #ifdef __cplusplus
1417 }
1418 #endif
1419 
1420 #endif /* _SPATIALITE_H */
Geometry handling functions and constants.
SPATIALITE_DECLARE int insert_epsg_srid(sqlite3 *sqlite, int srid)
Inserts some inlined EPSG definition into the "spatial_ref_sys" table.
SPATIALITE_DECLARE int sanitize_geometry_column_r(const void *p_cache, sqlite3 *sqlite, const char *table, const char *geom, const char *tmp_table, const char *report_path, int *n_invalids, int *n_repaired, int *n_discarded, int *n_failures, char **err_msg)
Sanitizes a Geometry Column making all invalid geometries to be valid.
SPATIALITE_DECLARE void elementary_geometries_ex2(sqlite3 *sqlite, char *inTable, char *geometry, char *outTable, char *pKey, char *multiId, int *rows, int transaction)
Creates a derived table surely containing elementary Geometries.
SPATIALITE_DECLARE void spatialite_cleanup_ex(const void *ptr)
Cleanup a SpatiaLite connection.
SPATIALITE_DECLARE void spatialite_init_ex(sqlite3 *db_handle, const void *ptr, int verbose)
Initializes a SpatiaLite connection.
SPATIALITE_DECLARE int sanitize_geometry_column(sqlite3 *sqlite, const char *table, const char *geom, const char *tmp_table, const char *report_path, int *n_invalids, int *n_repaired, int *n_discarded, int *n_failures, char **err_msg)
Sanitizes a Geometry Column making all invalid geometries to be valid.
SPATIALITE_DECLARE int srid_is_geographic(sqlite3 *sqlite, int srid, int *geographic)
checks a SRID definition from the "spatial_ref_sys" table determining if it is of the geographic type...
SPATIALITE_DECLARE int spatial_ref_sys_init(sqlite3 *sqlite, int verbose)
Inserts the inlined EPSG dataset into the "spatial_ref_sys" table.
SPATIALITE_DECLARE void spatialite_shutdown(void)
Finalizes the library.
SPATIALITE_DECLARE void remove_duplicated_rows(sqlite3 *sqlite, char *table)
Remove duplicated rows from a table.
SPATIALITE_DECLARE void check_duplicated_rows(sqlite3 *sqlite, char *table, int *dupl_count)
Checks for duplicated rows into the same table.
SPATIALITE_DECLARE int spatial_ref_sys_init2(sqlite3 *sqlite, int mode, int verbose)
Inserts the inlined EPSG dataset into the "spatial_ref_sys" table.
SPATIALITE_DECLARE int load_shapefile(sqlite3 *sqlite, char *shp_path, char *table, char *charset, int srid, char *column, int coerce2d, int compressed, int verbose, int spatial_index, int *rows, char *err_msg)
Loads an external Shapefile into a newly created table.
SPATIALITE_DECLARE int gaiaDropTableEx2(sqlite3 *sqlite, const char *prefix, const char *table, int transaction)
Drops a layer-table, removing any related dependency.
SPATIALITE_DECLARE int is_kml_constant(sqlite3 *sqlite, char *table, char *column)
Checks if a column is actually defined into the given table.
SPATIALITE_DECLARE int gaiaDropTable(sqlite3 *sqlite, const char *table)
Drops a layer-table, removing any related dependency.
SPATIALITE_DECLARE void remove_duplicated_rows_ex2(sqlite3 *sqlite, char *table, int *removed, int transaction)
Remove duplicated rows from a table.
SPATIALITE_DECLARE int srid_has_flipped_axes(sqlite3 *sqlite, int srid, int *flipped)
checks a SRID definition from the "spatial_ref_sys" table determining if the axes order is X-Y or Y-X...
SPATIALITE_DECLARE char * srid_get_projection(sqlite3 *sqlite, int srid)
checks a SRID definition from the "spatial_ref_sys" table then returning the corresponding Projection...
SPATIALITE_DECLARE char * srid_get_axis(sqlite3 *sqlite, int srid, char axis, char mode)
checks a SRID definition from the "spatial_ref_sys" table then returning an Axis definition ...
SPATIALITE_DECLARE int load_dbf(sqlite3 *sqlite, char *dbf_path, char *table, char *charset, int verbose, int *rows, char *err_msg)
Loads an external DBF file into a newly created table.
SPATIALITE_DECLARE int load_XL(sqlite3 *sqlite, const char *path, const char *table, unsigned int worksheetIndex, int first_titles, unsigned int *rows, char *err_msg)
Loads an external spreadsheet (.xls) file into a newly created table.
SPATIALITE_DECLARE int gaiaUpdateMetaCatalogStatisticsFromMaster(sqlite3 *handle, const char *master_table, const char *table_name, const char *column_name)
Updates the "splite_metacatalog_statistics" table (using a Master Table).
SPATIALITE_DECLARE int load_dbf_ex(sqlite3 *sqlite, char *dbf_path, char *table, char *pk_column, char *charset, int verbose, int *rows, char *err_msg)
Loads an external DBF file into a newly created table.
SPATIALITE_DECLARE void * spatialite_alloc_connection(void)
Initializes the internal memory block supporting each connection.
SPATIALITE_DECLARE void spatialite_cleanup(void)
Cleanup a SpatiaLite connection.
SPATIALITE_DECLARE int dump_shapefile(sqlite3 *sqlite, char *table, char *column, char *shp_path, char *charset, char *geom_type, int verbose, int *rows, char *err_msg)
Dumps a full geometry-table into an external Shapefile.
SPATIALITE_DECLARE int load_dbf_ex2(sqlite3 *sqlite, char *dbf_path, char *table, char *pk_column, char *charset, int verbose, int text_date, int *rows, char *err_msg)
Loads an external DBF file into a newly created table.
SPATIALITE_DECLARE int check_geometry_column(sqlite3 *sqlite, const char *table, const char *geom, const char *report_path, int *n_rows, int *n_invalids, char **err_msg)
Checks a Geometry Column for validity.
SPATIALITE_DECLARE int dump_dbf_ex(sqlite3 *sqlite, char *table, char *dbf_path, char *charset, int *rows, char *err_msg)
Dumps a full table into an external DBF file.
SPATIALITE_DECLARE const char * spatialite_target_cpu(void)
Return the target CPU name.
SPATIALITE_DECLARE sqlite3_int64 math_llabs(sqlite3_int64 value)
A portable replacement for C99 llabs()
SPATIALITE_DECLARE int sanitize_all_geometry_columns_r(const void *p_cache, sqlite3 *sqlite, const char *tmp_prefix, const char *output_dir, int *not_repaired, char **err_msg)
Sanitizes all Geometry Columns making all invalid geometries to be valid.
SPATIALITE_DECLARE void remove_duplicated_rows_ex(sqlite3 *sqlite, char *table, int *removed)
Remove duplicated rows from a table.
SPATIALITE_DECLARE int check_geometry_column_r(const void *p_cache, sqlite3 *sqlite, const char *table, const char *geom, const char *report_path, int *n_rows, int *n_invalids, char **err_msg)
Checks a Geometry Column for validity.
SPATIALITE_DECLARE int dump_kml(sqlite3 *sqlite, char *table, char *geom_col, char *kml_path, char *name_col, char *desc_col, int precision)
Dumps a full geometry-table into an external KML file.
SPATIALITE_DECLARE void elementary_geometries(sqlite3 *sqlite, char *inTable, char *geometry, char *outTable, char *pKey, char *multiId)
Creates a derived table surely containing elementary Geometries.
SPATIALITE_DECLARE char * srid_get_prime_meridian(sqlite3 *sqlite, int srid)
checks a SRID definition from the "spatial_ref_sys" table then returning the corresponding Prime Meri...
SPATIALITE_DECLARE void gaiaFreeVectorLayersList(gaiaVectorLayersListPtr ptr)
Destroys a VectorLayersList object.
SPATIALITE_DECLARE int check_all_geometry_columns(sqlite3 *sqlite, const char *output_dir, int *n_invalids, char **err_msg)
Checks all Geometry Columns for validity.
SPATIALITE_DECLARE int sanitize_all_geometry_columns(sqlite3 *sqlite, const char *tmp_prefix, const char *output_dir, int *not_repaired, char **err_msg)
Sanitizes all Geometry Columns making all invalid geometries to be valid.
SPATIALITE_DECLARE int load_shapefile_ex2(sqlite3 *sqlite, char *shp_path, char *table, char *charset, int srid, char *geo_column, char *gtype, char *pk_column, int coerce2d, int compressed, int verbose, int spatial_index, int text_date, int *rows, char *err_msg)
Loads an external Shapefile into a newly created table.
SPATIALITE_DECLARE int dump_geojson_ex(sqlite3 *sqlite, char *table, char *geom_col, char *outfile_path, int precision, int option, int *rows)
Dumps a full geometry-table into an external GeoJSON file.
SPATIALITE_DECLARE int dump_kml_ex(sqlite3 *sqlite, char *table, char *geom_col, char *kml_path, char *name_col, char *desc_col, int precision, int *rows)
Dumps a full geometry-table into an external KML file.
SPATIALITE_DECLARE gaiaGeomCollPtr gaiaGetLayerExtent(sqlite3 *handle, const char *table, const char *geometry, int mode)
Queries the Metadata tables returning the Layer Full Extent.
SPATIALITE_DECLARE int check_all_geometry_columns_r(const void *p_cache, sqlite3 *sqlite, const char *output_dir, int *n_invalids, char **err_msg)
Checks all Geometry Columns for validity.
Container for Vector Layers List.
Definition: gg_structs.h:799
SPATIALITE_DECLARE int gaiaDropTableEx(sqlite3 *sqlite, const char *prefix, const char *table)
Drops a layer-table, removing any related dependency.
SPATIALITE_DECLARE char * srid_get_datum(sqlite3 *sqlite, int srid)
checks a SRID definition from the "spatial_ref_sys" table then returning the corresponding Datum name...
SPATIALITE_DECLARE void spatialite_init(int verbose)
Initializes a SpatiaLite connection.
SPATIALITE_DECLARE int gaiaStatisticsInvalidate(sqlite3 *handle, const char *table, const char *geometry)
Immediately and unconditionally invalidates the already existing Statistics.
SPATIALITE_DECLARE int gaiaUpdateMetaCatalogStatistics(sqlite3 *handle, const char *table, const char *column)
Updates the "splite_metacatalog_statistics" table.
SPATIALITE_DECLARE char * srid_get_spheroid(sqlite3 *sqlite, int srid)
checks a SRID definition from the "spatial_ref_sys" table then returning the corresponding Spheroid n...
SPATIALITE_DECLARE int load_shapefile_ex(sqlite3 *sqlite, char *shp_path, char *table, char *charset, int srid, char *geo_column, char *gtype, char *pk_column, int coerce2d, int compressed, int verbose, int spatial_index, int *rows, char *err_msg)
Loads an external Shapefile into a newly created table.
SPATIALITE_DECLARE const char * spatialite_version(void)
Return the current library version.
SPATIALITE_DECLARE int update_layer_statistics(sqlite3 *sqlite, const char *table, const char *column)
Updates the LAYER_STATICS metadata table.
SPATIALITE_DECLARE double math_round(double value)
A portable replacement for C99 round()
SPATIALITE_DECLARE int srid_is_projected(sqlite3 *sqlite, int srid, int *projected)
checks a SRID definition from the "spatial_ref_sys" table determining if it is of the projected type ...
Container for OGC GEOMETRYCOLLECTION Geometry.
Definition: gg_structs.h:216
SPATIALITE_DECLARE gaiaVectorLayersListPtr gaiaGetVectorLayersList(sqlite3 *handle, const char *table, const char *geometry, int mode)
Queries the Metadata tables supporting Vector Layers.
SPATIALITE_DECLARE void elementary_geometries_ex(sqlite3 *sqlite, char *inTable, char *geometry, char *outTable, char *pKey, char *multiId, int *rows)
Creates a derived table surely containing elementary Geometries.
SPATIALITE_DECLARE void spatialite_initialize(void)
Initializes the library.
SPATIALITE_DECLARE int dump_dbf(sqlite3 *sqlite, char *table, char *dbf_path, char *charset, char *err_msg)
Dumps a full table into an external DBF file.
SPATIALITE_DECLARE char * srid_get_unit(sqlite3 *sqlite, int srid)
checks a SRID definition from the "spatial_ref_sys" table then returning the corresponding Unit name ...
SPATIALITE_DECLARE int gaiaCreateMetaCatalogTables(sqlite3 *handle)
Creates (or re-creates) the "splite_metacatalog" and "splite_metacalog_statistics" tables...
SPATIALITE_DECLARE int dump_geojson(sqlite3 *sqlite, char *table, char *geom_col, char *outfile_path, int precision, int option)
Dumps a full geometry-table into an external GeoJSON file.
SPATIALITE_DECLARE void spatialite_init_geos(void)
Initializes the GEOS library.