License
gdal3.js is released under the MIT License. The build you actually ship is LGPL-2.1-or-later by default (because it bundles a few LGPL libraries), but you can configure a fully permissive build if you need one.
The short version
- Released under the MIT License. Everything authored in this repo (the JS API, the C++/embind bridge, the build tooling) is MIT-licensed.
- The default build is LGPL-2.1-or-later. The prebuilt wasm and native packages compile in GEOS, SpatiaLite and libiconv, which are LGPL, so the artifact you distribute is covered by the LGPL.
- A permissive build is possible. Override the cpp.js config to leave those libraries out and the result is MIT/BSD only, with no copyleft obligations.
What it means for your app
Using the default (LGPL) build in a commercial, closed-source application is fine: your own application code stays closed and does not need to be published. LGPL is a weak copyleft: its obligations apply to the LGPL libraries themselves, not to your code. In practice:
- Keep the engine replaceable: ship GDAL/GEOS as a module a user could substitute with their own build, or provide the object files to relink against.
- If you modify GEOS, SpatiaLite or libiconv themselves, publish those changes under their license.
- Include the bundled libraries' license notices in your distribution.
This is not legal advice; if your distribution model is unusual (for example a fully static single-file bundle), confirm the details with a license expert.
Bundled libraries
The default build compiles in the components below. Only the three marked copyleft create LGPL obligations; everything else is permissive.
| Component | Version | License | Copyleft |
|---|---|---|---|
| gdal3.js (this project) | 3.0.0-beta.10 | MIT | No |
| GDAL | 3.13.1 | MIT/X | No |
| PROJ | 9.8.1 | MIT | No |
| GEOS | 3.14.1 | LGPL-2.1+ | yes |
| SpatiaLite | 5.1.0 | MPL / GPL / LGPL | yes |
| libiconv | 1.19 | LGPL | yes |
| SQLite | 3.53.2 | Public domain | No |
| libtiff | 4.7.1 | libtiff (BSD-like) | No |
| libjpeg-turbo | 3.1.4.1 | BSD-3 / IJG | No |
| libwebp | 1.6.0 | BSD-3 | No |
| Zstd | 1.5.7 | BSD-3 | No |
| LERC | 4.1.0 | Apache-2.0 | No |
| libgeotiff | 1.7.4 | MIT | No |
| Expat | 2.8.1 | MIT | No |
| zlib | 1.3.2 | zlib | No |
| curl | 8.20.0 | curl (MIT-like) | No |
| OpenSSL | 4.0.1 | Apache-2.0 | No |
| Emscripten | toolchain | MIT/NCSA | No |
| cpp.js | 2.0.0-beta.23 | MIT | No |
A permissive-only build
For an artifact with no copyleft at all, override the cpp.js config to exclude the three LGPL components: GEOS, SpatiaLite and libiconv. What remains (GDAL, PROJ, the codecs, SQLite, …) is MIT/BSD/permissive, so the resulting build carries no LGPL obligation.
The trade-off is functional: dropping GEOS removes geometry operations (much of OGR's processing), SpatiaLite removes the SpatiaLite database driver, and libiconv removes some character-encoding conversions. See configuration for how to override dependencies.
GPL → LGPL history
The project started under the GPL and moved to the LGPL early on by community request (issue #36) so that it could be used in closed-source applications.