turf-isolines

turf isolines module

Turf packages are now namespaced: please use @turf/isolines instead
Last updated 4 years ago by tmcw .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install turf-isolines 
SYNC missed versions from official npm registry.

turf-isolines

build status

turf isolines module

turf.isolines(points, z, resolution, breaks)

Takes a FeatureCollection of points with z values and an array of value breaks and generates isolines. These are commonly used to create elevation maps, but can be used for general data interpolation as well.

Parameters

parameter type description
points FeatureCollection a collection containing only Features with Point geometries
z string field in properties to contour
resolution number
breaks Array.<number> at which to draw contours

Example

// create random points with random
// z-values in their properties
var points = turf.random('point', 100, {
  bbox: [0, 30, 20, 50]
});
for (var i = 0; i < points.features.length; i++) {
  points.features[i].properties.z = Math.random() * 10;
}
var breaks = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var isolined = turf.isolines(points, 'z', 15, breaks);
//=isolined

Returns FeatureCollection, isolines

Installation

Requires nodejs.

$ npm install turf-isolines

Tests

$ npm test

Current Tags

  • 3.0.7-canary.ae89c8b3                                ...           canary (4 years ago)
  • 3.0.12                                ...           latest (4 years ago)

15 Versions

  • 3.0.12 [deprecated]           ...           4 years ago
  • 3.0.10 [deprecated]           ...           4 years ago
  • 3.0.7-canary.ae89c8b3                                ...           4 years ago
  • 3.0.5 [deprecated]           ...           5 years ago
  • 3.0.1 [deprecated]           ...           5 years ago
  • 3.0.0-canary.7879bf6c                                ...           5 years ago
  • 3.0.0-canary.2f5f7167                                ...           5 years ago
  • 1.0.2 [deprecated]           ...           6 years ago
  • 1.0.1 [deprecated]           ...           6 years ago
  • 1.0.0 [deprecated]           ...           6 years ago
  • 0.1.1 [deprecated]           ...           6 years ago
  • 0.1.0 [deprecated]           ...           6 years ago
  • 0.0.3 [deprecated]           ...           6 years ago
  • 0.0.2 [deprecated]           ...           7 years ago
  • 0.0.1 [deprecated]           ...           7 years ago
Downloads
Today 31
This Week 64
This Month 31
Last Day 33
Last Week 197
Last Month 823
Dependencies (7)
Dev Dependencies (2)
Dependents (2)

Copyright 2014 - 2017 © taobao.org |