SpatiaLite  3.0.0-stable
src/headers/spatialite.h
Go to the documentation of this file.
00001 /* 
00002  spatialite.h -- Gaia spatial support for SQLite 
00003   
00004  version 3.0, 2011 July 20
00005 
00006  Author: Sandro Furieri a.furieri@lqt.it
00007 
00008  ------------------------------------------------------------------------------
00009  
00010  Version: MPL 1.1/GPL 2.0/LGPL 2.1
00011  
00012  The contents of this file are subject to the Mozilla Public License Version
00013  1.1 (the "License"); you may not use this file except in compliance with
00014  the License. You may obtain a copy of the License at
00015  http://www.mozilla.org/MPL/
00016  
00017 Software distributed under the License is distributed on an "AS IS" basis,
00018 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00019 for the specific language governing rights and limitations under the
00020 License.
00021 
00022 The Original Code is the SpatiaLite library
00023 
00024 The Initial Developer of the Original Code is Alessandro Furieri
00025  
00026 Portions created by the Initial Developer are Copyright (C) 2008
00027 the Initial Developer. All Rights Reserved.
00028 
00029 Contributor(s):
00030 
00031 Alternatively, the contents of this file may be used under the terms of
00032 either the GNU General Public License Version 2 or later (the "GPL"), or
00033 the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00034 in which case the provisions of the GPL or the LGPL are applicable instead
00035 of those above. If you wish to allow use of your version of this file only
00036 under the terms of either the GPL or the LGPL, and not to allow others to
00037 use your version of this file under the terms of the MPL, indicate your
00038 decision by deleting the provisions above and replace them with the notice
00039 and other provisions required by the GPL or the LGPL. If you do not delete
00040 the provisions above, a recipient may use your version of this file under
00041 the terms of any one of the MPL, the GPL or the LGPL.
00042  
00043 */
00044 
00050 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00051 #ifdef DLL_EXPORT
00052 #define SPATIALITE_DECLARE __declspec(dllexport)
00053 #else
00054 #define SPATIALITE_DECLARE extern
00055 #endif
00056 #endif
00057 
00058 #ifndef _SPATIALITE_H
00059 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00060 #define _SPATIALITE_H
00061 #endif
00062 
00063 #ifdef __cplusplus
00064 extern "C"
00065 {
00066 #endif
00067 
00071     SPATIALITE_DECLARE const char *spatialite_version (void);
00072 
00082     SPATIALITE_DECLARE void spatialite_init (int verbose);
00083 
00092     SPATIALITE_DECLARE void spatialite_cleanup ();
00093 
00109     SPATIALITE_DECLARE int dump_shapefile (sqlite3 * sqlite, char *table,
00110                                            char *column, char *shp_path,
00111                                            char *charset, char *geom_type,
00112                                            int verbose, int *rows,
00113                                            char *err_msg);
00114 
00133     SPATIALITE_DECLARE int load_shapefile (sqlite3 * sqlite, char *shp_path,
00134                                            char *table, char *charset, int srid,
00135                                            char *column, int coerce2d,
00136                                            int compressed, int verbose,
00137                                            int spatial_index, int *rows,
00138                                            char *err_msg);
00139 
00153     SPATIALITE_DECLARE int load_dbf (sqlite3 * sqlite, char *dbf_path,
00154                                      char *table, char *charset, int verbose,
00155                                      int *rows, char *err_msg);
00156 
00168     SPATIALITE_DECLARE int dump_dbf (sqlite3 * sqlite, char *table,
00169                                      char *dbf_path, char *charset,
00170                                      char *err_msg);
00171 
00185     SPATIALITE_DECLARE int load_XL (sqlite3 * sqlite, const char *path,
00186                                     const char *table,
00187                                     unsigned int worksheetIndex,
00188                                     int first_titles, unsigned int *rows,
00189                                     char *err_msg);
00190 
00198     SPATIALITE_DECLARE double math_round (double value);
00199 
00207     SPATIALITE_DECLARE sqlite3_int64 math_llabs (sqlite3_int64 value);
00208 
00220     SPATIALITE_DECLARE int spatial_ref_sys_init (sqlite3 * sqlite, int verbose);
00221 
00233     SPATIALITE_DECLARE int
00234         is_kml_constant (sqlite3 * sqlite, char *table, char *column);
00235 
00249     SPATIALITE_DECLARE int dump_kml (sqlite3 * sqlite, char *table,
00250                                      char *geom_col, char *kml_path,
00251                                      char *name_col, char *desc_col,
00252                                      int precision);
00253 
00266     SPATIALITE_DECLARE void check_duplicated_rows (sqlite3 * sqlite,
00267                                                    char *table,
00268                                                    int *dupl_count);
00269 
00281     SPATIALITE_DECLARE void remove_duplicated_rows (sqlite3 * sqlite,
00282                                                     char *table);
00283 
00301     SPATIALITE_DECLARE void elementary_geometries (sqlite3 * sqlite,
00302                                                    char *inTable,
00303                                                    char *geometry,
00304                                                    char *outTable, char *pKey,
00305                                                    char *multiId);
00306 
00327     SPATIALITE_DECLARE int dump_geojson (sqlite3 * sqlite, char *table,
00328                                          char *geom_col, char *outfile_path,
00329                                          int precision, int option);
00330 
00352     SPATIALITE_DECLARE int update_layer_statistic (sqlite3 * sqlite,
00353                                                    const char *table,
00354                                                    const char *column);
00355 
00356 #ifdef __cplusplus
00357 }
00358 #endif
00359 
00360 #endif                          /* _SPATIALITE_H */
 All Data Structures Files Functions Variables Typedefs Defines