0

I have a spatial software, In a database I have for each street in several cities, the lat/long of each street. And every street belongs to a zone. I'm trying to get polygons for each zone, and to do this, I need an algorithm that give me as result the smallest polygon that covers a number of points. Very similar to convex hull. convex hull is useless because it resolved it like this:

enter image description here

And, what I need is this:

enter image description here

Ariel Larraburu
  • 439
  • 1
  • 5
  • 14

2 Answers2

2

I think I have the answer, Concave hull algorithm.

Ariel Larraburu
  • 439
  • 1
  • 5
  • 14
0

There is a working npm module for calculating concave hull here: https://www.npmjs.com/package/hull.js

I use it. It's written in javascript and you can use it on server with Node.js.

karakulj
  • 123
  • 4
  • 11