@turf/isolines
Advanced tools
Comparing version 5.1.5 to 6.2.0-alpha.0
@@ -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)<[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)<[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)<[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]<[Point][5]>** input points | ||
- `breaks` **[Array][6]<[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]<[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)<[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]<[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 |
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
11
87
69151
5
7
1522
1
1
2
+ Addedobject-assign@*
+ Added@turf/bbox@6.5.0(transitive)
+ Added@turf/helpers@6.5.0(transitive)
+ Added@turf/invariant@6.5.0(transitive)
+ Added@turf/meta@6.5.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
- Removed@turf/bbox@5.1.5(transitive)
- Removed@turf/helpers@5.1.5(transitive)
- Removed@turf/invariant@5.2.0(transitive)
- Removed@turf/meta@5.2.0(transitive)
Updated@turf/bbox@^6.2.0-alpha.0
Updated@turf/helpers@^6.2.0-alpha.0
Updated@turf/meta@^6.2.0-alpha.0