Turf is a modular geospatial engine written in JavaScript and TypeScript that provides spatial analysis capabilities for web and server-side applications. The library includes traditional spatial operations, helper functions for creating GeoJSON data, and tools for data classification and statistics. It can be deployed as a client-side module in browsers or run server-side using Node.js, making it versatile for different deployment scenarios.
The library supports a broad range of modern JavaScript runtimes, with Node.js as a first-class citizen where Active or Maintenance LTS releases are recommended. For browser deployment, Turf uses Babel transpilation to support any browser matching the Browserslist criteria of greater than 0.25% market share, the last two versions, full ES5 support, and not marked as dead. While Deno and Bun are not officially supported, the project welcomes feedback from users of alternative runtimes.
Turf's functionality spans multiple geospatial domains including distance calculation, polygon manipulation, coordinate transformation, feature extraction, and general map data processing. The library is built around GeoJSON as its primary data format, enabling seamless integration with other geospatial tools and workflows. The modular architecture allows developers to use only the specific spatial analysis functions they need rather than loading the entire library.
The project maintains active development with a median issue and pull request response latency of 5.5 hours and a mean latency of 630.3 hours across 374 tracked items. Bug reports, documentation improvements, and enhancement requests represent the most common issue categories, with 24, 18, and 17 labeled items respectively. The core maintenance team includes smallsaucepan as the most active contributor with 812 recorded events, followed by rowanwins with 173 events and mfedderly with 127 events.
Turf's codebase overlaps with several major open-source projects including Microsoft's VSCode and TypeScript repositories as well as the Rust language repository, indicating shared contributors and cross-pollination of ideas within the geospatial and programming language communities. The project is supported through Open Collective with both backers and sponsors contributing to its sustainability. Documentation is comprehensive, with a dedicated getting started guide and full API reference available at turfjs.org, alongside interactive examples demonstrating the library's capabilities for spatial analysis workflows.