sqlite-tg is an experimental SQLite extension for limited geospatial operations, currently at version 0.0.1-alpha.19. Released as alpha with no fixed cadence, it provides basic geospatial functions (e.g., point-in-polygon, distance) via a loadable extension. Ship TypeScript types. Differentiators: lightweight, no external dependencies, integrates directly with SQLite. Not suitable for production or complex spatial analysis.
npm install sqlite-tgNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to load the sqlite-tg extension, use tg_version() and a geospatial function (point_in_polygon) with better-sqlite3.
Pin exact version and test thoroughly before upgrading.
Use import syntax or dynamic import().
Ensure your platform has a prebuilt binary or install build tools (node-gyp, cmake).
Check documentation for supported functions before adopting.
Call db.loadExtension('tg') after opening the database.npm install sqlite-tg and ensure your project uses ESM (type: module in package.json or .mjs extension).
Use better-sqlite3 or node-sqlite3 which support loadExtension.
Call db.loadExtension('tg') after database connection and ensure the extension binary is installed.Replace require with import or use dynamic import().
No dependency data recorded yet.