Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/isolines

Package Overview
Dependencies
Maintainers
9
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/isolines

turf isolines module

  • 7.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
801K
increased by28.29%
Maintainers
9
Weekly downloads
 
Created

What is @turf/isolines?

@turf/isolines is a module within the Turf.js library that allows you to generate isolines (contour lines) from a grid of points with z-values. This is useful for visualizing elevation, temperature, or other continuous data over a geographic area.

What are @turf/isolines's main functionalities?

Generate Isolines

This feature allows you to generate isolines from a grid of points with z-values. The code sample demonstrates creating a grid of points, assigning random z-values, and generating isolines based on specified breaks.

const turf = require('@turf/turf');

// Create a grid of points with z-values
const points = turf.pointGrid([-95, 30, -85, 40], 100, { units: 'miles' });
points.features.forEach((point, i) => {
  point.properties.z = Math.random() * 10;
});

// Generate isolines
const breaks = [0, 2, 4, 6, 8, 10];
const isolines = turf.isolines(points, breaks, { zProperty: 'z' });

console.log(JSON.stringify(isolines));

Other packages similar to @turf/isolines

Keywords

FAQs

Package last updated on 09 Aug 2024

Did you know?

Socket

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.

Install

Related posts

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