All Projects → Turfjs → Turf

Turfjs / Turf

Licence: mit
A modular geospatial engine written in JavaScript

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Turf

pyturf
A modular geospatial engine written in python
Stars: ✭ 15 (-99.77%)
Mutual labels:  geojson, gis, turf
turf-go
A Go language port of Turf.js
Stars: ✭ 41 (-99.38%)
Mutual labels:  geojson, gis, turf
Turf Swift
A Swift language port of Turf.js.
Stars: ✭ 123 (-98.15%)
Mutual labels:  algorithm, gis, computational-geometry
open-geo-data-education
Open Geospatial Datasets for GIS Education: This is a repository of open geospatial datasets to be used in an educational context. I created these files over years of teaching Geographic Data Science and GIS. All original datasets are freely available online with open data licenses (see the dataset attribution for details). All the datasets in t…
Stars: ✭ 52 (-99.22%)
Mutual labels:  geojson, gis
geojson-to-wfs-t-2
A lightweight javascript module to format WFS-T-2 statements from GeoJSON features
Stars: ✭ 21 (-99.68%)
Mutual labels:  geojson, gis
turf-async
Demonstrating how to use Turf.js with web workers to run geoprocesses asynchronously
Stars: ✭ 50 (-99.25%)
Mutual labels:  geojson, turf
geojson-rbush
GeoJSON implementation of RBush — a high-performance JavaScript R-tree-based 2D spatial index for points and rectangles
Stars: ✭ 60 (-99.1%)
Mutual labels:  geojson, computational-geometry
nl
geojson and topojson for common dutch areas
Stars: ✭ 30 (-99.55%)
Mutual labels:  geojson, gis
django-graphql-geojson
GeoJSON support for Graphene Django
Stars: ✭ 61 (-99.08%)
Mutual labels:  geojson, gis
polylabel cmd
A command-line utility for generating optimum polygon label coordinates from GeoJSON
Stars: ✭ 12 (-99.82%)
Mutual labels:  geojson, gis
turf dart
A turf.js-like geospatial analysis library working with GeoJSON, written in pure Dart.
Stars: ✭ 14 (-99.79%)
Mutual labels:  geojson, turf
geojson-to-sqlite
CLI tool for converting GeoJSON files to SQLite (with SpatiaLite)
Stars: ✭ 41 (-99.38%)
Mutual labels:  geojson, gis
GeoConvert
Converting between Geojson and GIS file formats
Stars: ✭ 32 (-99.52%)
Mutual labels:  geojson, gis
Orb
Types and utilities for working with 2d geometry in Golang
Stars: ✭ 378 (-94.32%)
Mutual labels:  gis, geojson
topo
A Geometry library for Elixir that calculates spatial relationships between two geometries
Stars: ✭ 125 (-98.12%)
Mutual labels:  gis, computational-geometry
pygeoif
Basic implementation of the __geo_interface__
Stars: ✭ 44 (-99.34%)
Mutual labels:  geojson, gis
Go Geom
Package geom implements efficient geometry types for geospatial applications.
Stars: ✭ 456 (-93.15%)
Mutual labels:  gis, geojson
olturf
A Turf toolbar for OpenLayers.
Stars: ✭ 30 (-99.55%)
Mutual labels:  gis, turf
de9im
DE-9IM spatial predicate library implemented in Javascript.
Stars: ✭ 22 (-99.67%)
Mutual labels:  geojson, gis
GeoJSON.jl
Utilities for working with GeoJSON data in Julia
Stars: ✭ 46 (-99.31%)
Mutual labels:  geojson, gis

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/turf@6/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:

Turf for Swift is experimental and its public API is subject to change. Please use with care.


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.

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]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].