Package Exports
- turf-tin
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (turf-tin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
turf-tin
Takes a set of points and the name of a z-value property and creates a tin (Triangulated Irregular Network). These are often used for developing elevation contour maps or stepped heat visualizations.
###Install
npm install turf-tin###Parameters
| name | description |
|---|---|
| pts | a point featurecollection |
| z | a z value to encode |
###Usage
tin(pts, z)###Example
var tin = require('turf-tin')
var fs = require('fs')
var z = 'elevation'
var pts = JSON.parse(fs.readFileSync('/path/to/pts.geojson'))
var tinPolys = tin(pts, z)
console.log(tinPolys)