Turf.js Geospatial Analysis
turfjs.org
2
Leaving SiteNav
External Link Disclaimer
You are about to visit turfjs.org. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Turf is a modular geospatial analysis engine written in JavaScript that performs advanced geographic computations in the browser and in Node-dot-js without requiring a server-side GIS backend. Originally developed by Mapbox, the library operates on GeoJSON as its native data format, with all functions accepting and returning GeoJSON Feature and FeatureCollection objects, enabling seamless integration with mapping libraries including Leaflet, Mapbox GL, MapLibre, and OpenLayers. Turf provides over one hundred and fifty geospatial functions organized into categories including measurement functions for calculating distances, areas, bearings, and centroids, transformation functions for buffering, simplifying, and dissolving geometries, interpolation functions for creating tin surfaces and bezier curves, spatial analysis functions for point-in-polygon queries, intersection detection, and Voronoi diagram generation, and coordinate conversion functions for projecting between WGS84 latitude-longitude and Web Mercator coordinate systems. The measurement functions use the Haversine formula for great-circle distance calculations on a spherical earth model, with options for different units including kilometers, miles, radians, and degrees. The buffering function creates offset polygons at specified distances from input geometries, with configurable resolution controlling the smoothness of curved boundaries, supporting both outward and inward buffering for expansion and erosion operations. The modular design enables tree-shaking so only the specific functions used are included in the bundle.
Statistics
2
Views
0
Clicks
0
Like
0
Dislike