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

@turf/circle

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/circle

turf circle module

  • 3.5.2-alpha.d2c36ee7
  • canary
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
984K
increased by20.27%
Maintainers
2
Weekly downloads
 
Created

What is @turf/circle?

@turf/circle is a module within the Turf.js library that allows you to create circular polygons. It is useful for geospatial analysis and manipulation, enabling you to generate circles with a specified radius around a given point.

What are @turf/circle's main functionalities?

Create a Circle

This feature allows you to create a circle polygon with a specified radius around a given center point. The `steps` option defines the number of points used to approximate the circle, and the `units` option specifies the unit of measurement for the radius.

const turf = require('@turf/turf');
const center = [0, 0];
const radius = 5;
const options = { steps: 64, units: 'kilometers' };
const circle = turf.circle(center, radius, options);
console.log(circle);

Customizing Circle Properties

This feature allows you to customize the properties of the circle, such as the number of steps for approximation, the units of measurement, and additional properties like a name.

const turf = require('@turf/turf');
const center = [0, 0];
const radius = 5;
const options = { steps: 32, units: 'miles', properties: { name: 'My Circle' } };
const circle = turf.circle(center, radius, options);
console.log(circle);

Other packages similar to @turf/circle

Keywords

FAQs

Package last updated on 04 Nov 2016

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