|
5 | 5 | 📺[](https://www.bitrise.io/app/0b037542c2395ffb) |
6 | 6 | ⌚️[](https://www.bitrise.io/app/0d4d611f02295183) |
7 | 7 | <img src="https://upload.wikimedia.org/wikipedia/commons/3/3c/TuxFlat.svg" width="20" alt="Linux">[](https://travis-ci.com/mapbox/turf-swift) |
| 8 | +[](https://mapbox.github.io/turf-swift/) |
8 | 9 | [](https://github.com/Carthage/Carthage) |
9 | 10 | [](http://cocoadocs.org/docsets/Turf/) |
10 | 11 | [](https://swift.org/package-manager/) |
@@ -67,34 +68,33 @@ Then `import Turf` in any Swift file in your module. |
67 | 68 |
|
68 | 69 | This work-in-progress port of [Turf.js](https://github.com/Turfjs/turf/) contains the following functionality: |
69 | 70 |
|
70 | | -Turf.js | Turf-swift |
| 71 | +Turf.js | Turf for Swift |
71 | 72 | ----|---- |
72 | | -[turf-along](https://github.com/Turfjs/turf/tree/master/packages/turf-along/) | `LineString.coordinateFromStart(distance:)` |
73 | | -[turf-area](https://github.com/Turfjs/turf/blob/master/packages/turf-area/) | `Polygon.area` |
74 | | -[turf-bearing](https://turfjs.org/docs/#bearing) | `CLLocationCoordinate2D.direction(to:)`<br>`LocationCoordinate2D.direction(to:)` on Linux<br>`RadianCoordinate2D.direction(to:)` |
75 | | -[turf-bezier-spline](https://github.com/Turfjs/turf/tree/master/packages/turf-bezier-spline/) | `LineString.bezier(resolution:sharpness:)` |
76 | | -[turf-boolean-point-in-polygon](https://github.com/Turfjs/turf/tree/master/packages/turf-boolean-point-in-polygon) | `Polygon.contains(_:ignoreBoundary:)` |
77 | | -[turf-center](http://turfjs.org/docs/#center) | `Polygon.center` |
78 | | -[turf-center-of-mass](http://turfjs.org/docs/#centerOfMass) | `Polygon.centerOfMass` |
79 | | -[turf-centroid](http://turfjs.org/docs/#centroid) | `Polygon.centroid` |
80 | | -[turf-circle](https://turfjs.org/docs/#circle) | `Polygon(center:radius:vertices:)` | |
81 | | -[turf-destination](https://github.com/Turfjs/turf/tree/master/packages/turf-destination/) | `CLLocationCoordinate2D.coordinate(at:facing:)`<br>`LocationCoordinate2D.coordinate(at:facing:)` on Linux<br>`RadianCoordinate2D.coordinate(at:facing:)` |
82 | | -[turf-distance](https://github.com/Turfjs/turf/tree/master/packages/turf-distance/) | `CLLocationCoordinate2D.distance(to:)`<br>`LocationCoordinate2D.distance(to:)` on Linux<br>`RadianCoordinate2D.distance(to:)` |
83 | | -[turf-helpers#polygon](https://github.com/Turfjs/turf/tree/master/packages/turf-helpers/#polygon) | `Polygon(_:)` |
84 | | -[turf-helpers#lineString](https://github.com/Turfjs/turf/tree/master/packages/turf-helpers/#linestring) | `LineString(_:)` |
85 | | -[turf-helpers#degreesToRadians](https://github.com/Turfjs/turf/tree/master/packages/turf-helpers/#degreesToRadians) | `CLLocationDegrees.toRadians()`<br>`LocationDegrees.toRadians()` on Linux |
86 | | -[turf-helpers#radiansToDegrees](https://github.com/Turfjs/turf/tree/master/packages/turf-helpers/#radiansToDegrees) | `CLLocationDegrees.toDegrees()`<br>`LocationDegrees.toDegrees()` on Linux |
87 | | -[turf-helpers#convertLength](https://github.com/Turfjs/turf/tree/master/packages/turf-helpers#convertlength)<br>[turf-helpers#convertArea](https://github.com/Turfjs/turf/tree/master/packages/turf-helpers#convertarea) | `Measurement.converted(to:)` |
88 | | -[turf-length](https://github.com/Turfjs/turf/tree/master/packages/turf-length/) | `LineString.distance(from:to:)` |
89 | | -[turf-line-intersect](https://github.com/Turfjs/turf/tree/master/packages/turf-line-intersect/) | `intersection(_:_:)` |
90 | | -[turf-line-slice](https://github.com/Turfjs/turf/tree/master/packages/turf-line-slice/) | `LineString.sliced(from:to:)` |
91 | | -[turf-line-slice-along](https://github.com/Turfjs/turf/tree/master/packages/turf-line-slice-along/) | `LineString.trimmed(from:distance:)` |
92 | | -[turf-midpoint](https://github.com/Turfjs/turf/blob/master/packages/turf-midpoint/index.js) | `mid(_:_:)` |
93 | | -[turf-nearest-point-on-line](https://github.com/Turfjs/turf/tree/master/packages/turf-nearest-point-on-line/) | `LineString.closestCoordinate(to:)` |
94 | | -[turf-polygon-to-line](https://github.com/Turfjs/turf/tree/master/packages/turf-polygon-to-line/) | `LineString(_:)`<br>`MultiLineString(_:)`<br>`FeatureCollection(_:)` |
95 | | -[turf-simplify](https://github.com/Turfjs/turf/tree/master/packages/turf-simplify) | `LineString.simplified(tolerance:highestQuality:)` |
96 | | -[turf-polygon-smooth](https://github.com/Turfjs/turf/tree/master/packages/turf-polygon-smooth) | `Polygon.smooth(iterations:)` |
97 | | -[turf-simplify](https://github.com/Turfjs/turf/tree/master/packages/turf-simplify) | `Polygon.simplified(tolerance:highestQuality:)` |
| 73 | +[turf-along#along](https://turfjs.org/docs/#along) | `LineString.coordinateFromStart(distance:)` |
| 74 | +[turf-area#area](https://turfjs.org/docs/#area) | `Polygon.area` |
| 75 | +[turf-bearing#bearing](https://turfjs.org/docs/#bearing) | `CLLocationCoordinate2D.direction(to:)`<br>`LocationCoordinate2D.direction(to:)` on Linux<br>`RadianCoordinate2D.direction(to:)` |
| 76 | +[turf-bezier-spline#bezierSpline](https://turfjs.org/docs/#bezierSpline) | `LineString.bezier(resolution:sharpness:)` |
| 77 | +[turf-boolean-point-in-polygon#booleanPointInPolygon](https://turfjs.org/docs/#booleanPointInPolygon) | `Polygon.contains(_:ignoreBoundary:)` |
| 78 | +[turf-center#center](https://turfjs.org/docs/#center) | `Polygon.center` |
| 79 | +[turf-center-of-mass#centerOfMass](https://turfjs.org/docs/#centerOfMass) | `Polygon.centerOfMass` |
| 80 | +[turf-centroid#centroid](https://turfjs.org/docs/#centroid) | `Polygon.centroid` |
| 81 | +[turf-circle#circle](https://turfjs.org/docs/#circle) | `Polygon(center:radius:vertices:)` | |
| 82 | +[turf-destination#destination](https://turfjs.org/docs/#destination) | `CLLocationCoordinate2D.coordinate(at:facing:)`<br>`LocationCoordinate2D.coordinate(at:facing:)` on Linux<br>`RadianCoordinate2D.coordinate(at:facing:)` |
| 83 | +[turf-distance#distance](https://turfjs.org/docs/#distance) | `CLLocationCoordinate2D.distance(to:)`<br>`LocationCoordinate2D.distance(to:)` on Linux<br>`RadianCoordinate2D.distance(to:)` |
| 84 | +[turf-helpers#polygon](https://turfjs.org/docs/#polygon) | `Polygon(_:)` |
| 85 | +[turf-helpers#lineString](https://turfjs.org/docs/#lineString) | `LineString(_:)` |
| 86 | +[turf-helpers#degreesToRadians](https://turfjs.org/docs/#degreesToRadians) | `CLLocationDegrees.toRadians()`<br>`LocationDegrees.toRadians()` on Linux |
| 87 | +[turf-helpers#radiansToDegrees](https://turfjs.org/docs/#radiansToDegrees) | `CLLocationDegrees.toDegrees()`<br>`LocationDegrees.toDegrees()` on Linux |
| 88 | +[turf-helpers#convertLength](https://turfjs.org/docs/#convertLength)<br>[turf-helpers#convertArea](https://turfjs.org/docs/#convertArea) | `Measurement.converted(to:)` |
| 89 | +[turf-length#length](https://turfjs.org/docs/#length) | `LineString.distance(from:to:)` |
| 90 | +[turf-line-intersect#lineIntersect](https://turfjs.org/docs/#lineIntersect) | `intersection(_:_:)` |
| 91 | +[turf-line-slice#lineSlice](https://turfjs.org/docs/#lineSlice) | `LineString.sliced(from:to:)` |
| 92 | +[turf-line-slice-along#lineSliceAlong](https://turfjs.org/docs/#lineSliceAlong) | `LineString.trimmed(from:distance:)` |
| 93 | +[turf-midpoint#midpoint](https://turfjs.org/docs/#midpoint) | `mid(_:_:)` |
| 94 | +[turf-nearest-point-on-line#nearestPointOnLine](https://turfjs.org/docs/#nearestPointOnLine) | `LineString.closestCoordinate(to:)` |
| 95 | +[turf-polygon-to-line#polygonToLine](https://turfjs.org/docs/#polygonToLine) | `LineString(_:)`<br>`MultiLineString(_:)` |
| 96 | +[turf-simplify#simplify](https://turfjs.org/docs/#simplify) | `LineString.simplify(tolerance:highestQuality:)`<br>`LineString.simplified(tolerance:highestQuality:)` |
| 97 | +[turf-polygon-smooth#polygonSmooth](https://turfjs.org/docs/#polygonSmooth) | `Polygon.smooth(iterations:)` |
98 | 98 | — | `CLLocationDirection.difference(from:)`<br>`LocationDirection.difference(from:)` on Linux |
99 | 99 | — | `CLLocationDirection.wrap(min:max:)`<br>`LocationDirection.wrap(min:max:)` on Linux |
100 | 100 |
|
|
0 commit comments