Turf

Turf is GIS for web maps. It’s a fast, compact, and open-source JavaScript library that implements the most common geospatial operations: buffering, contouring, triangular irregular networks, and more.

Simple

Modular, simple-to-understand JavaScript functions that speak GeoJSON

Fast

Takes advantage of the newest algorithms and doesn't require you to send data to a server

Modular

Turf is a collection of small modules. You can require just what you use with browserify

Leverage the full power of Mapbox tools

Searching for places near a route is a tough problem that involves narrowing down thousands of potential locations to find out what's actually nearby. With Turf + Mapbox Directions and Mapbox.js, we can locate all electric vehicle charging stations along a route in realtime, and make it possible to reroute to a charging station with a single click.

Find what's nearby

Turf has opened a wide range of possibilities for apps running entirely in the browser. With Turf, you can build a store locator that finds all of the Starbucks locations near a user’s current position — that's Turf crunching math on a set of 19,979 locations worldwide on the fly, right in the browser. Turf’s potential for giving anyone with a modern internet browser a powerful suite of tools for geospatial analysis is mind-boggling.

Turf can solve analysis problems like simplifying 23,000 county polygons and checking 8.5 million geofences within a single second.

What can Turf do?

turf.tin(points);
Buffer analysis
Dissolve
Union
Merge
Centroids and centers
Joins
Aggregation & statistics functions
Triangulated irregular networks
Interpolation
Concave and convex hulls
Simplify features
Filter / select by attribute
Data classification
Grids
Hexagonal binning
Distance calculations

Get started with Turf!

Read more about what you can do with Turf in our Intro and Turf Analysis guides.

Leverage the full power of Turf with the rest of the Mapbox stack, it's free.

Interested in Turf and want to know how it can fit into your organization?