# turf-circle

> turf circle module

Latest version **3.0.12** (published 2016-07-05) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install turf-circle
pnpm add turf-circle
yarn add turf-circle
bun add turf-circle
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.0.12 |
| Published | 2016-07-05 |
| First published | 2016-06-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mustafa Dokumacı |
| Maintainers | tmcw, vapurfilozofu |
| Keywords | turf, circle, radius, polygon, miles, km |

## Links

- npm: https://www.npmjs.com/package/turf-circle
- Repository: https://github.com/Turfjs/turf-circle
- Issues: https://github.com/Turfjs/turf-circle/issues
- npm.io page: https://npm.io/package/turf-circle

## Dependencies (2)

- [turf-helpers](https://npm.io/package/turf-helpers.md) ^3.0.12
- [turf-destination](https://npm.io/package/turf-destination.md) ^3.0.12

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 3.0.12 (latest) — 2016-07-05
- 3.0.7-canary.ae89c8b3 (canary) — 2016-06-14
- 3.0.10 — 2016-06-15
- 3.0.6 — 2016-06-13
- 3.0.5 — 2016-06-02

## README

# turf-circle

# circle

Takes a [Point](Point) and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision.

**Parameters**

-   `center` **Feature&lt;Point>** center point
-   `radius` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** radius of the circle
-   `steps` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** number of steps
-   `units` **\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** miles, kilometers, degrees, or radians (optional, default `kilometers`)

**Examples**

```javascript
var center = {
  "type": "Feature",
  "properties": {
    "marker-color": "#0f0"
  },
  "geometry": {
    "type": "Point",
    "coordinates": [-75.343, 39.984]
  }
};
var radius = 5;
var steps = 10;
var units = 'kilometers';

var circle = turf.circle(center, radius, steps, units);

var result = {
  "type": "FeatureCollection",
  "features": [center, circle]
};

//=result
```

Returns **Feature&lt;Polygon>** circle polygon

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install turf-circle
```

Or install the Turf module that includes it as a function:

```sh
$ npm install turf
```

---
_Source: https://npm.io/package/turf-circle · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
