SwiftSimplify alternatives and similar libraries
Based on the "Math" category.
Alternatively, view SwiftSimplify alternatives based on common mentions on social networks and blogs.
-
VectorMath
A Swift library for Mac and iOS that implements common 2D and 3D vector and matrix functions, useful for games or vector-based graphics -
SwiftMath
DISCONTINUED. ๐ A math framework for Swift. Includes: vectors, matrices, complex numbers, quaternions and polynomials. -
Swift-MathEagle
A general math framework to make using math easy. Currently supports function solving and optimisation, matrix and vector algebra, complex numbers, big int, big frac, big rational, graphs and general handy extensions and functions.
InfluxDB - Purpose built for real-time analytics at any scale.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of SwiftSimplify or a related project?
README
SwiftSimplify is a tiny high-performance Swift polyline simplification library ported from Javascript's Simplify.js. Original work come from Leaflet, a JS interactive maps library by Vladimir Agafonkin.
It uses a combination of Douglas-Peucker and Radial Distance algorithms. Works both on browser and server platforms.
โ โ Star our github repository to help us! โ โ
Why
Polyline simplification dramatically reduces the number of points in a polyline while retaining its shape, giving a huge performance boost when processing it and also reducing visual noise. For example, it's essential when rendering a 70k-points line chart or a map route in the browser using MapKit.
[SwiftSimplify](./SwiftSimplify.gif)
Requirements
- iOS 8.0, watchOS 2.0, tvOS 9.0
- Swift 5.x+
Communication
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.
Installation
SwiftSimplify is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "SwiftSimplify"
Usage
Usage is pretty straightforward: in fact you need just call the SwiftSimplify's class method simplify by passing your configuration:
let allPoints: [Point2DRepresentable] = ...
let simplifiedPoints = SwiftSimplify.simplify(allPoints, tolerance: tolerance)
Allowed parameters are:
points
: An array of points. SwiftSimplify supports Swift's generic so you can pass an array of objects which are conforms toPoint2DRepresentable
protocol (bothCGPoint
andCLLocationCoordinate2D
objects supports it).tolerance
: (1 by default) Affects the amount of simplification (in the same metric as the point coordinates)highQuality
: (false by default) Excludes distance-based preprocessing step which leads to highest quality simplification but runs ~10-20 times slower.
Author
Daniele Margutti, [email protected]
You can reach me on twitter @danielemargutti.
My web site is danielemargutti.com
License
SwiftSimplify is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the SwiftSimplify README section above
are relevant to that project's source code only.