Enable ST_GEOMETRY in mobile geodatabase using GP Tool

271
1
03-31-2023 09:41 PM
Status: Closed
Labels (1)
Bud
by
Notable Contributor

Could an OOTB tool be created for enabling ST_GEOMETRY in mobile geodatabases? Either a geoprocessing tool or a tool in the right-click menu of Catalog?

Otherwise, it's a bit tricky to enable ST_GEOMETRY in mobile geodatabases for non SQLite experts. See Load ST_GEOMETRY .dll extension into SQLite/mobile geodatabase — Error: "not authorized".

We have a similar tool for enabling ST_GEOMETRY in enterprise databases: Create Spatial Type (Data Management). It would help to have a tool like that for mobile gdbs too.

Thanks.

1 Comment
SSWoodward
Status changed to: Closed

@Bud 

Unfortunately, SQLite differs from Enterprise Databases. A SQLite database (such as a Mobile Geodatabase) is just a file and SQLite is just a library.

Our ST_Geometry on SQLite consists of a dynamic library that extents the SQLite library, a virtual table and two physical tables. When we create a SQLite ST_Geometry library (including Mobile Geodatabases) we create those tables. To use it, you have to tell an application built with the SQLite library to load that dynamic library.

While you can install software persistently in a known location for PostgreSQL or Oracle and the server will pick it up, there is no server for SQLite and no such known location to load the extension library from. So unless changes were made to the SQLite library itself to automatically load extension libraries from some location (perhaps from within a database), this wouldn't be possible.

Unfortunately, such an approach would be quite insecure and a vector for malware (it isn’t for PostgreSQL or Oracle because you need admin privileges to install such code there). It would be up to SQLite’s maintainers to make such a change.