Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Euclidean distance tiles #1552
This pull request addresses issue #941 by creating a Euclidean distance field from a set of points. The operation creates a Voronoi diagram from the input points and rasterizes each resulting polygonal cell to an output DoubleArrayTile using a simple distance function from the point that generated the Voronoi cell.
A note on complexity: this method builds a Delaunay triangulation in O(n log n) time, generates the Voronoi diagram in O(n) time, and the rasterization function applied to each pixel is O(1). Thus, the expectation is that the performance of this module ought to be fairly reasonable.