Gathering detailed insights and metrics for turf
Gathering detailed insights and metrics for turf
Gathering detailed insights and metrics for turf
Gathering detailed insights and metrics for turf
npm install turf
Typescript
Module System
Node Version
NPM Version
89.2
Supply Chain
78.5
Quality
74
Maintenance
100
Vulnerability
98.9
License
TypeScript (86.94%)
JavaScript (13.05%)
Shell (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
9,840 Stars
3,791 Commits
980 Forks
179 Watchers
48 Branches
177 Contributors
Updated on Jul 12, 2025
Latest Version
3.0.14
Package Id
turf@3.0.14
Size
280.56 kB
NPM Version
2.15.8
Node Version
4.4.7
Published on
Jul 05, 2016
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
46
A modular geospatial engine written in JavaScript
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:
1npm install turf
In browser:
Download the minified file, and include it in a script tag. This will expose a global variable named "turf".
1<script src="turf.min.js" charset="utf-8"></script>
Browserify:
All of Turf's functions can also be installed as separate modules. This works well with tools like browserify where you want to install only the code you need. It also allows you to mix and match modules. This is the recommended usage pattern for most production environments. For example, to install the point and buffer modules use:
1npm install turf-point turf-buffer
###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.
Most Turf functions work with GeoJSON features. These are 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:
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:
var point1 = turf.point([0, 0]);
var point2 = {
type: 'Feature',
geometry: {
type: 'Point',
coordinates: [0, 0]
},
properties: {}
};
##Functions
####geometry
####joins
####data
remove
####measurement
distance
####interpolation
####grids
####classification
quantile
####aggregation
average
####transformation
buffer
####misc
flip
No vulnerabilities found.
Reason
5 commit(s) out of 30 and 14 issue activity out of 30 found in the last 90 days -- score normalized to 10
Reason
all last 30 commits are reviewed through GitHub
Reason
no vulnerabilities detected
Reason
license file detected
Details
Reason
no dangerous workflow patterns detected
Reason
update tool detected
Details
Reason
no binaries found in the repo
Reason
dependency not pinned by hash detected -- score normalized to 9
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
no badge detected
Reason
non read-only tokens detected in GitHub workflows
Details
Reason
security policy file not detected
Reason
project is not fuzzed
Score
Last Scanned on 2022-08-15
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More