What's New
v5.1 (in development)
-
OGC CRS identifiers and authority axis order.
getCRS()andcreateProjection()accept the OGC URN and URI forms of the built-in identifiers, such asurn:ogc:def:crs:EPSG::32631, andOGC:CRS84(alsoCRS:84and the CRS84 URN and URI). The newgetCRSAuthorityAxisOrder()in@math.gl/geospatial/crsgives the axis order that the CRS authority defines (xyoryx). It reads PROJJSON and WKT axes, and it has a small table of EPSG and OGC identifiers. Use it to build OGC service requests. -
Line networks.
@math.gl/geospatial/line-networkbuilds a graph from longitude, latitude lines in typed-array columns. It snaps endpoints, joins dangling ends to nearby lines (T-junctions), and can split lines at shared vertices and at crossings. Helpers build a CSR adjacency and turn a predecessor array into route edges and route geometry. Uses include road, river, rail, utility and track-line networks. -
Solar image coordinates. The Thompson (2006) transforms between heliographic, heliocentric and helioprojective coordinates convert the points of a solar image.
isOnVisibleSidetests the exact limb.getSolarObserver(tt)in@math.gl/earth/celestialgives the distance, B0, L0, P and the Carrington rotation number of the Sun as the Earth sees it. It uses the IAU Sun model and the approximate position of the Earth. -
CTD casts.
@math.gl/earth/oceanconverts conductivity to Practical Salinity (PSS-78 with the Hill low-salinity extension) and back. It computes potential temperature, potential density and the buoyancy frequency squared N² of a cast. It also computes the dynamic height anomaly of a cast and the geostrophic velocity between two casts. Each function matches its reference within the gates on the CTD page.
v5.0
math.gl 5 expands the library from vectors and matrices to coordinate transformations, global grids, geometry processing, and Earth science. Related APIs are grouped into seven packages with focused imports. See the Upgrade Guide when moving an application from v4.
Highlights
- Coordinate transformations. The projection engine supports a broad set of projections, datum grids, and coordinate operations. CRS tools handle authority codes, WKT, PROJ, and PROJJSON.
- Global grids and terrain. DGGS gives A5, GeoHash, H3, Plus Codes, Quadkey, and S2 a common decoder API. Terrain adds tools for meshing elevation data and analyzing slopes, drainage, and visibility.
- Geometry and Arrow. Read and write WKB and WKT, work with GeoArrow buffers, and use polygon tools to tessellate, clip, and refine meshes.
- SQL and visualization. SQL queries Apache Arrow tables, computes spatial columns, and resolves visualization scales. Core color tools provide reusable palettes, color conversions, scales, and lookup tables.
- Earth and sky. Earth adds Moon and star calculations, timezone lookup, and seawater properties.
- Worker threads. Tasks runs heavy computations on worker threads.
v4.1
Added more precise array and bounds types, and made the array guards narrow types in TypeScript.
v4.0
Added ES module support alongside CommonJS. Adapted numerical kernels replaced the
gl-matrix dependency.
v3.6
Converted the library to TypeScript and added shared numeric array types.
v3.5
Added field-of-view options for Web Mercator, polygon triangulation, and a common transform API for bounding volumes.
v3.4
Added geoid height models and support for polygon operations on flat arrays.
v3.3
Added proj4-backed coordinate transformations.
v3.2
Published TypeScript declarations for all packages and added polygon clipping.
v3.1
Brought Web Mercator viewport utilities into math.gl.
v3.0
Introduced ellipsoid math and bounding volumes for culling, and standardized vector and matrix transforms.
v2.3
Added Matrix3, matrix scaling, and quaternion-to-Euler conversion.
v2.2
Reduced bundle size and fixed typed-array detection.
v2.1
Added support for reconstructing a serialized Pose and fixed column-major matrix element writes.
v2.0
Made experimental classes individually importable under underscore-prefixed names.
v1.2
Added lerp and the experimental Pose class.
v1.1
Added Matrix4.orthographic(), improved THREE.js compatibility, and reduced bundle size.
v1.0
Initial release of the vector and matrix library.
For release-by-release details, see the changelog.