Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Frontend GIS
  3. spl.js

spl.js

GPL-3.0JavaScript

SpatiaLite 5.1.1-rc0 with SQLite, GEOS, PROJ, and RTTOPO compiled to WebAssembly for Node.js and browser environments.

GitHubGitHub
191 stars20 forks0 contributors

What is spl.js?

spl.js is a JavaScript library that compiles SpatiaLite and its dependencies (SQLite, GEOS, PROJ, RTTOPO) to WebAssembly, enabling advanced geospatial database operations in Node.js and web browsers. It solves the problem of performing complex spatial analyses, transformations, and queries directly in JavaScript environments without relying on external servers.

Target Audience

Geospatial developers and data scientists who need to perform spatial SQL queries, geometry processing, or coordinate transformations in Node.js applications or client-side web mapping tools.

Value Proposition

Developers choose spl.js because it provides the complete SpatiaLite feature set in JavaScript with a unified API, supports multiple geospatial formats natively, and offers extensibility through custom Web Worker extensions, all while maintaining near-native performance.

Overview

SpatiaLite for browser & node

Use Cases

Best For

  • Performing spatial SQL queries on GeoPackage files in a web application
  • Transforming coordinate systems (e.g., WGS84 to Web Mercator) in Node.js
  • Importing and processing zipped Shapefiles directly in the browser
  • Creating topologies and simplifying geometries for web mapping
  • Running SpatiaLite functions like buffer, intersection, or distance calculations client-side
  • Building geospatial data processing pipelines that work both server-side and client-side

Not Ideal For

  • Applications requiring real-time, high-performance spatial computations on large datasets, as browser performance is ~50% of native due to WebAssembly overhead
  • Firefox-only web applications, due to a known bug with range requests that breaks GitHub Pages examples
  • Projects needing extensive PROJ database support out-of-the-box, as the full proj.db requires manual mounting and path configuration
  • Simple geospatial tasks like basic GeoJSON manipulation, where lighter libraries like Turf.js are more efficient

Pros & Cons

Pros

Full SpatiaLite Feature Set

Includes SpatiaLite 5.1.1-rc0 with SQLite, GEOS, PROJ, and RTTOPO, enabling advanced operations like topology creation and coordinate transformations directly in JavaScript.

Cross-Platform API Consistency

Provides identical synchronous API for Node.js and asynchronous API for browsers via Web Workers, simplifying code reuse across server and client environments.

Native Geospatial Format Support

Automatically handles JSON, GeoJSON, WKB, and supports importing GeoPackage and zipped Shapefiles, as shown in examples loading London boroughs and lights data.

Virtual Filesystem Flexibility

Allows mounting local or remote files (including URLs) for read/write operations, enabling database imports and exports without server dependencies.

Cons

Large Browser Bundle Size

The WebAssembly file is ~4.5MB (~3.4MB gzipped), which can significantly impact initial load times and bandwidth usage in web applications.

Performance Overhead in Browsers

Benchmarks show browser performance is ~50% of native SpatiaLite due to WebWorker communication and WebAssembly limitations, affecting compute-intensive tasks.

Complex PROJ Database Setup

The default proj.db is minimal; using the full version requires manual mounting and path setting with spatialite functions, adding configuration steps.

Browser Compatibility Issues

Firefox has a known bug with range requests that breaks live examples, limiting cross-browser support without workarounds.

Frequently Asked Questions

Quick Stats

Stars191
Forks20
Contributors0
Open Issues1
Last commit3 months ago
CreatedSince 2021

Tags

#webassembly#geospatial#geometry#gis#spatialite#nodejs#sqlite#browser#spatial-database

Built With

E
Emscripten
S
SQLite
T
TypeScript
W
WebAssembly
S
Spatialite
G
GEOS
P
PROJ

Included in

Frontend GIS675
Auto-fetched 1 day ago

Related Projects

Turf.jsTurf.js

A modular geospatial engine written in JavaScript and TypeScript

Stars10,362
Forks1,006
Last commit2 days ago
topoJSONtopoJSON

An extension of GeoJSON that encodes topology! 🌐

Stars4,903
Forks684
Last commit1 year ago
geolibgeolib

Zero dependency library to provide some basic geo functions

Stars4,274
Forks338
Last commit1 month ago
rbushrbush

RBush — a high-performance JavaScript R-tree-based 2D spatial index for points and rectangles

Stars2,745
Forks251
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub