Popularity
8.2
Growing
Activity
8.2
Growing
6,504
193
749

Monthly Downloads: 0
Programming language: JavaScript
License: MIT License
Tags: Map     Mad Science     Line     Sample     Jenks     Quantile     Plane     Midpoint     Stats     Statistics     Analysis     Area     Point     Polygon     Grid     Geojson     Extent     Tin     Centroid     Contour     Geometry     Geography     Geospatial     Geojs     Geo     GIS    
Latest version: v6.5.0

turf alternatives and similar modules

Based on the "Mad Science" category.
Alternatively, view turf alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of turf or a related project?

Add another 'Mad Science' Module

README

turf

GitHub Actions Status Version Badge Gitter chat Backers on Open Collective Sponsors on Open Collective Coverage Status

A modular geospatial engine written in JavaScript

turfjs.org


Turf is a JavaScript library for spatial analysis. It includes traditional spatial operations, helper functions for creating GeoJSON data, and data classification and statistics tools. Turf can be added to your website as a client-side plugin, or you can run Turf server-side with Node.js (see below).

Installation

In Node.js

# get all of turf
npm install @turf/turf

# or get individual packages
npm install @turf/helpers
npm install @turf/buffer

In browser

Download the minified file, and include it in a script tag. This will expose a global variable named turf.

<script src="turf.min.js" charset="utf-8"></script>

You can also include it directly from a CDN:

<script src="https://cdn.jsdelivr.net/npm/@turf/[email protected]/turf.min.js"></script>

TypeScript

TypeScript definitions are packaged with each module. No DefinitelyTyped packages required.

Other languages

Ports of Turf.js are available in:


Data in Turf

Turf uses GeoJSON for all geographic data. Turf expects the data to be standard WGS84 longitude, latitude coordinates. Check out geojson.io for a tool to easily create this data.

NOTE: Turf expects data in (longitude, latitude) order per the GeoJSON standard.

Most Turf functions work with GeoJSON features. These are pieces of data that represent a collection of properties (ie: population, elevation, zipcode, etc.) along with a geometry. GeoJSON has several geometry types such as:

  • Point
  • LineString
  • Polygon

Turf provides a few geometry functions of its own. These are nothing more than simple (and optional) wrappers that output plain old GeoJSON. For example, these two methods of creating a point are functionally equivalent:

// Note order: longitude, latitude.
var point1 = turf.point([-73.988214, 40.749128]);

var point2 = {
  type: 'Feature',
  geometry: {
    type: 'Point',
    // Note order: longitude, latitude.
    coordinates: [-73.988214, 40.749128]
  },
  properties: {}
};

Contributors

This project exists thanks to all the people who contribute. If you are interested in helping, check out the [Contributing Guide](CONTRIBUTING.md).

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]