New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@turf/isolines

Package Overview
Dependencies
Maintainers
6
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/isolines - npm Package Compare versions

Comparing version 5.1.5 to 6.2.0-alpha.0

dist/es/index.js

2

index.d.ts

@@ -7,3 +7,3 @@ import { Point, MultiLineString, FeatureCollection, Properties } from '@turf/helpers'

export default function isolines(
points: FeatureCollection<Point>,
points: FeatureCollection<Point, any>,
breaks: number[],

@@ -10,0 +10,0 @@ options?: {

{
"name": "@turf/isolines",
"version": "5.1.5",
"version": "6.2.0-alpha.0",
"description": "turf isolines module",
"main": "main.js",
"module": "main.es.js",
"types": "index.d.ts",
"files": [
"index.js",
"index.d.ts",
"main.js",
"lib",
"main.es.js"
"author": "Turf Authors",
"contributors": [
"Stefano Borghi <@stebogit>"
],
"scripts": {
"pretest": "rollup -c ../../rollup.config.js",
"test": "node -r @std/esm test.js",
"posttest": "node -r @std/esm ../../scripts/validate-es5-dependencies.js",
"bench": "node -r @std/esm bench.js",
"docs": "node ../../scripts/generate-readmes"
"license": "MIT",
"bugs": {
"url": "https://github.com/Turfjs/turf/issues"
},
"homepage": "https://github.com/Turfjs/turf",
"repository": {

@@ -34,18 +26,26 @@ "type": "git",

],
"author": "Turf Authors",
"contributors": [
"Stefano Borghi <@stebogit>"
"main": "dist/js/index.js",
"module": "dist/es/index.js",
"types": "index.d.ts",
"sideEffects": false,
"files": [
"dist",
"index.d.ts"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/Turfjs/turf/issues"
"scripts": {
"bench": "npm-run-all prepare bench:run",
"bench:run": "node bench.js",
"docs": "node ../../scripts/generate-readmes",
"posttest": "node -r esm ../../scripts/validate-es5-dependencies.js",
"prepare": "rollup -c ../../rollup.config.js",
"test": "npm-run-all prepare test:*",
"test:tape": "node -r esm test.js",
"test:types": "tsc --noEmit types.ts"
},
"homepage": "https://github.com/Turfjs/turf",
"devDependencies": {
"@std/esm": "*",
"@turf/envelope": "^5.1.5",
"@turf/point-grid": "^5.1.5",
"@turf/random": "^5.1.5",
"@turf/rhumb-destination": "^5.1.5",
"@turf/truncate": "^5.1.5",
"@turf/envelope": "^6.2.0-alpha.0",
"@turf/point-grid": "^6.2.0-alpha.0",
"@turf/random": "^6.2.0-alpha.0",
"@turf/rhumb-destination": "^6.2.0-alpha.0",
"@turf/truncate": "^6.2.0-alpha.0",
"benchmark": "*",

@@ -59,11 +59,9 @@ "load-json-file": "*",

"dependencies": {
"@turf/bbox": "^5.1.5",
"@turf/helpers": "^5.1.5",
"@turf/invariant": "^5.1.5",
"@turf/meta": "^5.1.5"
"@turf/bbox": "^6.2.0-alpha.0",
"@turf/helpers": "^6.2.0-alpha.0",
"@turf/invariant": "^6.2.0-alpha.0",
"@turf/meta": "^6.2.0-alpha.0",
"object-assign": "*"
},
"@std/esm": {
"esm": "js",
"cjs": true
}
"gitHead": "23b651deaa1ca6a0960d0142aea620b7cc6a076d"
}

@@ -7,13 +7,13 @@ # @turf/isolines

Takes a grid [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) features with z-values and an array of
value breaks and generates [isolines](http://en.wikipedia.org/wiki/Isoline).
Takes a grid [FeatureCollection][1] of [Point][2] features with z-values and an array of
value breaks and generates [isolines][3].
**Parameters**
- `pointGrid` **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)&lt;[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)>** input points
- `breaks` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>** values of `zProperty` where to draw isolines
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional parameters (optional, default `{}`)
- `options.zProperty` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the property name in `points` from which z-values will be pulled (optional, default `'elevation'`)
- `options.commonProperties` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** GeoJSON properties passed to ALL isolines (optional, default `{}`)
- `options.breaksProperties` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)>** GeoJSON properties passed, in order, to the correspondent isoline;
- `pointGrid` **[FeatureCollection][4]&lt;[Point][5]>** input points
- `breaks` **[Array][6]&lt;[number][7]>** values of `zProperty` where to draw isolines
- `options` **[Object][8]** Optional parameters (optional, default `{}`)
- `options.zProperty` **[string][9]** the property name in `points` from which z-values will be pulled (optional, default `'elevation'`)
- `options.commonProperties` **[Object][8]** GeoJSON properties passed to ALL isolines (optional, default `{}`)
- `options.breaksProperties` **[Array][6]&lt;[Object][8]>** GeoJSON properties passed, in order, to the correspondent isoline;
the breaks array will define the order in which the isolines are created (optional, default `[]`)

@@ -28,2 +28,3 @@

var pointGrid = turf.pointGrid(extent, cellWidth, {units: 'miles'});
for (var i = 0; i < pointGrid.features.length; i++) {

@@ -34,10 +35,32 @@ pointGrid.features[i].properties.temperature = Math.random() * 10;

var isolines = turf.isolines(pointGrid, breaks, {zProperty: 'temperature'});
var lines = turf.isolines(pointGrid, breaks, {zProperty: 'temperature'});
//addToMap
var addToMap = [isolines];
var addToMap = [lines];
```
Returns **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)&lt;[MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5)>** a FeatureCollection of [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5) features representing isolines
Returns **[FeatureCollection][4]&lt;[MultiLineString][10]>** a FeatureCollection of [MultiLineString][11] features representing isolines
[1]: https://tools.ietf.org/html/rfc7946#section-3.3
[2]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[3]: http://en.wikipedia.org/wiki/Isoline
[4]: https://tools.ietf.org/html/rfc7946#section-3.3
[5]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[10]: https://tools.ietf.org/html/rfc7946#section-3.1.5
[11]: https://tools.ietf.org/html/rfc7946#section-3.1.5
<!-- This file is automatically generated. Please don't edit it directly:

@@ -44,0 +67,0 @@ if you find an error, edit the source file (likely index.js), and re-run

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc