GithubHelp home page GithubHelp logo

Comments (4)

Faydee1220 avatar Faydee1220 commented on September 21, 2024

I have the same problem, only get two points even tolerance is 0.1

from swiftsimplify.

freeubi avatar freeubi commented on September 21, 2024

Same problem here, with 0 tolerance i got only 2 points :S

from swiftsimplify.

koloritcm avatar koloritcm commented on September 21, 2024

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.

sungkim23 avatar sungkim23 commented on September 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.