Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
@turf/interpolate
Advanced tools
Takes a set of points and estimates their 'property' values on a grid using the Inverse Distance Weighting (IDW) method.
Parameters
points
FeatureCollection<Point> with known valuecellSize
number the distance across each grid pointoptions
Object Optional parameters (optional, default {}
)
options.gridType
string defines the output format based on a Grid Type (options: 'square' | 'point' | 'hex' | 'triangle') (optional, default 'square'
)options.property
string the property name in points
from which z-values will be pulled, zValue fallbacks to 3rd coordinate if no property exists. (optional, default 'elevation'
)options.units
string used in calculating cellSize, can be degrees, radians, miles, or kilometers (optional, default 'kilometers'
)options.weight
number exponent regulating the distance-decay weighting (optional, default 1
)Examples
var points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});
// add a random property to each point
turf.featureEach(points, function(point) {
point.properties.solRad = Math.random() * 50;
});
var options = {gridType: 'points', property: 'solRad', units: 'miles'};
var grid = turf.interpolate(points, 100, options);
//addToMap
var addToMap = [grid];
Returns FeatureCollection<(Point | Polygon)> grid of points or polygons with interpolated 'property'
This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.
Install this module individually:
$ npm install @turf/interpolate
Or install the Turf module that includes it as a function:
$ npm install @turf/turf
FAQs
turf interpolate module
The npm package @turf/interpolate receives a total of 650,642 weekly downloads. As such, @turf/interpolate popularity was classified as popular.
We found that @turf/interpolate demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.