SpatiaLite
3.0.0-stable
|
Main SpatiaLite header file. More...
Go to the source code of this file.
Functions | |
SPATIALITE_DECLARE const char * | spatialite_version (void) |
Return the current library version. | |
SPATIALITE_DECLARE void | spatialite_init (int verbose) |
Initializes the library. | |
SPATIALITE_DECLARE void | spatialite_cleanup () |
Cleanup spatialite. | |
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_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 | 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 | 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 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 double | math_round (double value) |
A portable replacement for C99 round() | |
SPATIALITE_DECLARE sqlite3_int64 | math_llabs (sqlite3_int64 value) |
A portable replacement for C99 llabs() | |
SPATIALITE_DECLARE int | spatial_ref_sys_init (sqlite3 *sqlite, int verbose) |
Inserts the inlined EPSG dataset into the "spatial_ref_sys" table. | |
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 | 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 | check_duplicated_rows (sqlite3 *sqlite, char *table, int *dupl_count) |
Checks for duplicated rows into the same table. | |
SPATIALITE_DECLARE void | remove_duplicated_rows (sqlite3 *sqlite, char *table) |
Remove duplicated rows from a table. | |
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 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 int | update_layer_statistic (sqlite3 *sqlite, const char *table, const char *column) |
Updates the LAYER_STATICS metadata table. |
Main SpatiaLite header file.
SPATIALITE_DECLARE void check_duplicated_rows | ( | sqlite3 * | sqlite, |
char * | table, | ||
int * | dupl_count | ||
) |
Checks for duplicated rows into the same table.
sqlite | handle to current DB connection |
table | name of the table to be checked |
dupl_count | on completion will contain the number of duplicated rows found |
value (excluding any Primary Key column) is exacly the same
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.
sqlite | handle to current DB connection |
table | the name of the table to be exported |
dbf_path | pathname of the DBF to be exported |
charset | a valid GNU ICONV charset to be used for DBF text strings |
err_msg | on completion will contain an error message (if any) |
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.
sqlite | handle to current DB connection |
table | the name of the table to be exported |
geom_col | the name of the geometry column |
outfile_path | pathname for the GeoJSON file to be written to |
precision | number of decimal digits for coordinates |
option | the format to use for output |
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.
sqlite | handle to current DB connection |
table | the name of the table to be exported |
geom_col | the name of the geometry column |
kml_path | pathname of the KML file to be exported |
name_col | column to be used for KML "name" (may be null) |
desc_col | column to be used for KML "description" (may be null) |
precision | number of decimal digits for coordinates |
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.
sqlite | handle to current DB connection |
table | the name of the table to be exported |
column | the name of the geometry column |
shp_path | pathname of the Shapefile to be exported (no suffix) |
charset | a valid GNU ICONV charset to be used for DBF text strings |
geom_type | "POINT", "LINESTRING", "POLYGON", "MULTIPOLYGON" or NULL |
verbose | if TRUE a short report is shown on stderr |
rows | on completion will contain the total number of actually exported rows |
err_msg | on completion will contain an error message (if any) |
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.
sqlite | handle to current DB connection |
inTable | name of the input table |
geometry | name of the Geometry column |
outTable | name of the output table to be created |
pKey | name of the Primary Key column in the output table |
multiId | name of the column identifying origins in the output table |
SPATIALITE_DECLARE int is_kml_constant | ( | sqlite3 * | sqlite, |
char * | table, | ||
char * | column | ||
) |
Checks if a column is actually defined into the given table.
sqlite | handle to current DB connection |
table | the table to be checked |
column | the column to be checked |
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.
sqlite | handle to current DB connection |
dbf_path | pathname of the DBF file to be imported |
table | the name of the table to be created |
charset | a valid GNU ICONV charset to be used for DBF text strings |
verbose | if TRUE a short report is shown on stderr |
rows | on completion will contain the total number of actually exported rows |
err_msg | on completion will contain an error message (if any) |
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.
sqlite | handle to current DB connection |
shp_path | pathname of the Shapefile to be imported (no suffix) |
table | the name of the table to be created |
charset | a valid GNU ICONV charset to be used for DBF text strings |
srid | the SRID to be set for Geometries |
column | the name of the geometry column |
coerce2d | if TRUE any Geometry will be casted to 2D [XY] |
compressed | if TRUE compressed Geometries will be created |
verbose | if TRUE a short report is shown on stderr |
spatial_index | if TRUE an R*Tree Spatial Index will be created |
rows | on completion will contain the total number of actually exported rows |
err_msg | on completion will contain an error message (if any) |
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.
sqlite | handle to current DB connection |
path | pathname of the spreadsheet file to be imported |
table | the name of the table to be created |
worksheetIndex | the index identifying the worksheet to be imported |
first_titles | if TRUE the first line is assumed to contain column names |
rows | on completion will contain the total number of actually exported rows |
err_msg | on completion will contain an error message (if any) |
SPATIALITE_DECLARE sqlite3_int64 math_llabs | ( | sqlite3_int64 | value | ) |
A portable replacement for C99 llabs()
value | a 64 bit integer value |
SPATIALITE_DECLARE double math_round | ( | double | value | ) |
A portable replacement for C99 round()
value | a double value |
SPATIALITE_DECLARE void remove_duplicated_rows | ( | sqlite3 * | sqlite, |
char * | table | ||
) |
Remove duplicated rows from a table.
sqlite | handle to current DB connection |
table | name of the table to be cleaned |
SPATIALITE_DECLARE int spatial_ref_sys_init | ( | sqlite3 * | sqlite, |
int | verbose | ||
) |
Inserts the inlined EPSG dataset into the "spatial_ref_sys" table.
sqlite | handle to current DB connection |
verbose | if TRUE a short report is shown on stderr |
SPATIALITE_DECLARE void spatialite_cleanup | ( | ) |
Cleanup spatialite.
This function performs general cleanup, essentially undoing the effect of spatialite_init().
SPATIALITE_DECLARE void spatialite_init | ( | int | verbose | ) |
SPATIALITE_DECLARE int update_layer_statistic | ( | sqlite3 * | sqlite, |
const char * | table, | ||
const char * | column | ||
) |
Updates the LAYER_STATICS metadata table.
sqlite | handle to current DB connection |
table | name of the table to be processed |
column | name of the geometry to be processed |