// the take
Geolib is a zero-dependency TypeScript library for 2D geospatial calculations: distances, bearings, polygon containment, bounding boxes, and coordinate format conversion. It targets any JavaScript environment — browser, Node, bundlers — and covers the 80% of geo math that most apps actually need without pulling in a full GIS stack. The 3.x rewrite cleaned up years of inconsistent API debt and made everything pure functions.
1. Every function is pure and side-effect-free — same inputs, same outputs, easy to test and compose. 2. Dual formula support for distance: fast Haversine (getDistance) vs. slower Vincenty (getPreciseDistance), with the slower one injectable into any function that uses distance internally. 3. Flexible coordinate input — accepts lat/lng object variants, GeoJSON arrays, and sexagesimal strings interchangeably, which saves you from writing a normalizer. 4. Tree-shakeable ES module build: each function lives in its own file, so bundlers can strip everything you don't use.
1. Strictly 2D — altitude is explicitly unsupported, which is a hard blocker for anything involving elevation, 3D routing, or drone/flight use cases. 2. isPointInPolygon uses a basic ray-casting algorithm with no handling for complex polygons (self-intersecting, holes, antimeridian crossing) — the removed isPointInsideRobust was the honest signal here. 3. findNearest is O(n) because it just wraps orderByDistance — fine for small arrays, unusable if you're querying thousands of points and need spatial indexing. 4. Last meaningful feature work appears to have stalled; the changelog shows no new functions added since the 3.0 rewrite, and the 2D limitation has been on the roadmap but unaddressed for years.
We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →