Before executing SQL commands that contain ST_Geometry functions against an SQLite database, do the following:
- Install an SQL editor (such as SQLite3.exe) on the same machine where you have an ArcGIS client installed.
- On the same machine, set the PATH (Windows) or LIBPATH (Linux) system environment variable to the ArcGIS client bin directory.
- Load the ST_Geometry library so the SQL editor can access the ST_Geometry functions.
- Log in to a machine where an ArcGIS client, such as ArcGIS Desktop or ArcGIS Server is installed.
- Add the path to the bin directory of your ArcGIS client to the machine's PATH (Windows) or LIBPATH (Linux) variable.
For example, if you installed ArcGIS Desktop in the default location, set the PATH variable to C:\Program Files (x86)\ArcGIS\Desktop<release number>\bin.
- Open the SQL editor and connect to your SQLite database.
- Load the ST_Geometry library.
These examples load the ST_Geometry library. The first one loads it on a Windows machine where ArcGIS Desktop is installed. The second loads the library on a Linux machine where ArcGIS Server is installed.
--Load the ST_Geometry library on Windows. SELECT load_extension( 'c:\Program Files (x86)\ArcGIS\Desktop10.3\DatabaseSupport\SQLite\Windows32\stgeometry_sqlite.dll', 'SDE_SQL_funcs_init' ); --Load the ST_Geometry library on Linux. SELECT load_extension( '/arcgis/server/usr/DatabaseSupport/SQLite/Linux64/libstgeometry_sqlite.so', 'SDE_SQL_funcs_init' );
You can now execute SQL commands that contain ST_Geometry functions.