Add the ST_Geometry type to an SQLite database

You can use the CreateOGCTables SQL function to add the ST_Geometry type to an existing SQLite database.

The database file must have an .sqlite extension; therefore, if the database you want to use has a different extension, rename it. For example, if the database is named projdata.d1, rename it to projdata.sqlite before adding the ST_Geometry type to it.

Steps:
  1. If necessary, rename the database file to have the extension .sqlite.
  2. Connect to the database using an SQL editor, such as sqlite3.exe.
  3. Load the ST_Geometry library.

    SELECT load_extension('stgeometry_sqlite.dll','SDE_SQL_funcs_init');
    

  4. Call the CreateOGCTables function to add the ST_Geometry tables to the database.

    SELECT CreateOGCTables();
    

2/5/2015