karakulj karakulj -4 years ago 170
Javascript Question

Hull.js npm module Node.js returns convex hull instead of concave hull

I use this node.js module: https://www.npmjs.com/package/hull.js to calculate concave hull. On this link in the section "How it works" there are 3 steps about how it works. But in my case the algorithm stops on the 2nd step. So, it gives me convex hull instead of concave. What is the problem? The version of npm is 1.1.4, and the version of node.js 0.6.12.

Answer Source

As far as I understand you use hull.js to process geo points. Recently I have added map based example with concave hull calculation, maybe it will be useful for you. You can find an example here: http://andriiheonia.github.io/hull/#ex4

I think problem with concavity parameter, try to reduce it. In my example I use concavity 0.0011 for the geo points.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download