7.2.0 • Published 10 months ago
@turf/ellipse v7.2.0
@turf/ellipse
ellipse
Takes a Point and calculates the ellipse polygon given two semi-axes expressed in variable units and steps for precision.
Parameters
centerCoord center pointxSemiAxisnumber semi (major) axis of the ellipse along the x-axisySemiAxisnumber semi (minor) axis of the ellipse along the y-axisoptionsObject Optional parameters (optional, default{})options.anglenumber angle of rotation (along the vertical axis), from North in decimal degrees, negative clockwise (optional, default0)options.pivotCoord point around which the rotation will be performed (optional, default'origin')options.stepsnumber number of steps (optional, default64)options.unitsstring unit of measurement for axes (optional, default'kilometers')options.propertiesObject properties (optional, default{})
Examples
var center = [-75, 40];
var xSemiAxis = 5;
var ySemiAxis = 2;
var ellipse = turf.ellipse(center, xSemiAxis, ySemiAxis);
//addToMap
var addToMap = [turf.point(center), ellipse]Returns Feature<Polygon> ellipse polygon
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.
Installation
Install this module individually:
$ npm install @turf/ellipseOr install the Turf module that includes it as a function:
$ npm install @turf/turf7.2.0
10 months ago
7.1.0
1 year ago
7.1.0-alpha.70
1 year ago
7.0.0
1 year ago
7.1.0-alpha.7
1 year ago
7.0.0-alpha.116
1 year ago
7.0.0-alpha.115
2 years ago
7.0.0-alpha.114
2 years ago
7.0.0-alpha.113
2 years ago
7.0.0-alpha.111
2 years ago
7.0.0-alpha.110
2 years ago
7.0.0-alpha.1
2 years ago
7.0.0-alpha.2
2 years ago
7.0.0-alpha.0
3 years ago
6.5.0
4 years ago
6.4.0
4 years ago
6.3.0
5 years ago
6.2.0
5 years ago
6.2.0-alpha.3
5 years ago
6.2.0-alpha.2
5 years ago
6.2.0-alpha.1
6 years ago
5.1.5
8 years ago
5.1.1
8 years ago
5.1.0
8 years ago
5.0.1
8 years ago
5.0.0
8 years ago