Turf
A strong pick. 6th of 8 map libraries.
Turf is the standard JavaScript library for geospatial analysis on GeoJSON: distances, areas, buffers, boolean tests, clustering and more. It draws no maps. Use it next to a map renderer such as MapLibre or Leaflet. For the analysis side of map work it is the default pick today, kept up by a small volunteer team.
Best for: Any JS/TS project that needs to measure, test or transform GeoJSON shapes in the browser or in Node, next to whatever map renderer it uses.
Scores
Overall7.6
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
Turf is the clear default for geospatial analysis in JS and has no real peer in this bundle, since the other projects render maps. It is well maintained for a volunteer project, but its correctness edge cases, thin funding and below-median growth keep it out of the top tier.
- github.com/Turfjs/turf/releases: Active v7 releases with correctness fixes.
- npm-compare.com/@turf/turf,d3-geo,geolib,jsts,leaflet,turf: The broadest of the JS geo-analysis libraries.
- npm downloadsLast4Weeks: High use, but growth is below the median.
GPT-6.2 Sol: 7.6, likely 6.4 to 8.7
Turf is a strong pick for new projects that need browser or Node.js GeoJSON calculations. Its typed modules pair well with MapLibre GL JS for vector maps or OpenLayers for projects that need more control over map layers and projections. Version 7.4 shows ongoing maintenance, while known geometry edge cases and recent upgrade regressions limit how confidently it can be recommended across workloads.
- turfjs.org/docs/getting-started: Typed modules support browser and Node.js projects.
- maplibre.org/maplibre-gl-js/docs: MapLibre covers interactive vector-map rendering.
- openlayers.org/en/latest/examples/turf.html: Working example combines Turf calculations with OpenLayers layers and projections.
- github.com/Turfjs/turf/releases: Current releases fix geometry bugs and document compatibility changes.
- github.com/Turfjs/turf/issues/3008: A user reported that a patch changed line-snapping results and broke their code.
Needed by many4.0
How many developers need a tool for this job?
Claude Opus 5.5: 4.5, likely 3.5 to 5.5
Turf serves developers who work with places, shapes and distances. That is a clear but sizeable niche inside web development. It runs with any map renderer, in the browser and in Node, so it is not tied to one framework. Many map apps only show markers and never need analysis, which keeps the score in the middle.
- docs.2gis.com/en/mapgl/turfjs: Shows typical uses inside map apps: bbox, buffer, union and nearest point.
- dependents: 2,480 repos and 1,059 packages, a niche-sized footprint next to Leaflet's 50k repos.
GPT-6.2 Sol: 3.5, likely 2.4 to 4.7
Turf serves a clear niche within mapping: projects that need to calculate something from geographic data. It works in browsers and Node.js across frameworks, while interactive display requires a renderer. The available mapping survey describes what map developers need and gives little basis for estimating that group's share of all JavaScript developers.
- turfjs.org/docs/getting-started: Browser and Node.js support with standard GeoJSON inputs.
- static1.bocoup.com/assets/2022/06/08184851/Bocoup-Web-Maps-Research-Summary-March-2022.pdf: Survey of 78 respondents highlighted display and interaction needs.
- openlayers.org/en/latest/examples/turf.html: OpenLayers draws features that Turf calculates.
Helps a lot7.8
How well does it do the job for those who need it?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
Turf has the broadest set of GeoJSON analysis functions in JS. It is easy to use, it is typed, and AI agents know it well. The v7 releases fixed many correctness bugs, but its boolean and overlay functions have a history of edge-case errors and reverted fixes. Its approximations, such as buffer, are weak at large scale. JSTS is more rigorous for heavy topology work but much harder to use.
- github.com/Turfjs/turf/releases: v7.4.0 brings many boolean-* correctness fixes. v7.3.x reverted regressions.
- npm-compare.com/@turf/turf,d3-geo,geolib,jsts,leaflet,turf: The broadest analysis toolkit compared with jsts, geolib and d3-geo, but heavy on large data.
- lightrun.com/answers/turfjs-turf-new-turf-union-returns-a-strange-polygon: Users report odd union results.
- docs.2gis.com/en/mapgl/turfjs: Says buffer is reliable only for short distances.
- npm hasTypes: Ships its own TypeScript types.
GPT-6.2 Sol: 8.0, likely 6.8 to 9.0
Turf 7.4 covers common GeoJSON calculations with typed functions and worked examples that give coding agents clear signatures to follow. The release fixes several containment cases, and users still report incorrect results near the date line. An independent point-in-polygon benchmark found Turf fast in absolute terms and slower than GEOS-WASM on that test. Its age and narrow workload leave performance across the rest of Turf uncertain.
- turfjs.org/docs/api/buffer: Versioned API reference documents inputs, units, and empty results.
- github.com/Turfjs/turf/releases: Version 7.4 fixes containment cases and speeds up polygonization.
- github.com/Turfjs/turf/issues/3039: Open report on bounding boxes across the date line.
- github.com/chrispahm/contains-benchmark/blob/main/README.md: One 2024 point-in-polygon test measured 21 ms for Turf and 6 ms for GEOS-WASM.
Holds up over time6.8
Will it still be a good choice in two years?
Claude Opus 5.5: 6.5, likely 5.5 to 7.5
Maintenance is active: 135 commits and 6 releases in the last year, a push four days before the read date, and many first-time contributors. Work rests mostly on two volunteer maintainers. Open Collective shows a budget of about $944 a year. Breaking changes are rare, but some patches had to be reverted. No successor threatens it.
- github commitsLastYear / releasesLastYear: 135 commits and 6 releases.
- opencollective.com/turf: About $944 a year in estimated budget; Mapbox was a past sponsor.
- github.com/Turfjs/turf/releases: mfedderly and smallsaucepan carry most releases.
- scorecard Maintained: Scores 9.
GPT-6.2 Sol: 7.0, likely 5.8 to 8.2
Six releases, 135 commits, and a November push show active maintenance. Core fixes and release work are concentrated among a few contributors, and public donation funding is modest. Recent releases repaired CommonJS and type regressions, while an open line-snapping fix is planned for v8. The backlog and uneven turnaround leave some uncertainty about upgrade costs.
- github commitsLastYear, releasesLastYear, pushedAt, openIssues, openPullRequests: 135 commits, six releases, 239 open issues, and 64 open pull requests.
- github.com/Turfjs/turf/releases: Release history shows regular fixes and several compatibility repairs.
- github.com/Turfjs/turf/issues/3023: An endpoint-index fix is waiting for the next major release.
- opencollective.com/turf: The public collective estimates an annual budget of about $944.
Used widely5.7
How many use it, and is that growing?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
The umbrella package has about 9.3M downloads every 4 weeks, and many projects install single @turf/* modules on top of that. Its downloads grew by a ratio of 2.9, below the 4.1 median, so it is losing ground in relative terms. The dependents count is moderate. Turf is still the analysis library that most map projects pick.
- npm downloadsLast4Weeks: 9.26M now against 3.20M a year ago, a ratio of 2.9 against the 4.1 median.
- dependents: 2,480 repos and 1,059 packages.
- github stars: 10.5k stars.
GPT-6.2 Sol: 4.4, likely 3.2 to 5.8
The main package rose from 3.20 million to 9.26 million installs in four weeks, a 2.90× increase that trails the 4.1× catalog baseline. The 2,480 observed dependent repositories put Turf above MapLibre GL JS and deck.gl in this index, and well below Leaflet and OpenLayers. Automated and indirect installs inflate the package count, while individual modules and CDN loads escape it. With no matched posts in the supplied Hacker News or Bluesky data, recent direct adoption is hard to pin down.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: Install growth trailed the catalog baseline.
- dependents, github stars, peers, hackerNews, bluesky: 2,480 repositories, 1,059 packages, 10,552 stars, and no matched social posts.
- turfjs.org/docs/getting-started: Documents individual modules and direct CDN loading.
Vouched for6.8
Who stands behind it being good?
Claude Opus 5.5: 6.0, likely 4.5 to 7.5
Turf has long been recommended in the docs of map vendors such as Mapbox and 2GIS, and Mapbox funded it in the past. Independent comparisons treat it as the go-to toolkit for GeoJSON analysis. There is little current survey data or independent benchmarking, and it gets almost no attention on HN or Bluesky.
- docs.2gis.com/en/mapgl/turfjs: A map vendor recommends Turf for working with GeoJSON.
- opencollective.com/turf: Mapbox is the largest organisational backer.
- bluesky posts / hackerNews stories: 0 for both.
- Mapbox/MapLibre examples: Turf appears often in official map examples.
GPT-6.2 Sol: 7.5, likely 6.2 to 8.6
Mapbox, MapLibre, and OpenLayers document Turf integrations, and Geoman ships Turf functions in its geometry editor. That gives it backing across several mapping stacks. The independent benchmark covers a single operation, and current satisfaction and retention data are scarce.
- docs.mapbox.com/help/dive-deeper/geospatial-analysis: Mapbox documents Turf for browser-side spatial analysis.
- maplibre.org/maplibre-gl-js/docs/examples/draw-polygon-with-mapbox-gl-draw: MapLibre uses Turf to calculate the area of a drawn polygon.
- openlayers.org/en/latest/examples/turf.html: OpenLayers demonstrates Turf's distance and line-sampling modules.
- github.com/geoman-io/maplibre-geoman/releases: Geoman release notes show Turf in shipped editing and import paths.
- github.com/chrispahm/contains-benchmark/blob/main/README.md: Independent benchmark with reproducible results for one spatial predicate.
Safe7.0
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
There are no known advisories, and the licence is MIT. The Scorecard is 6.4: code review, token permissions and SAST all score 0. The umbrella package has 117 dependencies, mostly the project's own @turf modules. Releases now use an OIDC-based workflow.
- advisories total: 0 advisories.
- scorecard score: 6.4, with Code-Review, Token-Permissions and SAST at 0.
- npm dependencies: 117 dependencies, mostly internal @turf modules.
- newreleases.io/project/npm/@turf/turf/release/7.4.0: Release workflow moved to OIDC.
GPT-6.2 Sol: 7.0, likely 5.8 to 8.2
Turf uses the permissive MIT licence, and the OSV snapshot lists zero advisories. Version 7.4 uses npm trusted publishing with provenance. The full package has 117 direct dependencies, mostly sibling Turf modules, and the 6.4 Scorecard flags weak code review and workflow token permissions. Individual modules can reduce the dependency footprint, while the public workflow leaves uncertainty about who can authorize releases.
- npm license, npm dependencies, advisories, scorecard: MIT, zero OSV advisories, and zero scores for code review and token permissions.
- github.com/Turfjs/turf/blob/v7.4.0/.github/workflows/release.yml: Tagged GitHub Actions workflow tests and publishes with OIDC and provenance.
- github.com/Turfjs/turf/blob/v7.4.0/packages/turf/package.json: The full package depends mainly on modules from the same project.
Good
- It covers more geospatial operations on plain GeoJSON than any other JS library, from distance and bbox to union, isobands and DBSCAN clustering.
- Every function is its own @turf/* package, so apps can install only what they use and keep bundles small.
- It ships TypeScript types, ESM and CJS builds, and a browser bundle, and it works with any map library.
- The v7 line gets steady releases, many correctness fixes, and a gradual move to TypeScript.
Bad
- Its correctness record has gaps: the boolean, union and intersect functions have had edge-case bugs, and several fixes had to be reverted in v7.3.x patches.
- Buffers and other planar approximations lose accuracy at large distances and high latitudes.
- Funding is very small and releases rest on about two volunteer maintainers.
- The @turf/turf umbrella package pulls in 117 dependencies, and it is slow on very large datasets compared with native GIS tools.
The numbers
- npm downloads, 4 weeks
- 9.3M ×2.9 in a year
- GitHub stars
- 11k
- Commits, 12 months
- 135
- npm version
- 7.4.0 Aug 2026
- Versions, 12 months
- 6
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 6.4 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (Turfjs/turf), npm (@turf/turf), OSV and the OpenSSF Scorecard.