Comments (4)
I have the same problem, only get two points even tolerance is 0.1
from swiftsimplify.
Same problem here, with 0 tolerance i got only 2 points :S
from swiftsimplify.
Related to my issue here: #7
Your points differ less than 0.01. A tolerance of 10 seems pretty obvious that it would simplify to only two points.
Maybe you are under the assumption that 10 means 10 meters? The tolerance is in the same unit as the input values, so you have a tolerance of 10 degrees of the earth.
You can't use WGS80 coordinates is you want a consistent tolerance as the conversion between degrees latitude/longitude and meters are different for the two dimensions and also changes for different parts of the world
In your case you could convert the points to MKMapPoint
and then find a suitable tolerance
by calling MKMapPointsPerMeterAtLatitude(_:)
and multiply with your tolerance in meters.
from swiftsimplify.
Hey Gunnar! Thanks for the help, actually I ended up getting it to work with the following tolerance of 0.00010, I did further research at the time and noticed it was due to how the coordinates were being interpreted xx.xxxxxx instead of xx.xx
from swiftsimplify.
Related Issues (11)
- Pod doesn't work HOT 1
- [Enhancement]check count before func simplify
- Extensions not public HOT 1
- API for using ArraySlice HOT 1
- Error or less-than-ideal-naming on distance functions
- Returned array with only two values HOT 3
- Swift 2.0 & iOS 7 HOT 2
- SPM Target Integrity Warning: range of supported deployment target versions is 9.0 to 14.5.99
- Elapsed time calculated in Seconds, but shown as Milliseconds
- Use projected coordinates when simplifying CLLocationCoordinate2D data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftsimplify.