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 build with permissive licenses only 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, so the artifact bundles only the permissively-licensed components.
What it means for your app
The default build is LGPL-2.1-or-later because it bundles GEOS, SpatiaLite and libiconv. What the LGPL requires of you, and whether it fits your distribution (commercial, closed-source, statically bundled or otherwise), is for you to determine against the actual license texts. As a non-exhaustive pointer to what the LGPL commonly involves, not a legal conclusion:
- The LGPL components generally need to stay replaceable, for example shipped as a substitutable module or as object files you can relink against.
- Changes to GEOS, SpatiaLite or libiconv themselves fall under those libraries' own licenses.
- Each bundled library's license notices generally have to travel with your distribution.
Read the license texts of gdal3.js and every bundled component, confirm they fit your distribution model, and consult a qualified license expert for your specific case. The responsibility for compliance is yours.
Bundled libraries
The default build compiles in the components below. Three are marked copyleft (LGPL); the rest carry permissive licenses. Each component's own license is the authoritative source for its terms.
| Component | Version | License | Copyleft |
|---|---|---|---|
| gdal3.js (this project) | 3.0.0 | 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 |
Excluding the copyleft libraries
To exclude the copyleft components, override the cpp.js config to drop the three LGPL libraries: GEOS, SpatiaLite and libiconv. What remains (GDAL, PROJ, the codecs, SQLite, …) carries MIT/BSD/permissive licenses. Confirm the resulting license set against each component before you rely on it.
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, at the community's request (issue #36).