turf-isobands
Takes a FeatureCollection of points with z values and an array of value breaks and generates filled contour isobands. These are commonly used to create elevation maps, but can be used for general data interpolation as well.
###Install
npm install turf-isobands
###Parameters
name | description |
---|
points | points use as seed values |
z | z value to contour |
resolution | resolution of the underlying grid |
breaks | where to draw contours |
###Usage
isobands(points, z, resolution, breaks)
###Example
var isobands = require('turf-isobands')
var fs = require('fs')
var z = 'elevation'
var resolution = 15
var breaks = [.1, 22, 45, 55, 65, 85, 95, 105, 120, 180]
var points = JSON.parse(fs.readFileSync('/path/to/points.geojson'))
var isobanded = isobands(points, z, resolution, breaks)
console.log(isobanded)