Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ Turf.js | GeoJSONKit-Turf
[turf-area](https://github.com/Turfjs/turf/blob/master/packages/turf-area/) | `GeoJSON.Polygon.area`
[turf-bearing](https://turfjs.org/docs/#bearing) | `GeoJSON.Position.direction(to:)`<br/> `RadianCoordinate2D.direction(to:)`
[turf-bezier-spline](https://github.com/Turfjs/turf/tree/master/packages/turf-bezier-spline/) | `GeoJSON.LineString.bezier(resolution:sharpness:)`
[turf-boolean-point-in-polygon](https://github.com/Turfjs/turf/tree/master/packages/turf-boolean-point-in-polygon) | `GeoJSON.Polygon.contains(_:ignoreBoundary:)`
[turf-boolean-point-in-polygon](https://github.com/Turfjs/turf/tree/master/packages/turf-boolean-point-in-polygon) | `GeoJSON.Polygon.contains(_:)`
[turf-center](http://turfjs.org/docs/#center) | `GeoJSON.Geometry.center()` |
[turf-center-of-mass](http://turfjs.org/docs/#centerOfMass) | `GeoJSON.Geometry.centerOfMass()` |
[turf-centroid](http://turfjs.org/docs/#centroid) | `GeoJSON.Geometry.centroid()` |
[turf-circle](https://turfjs.org/docs/#circle) | `GeoJSON.Polygon(center:radius:vertices:)` |
[turf-circle](https://turfjs.org/docs/#circle) | `GeoJSON.Polygon(center:radius:)` |
[turf-convex](https://turfjs.org/docs/#convex) | `GeoJSON.convexHull()`<br/>`Collection<GeoJSON.Position>.convexHull()` |
[turf-destination](https://github.com/Turfjs/turf/tree/master/packages/turf-destination/) | `GeoJSON.Position.coordinate(at:facing:)`<br/> `RadianCoordinate2D.coordinate(at:facing:)`
[turf-distance](https://github.com/Turfjs/turf/tree/master/packages/turf-distance/) | `GeoJSON.Position.distance(to:)`<br/>`RadianCoordinate2D.distance(to:)`
Expand Down
4 changes: 2 additions & 2 deletions Sources/GeoJSONKitTurf/Turf+Polygon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ extension GeoJSON.Polygon {
- Parameter center: The center coordinate for the polygon.
- Parameter radius: The radius of the polygon, measured in meters.
- Parameter vertices: The number of vertices the polygon will have.
The recommended amount is 64.
The recommended and default amount is 64.
- Returns: A polygon shape which approximates a circle.
*/
public init(center: GeoJSON.Position, radius: GeoJSON.Distance, vertices: Int) {
public init(center: GeoJSON.Position, radius: GeoJSON.Distance, vertices: Int = 64) {
// The first and last coordinates in a polygon must be identical,
// which is why we're using the inclusive range operator in this case.
// Ported from https://github.com/Turfjs/turf/blob/17002ccd57e04e84ddb38d7e3ac8ede35b019c58/packages/turf-circle/index.ts
Expand Down