50 #ifndef DOXYGEN_SHOULD_SKIP_THIS
53 #define SPATIALITE_DECLARE __declspec(dllexport)
55 #define SPATIALITE_DECLARE extern
58 #define SPATIALITE_DECLARE __attribute__ ((visibility("default")))
63 #ifndef DOXYGEN_SHOULD_SKIP_THIS
67 #define SPLITE_AXIS_1 0x51
68 #define SPLITE_AXIS_2 0x52
69 #define SPLITE_AXIS_NAME 0x3e
70 #define SPLITE_AXIS_ORIENTATION 0x3f
79 #ifdef LOADABLE_EXTENSION
80 SPATIALITE_DECLARE
int
81 sqlite3_spatialite_init (sqlite3 * db,
char **pzErrMsg,
82 const sqlite3_api_routines * pApi);
155 const void *ptr,
int verbose);
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,
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,
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);
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,
349 SPATIALITE_DECLARE
int load_dbf (sqlite3 * sqlite,
char *dbf_path,
350 char *table,
char *charset,
int verbose,
351 int *rows,
char *err_msg);
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,
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,
412 SPATIALITE_DECLARE
int dump_dbf (sqlite3 * sqlite,
char *table,
413 char *dbf_path,
char *charset,
430 SPATIALITE_DECLARE
int dump_dbf_ex (sqlite3 * sqlite,
char *table,
431 char *dbf_path,
char *charset,
432 int *rows,
char *err_msg);
447 SPATIALITE_DECLARE
int load_XL (sqlite3 * sqlite,
const char *path,
449 unsigned int worksheetIndex,
450 int first_titles,
unsigned int *rows,
460 SPATIALITE_DECLARE
double math_round (
double value);
469 SPATIALITE_DECLARE sqlite3_int64
math_llabs (sqlite3_int64 value);
604 SPATIALITE_DECLARE
char *
srid_get_datum (sqlite3 * sqlite,
int srid);
617 SPATIALITE_DECLARE
char *
srid_get_unit (sqlite3 * sqlite,
int srid);
632 SPATIALITE_DECLARE
char *
srid_get_axis (sqlite3 * sqlite,
int srid,
633 char axis,
char mode);
646 SPATIALITE_DECLARE
int
664 SPATIALITE_DECLARE
int dump_kml (sqlite3 * sqlite,
char *table,
665 char *geom_col,
char *kml_path,
666 char *name_col,
char *desc_col,
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);
779 char *outTable,
char *pKey,
806 char *pKey,
char *multiId,
836 char *multiId,
int *rows,
861 SPATIALITE_DECLARE
int dump_geojson (sqlite3 * sqlite,
char *table,
862 char *geom_col,
char *outfile_path,
863 int precision,
int option);
889 char *geom_col,
char *outfile_path,
890 int precision,
int option,
937 const char *geometry);
965 const char *geometry,
1028 const char *column);
1079 SPATIALITE_DECLARE
int gaiaDropTable (sqlite3 * sqlite,
const char *table);
1154 const char *report_path,
1155 int *n_rows,
int *n_invalids,
1188 const char *report_path,
1215 const char *output_dir,
1243 const char *output_dir,
1283 const char *tmp_table,
1284 const char *report_path,
1329 const char *tmp_table,
1330 const char *report_path,
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);
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.