spl.js bundles SpatiaLite 5.1.1-rc0 with SQLite 3.51.1, GEOS 3.14.1, PROJ 9.7.1, and rttopo 1.1.0 for spatial operations in Node.js (sync API) and browsers (async API). Released under ISC license, it provides a unified API for managing spatial databases, importing GeoPackage and Shapefile formats, and handling GeoJSON/JSON transparently. Key differentiators: includes a minimal proj.db for Web Mercator and UTM, supports custom extensions, and auto-detects JSON/GeoJSON bindings. The WASM binary is ~4.5MB gzipped and ships TypeScript definitions. Release cadence is ongoing with version 1.0.1 as of 2025.
npm install spl.jsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to initialize SPL, create an in-memory database, retrieve SpatiaLite version, and perform basic CRUD operations using prepared statements.
Use Chrome or Safari for examples hosted on GitHub Pages, or serve with correct Content-Encoding headers.
Check SpatiaLite changelog and test extensively before production use.
Disable autoGeoJSON option or handle objects explicitly.
Always use async/await for cross-platform compatibility.
Use spl.fs.mount('proj', [...]) and call PROJ_SetDatabasePath('/proj/proj.db').Run 'npm install spl.js' and ensure import uses 'spl.js' not 'spl'.
Use 'const spl = await SPL()' before calling spl.db().
Ensure the server serves WASM with correct MIME type (application/wasm) and has CORS headers.
No dependency data recorded yet.