I am using turf voronoi on roughly 15000 points. I define a bounding box previously to voronoi creation and then I get the following error:
\node_modules\d3-voronoi\build\d3-voronoi.js:496
end = cellHalfedgeEnd(cell, edges[halfedges[iHalfedge]]), endX = end[0], endY = end[1];
^
TypeError: Cannot read properties of null (reading '0')
at clipCells (\node_modules\d3-voronoi\build\d3-voronoi.js:496:77)
at new Diagram (\node_modules\d3-voronoi\build\d3-voronoi.js:863:5)
at voronoi (\node_modules\d3-voronoi\build\d3-voronoi.js:956:12)
at Function.voronoi.polygons (\node_modules\d3-voronoi\build\d3-voronoi.js:965:12)
at Module.voronoi (file:///node_modules/@turf/voronoi/dist/es/index.js:61:8)
Hey, thanks for raising. I appreciate this might be tedious, but are you able to provide the smallest set of points that exhibit this behaviour with us as a GeoJSON FeatureCollection?
I am using turf voronoi on roughly 15000 points. I define a bounding box previously to voronoi creation and then I get the following error:
The relevant code is:
I tried to use a smaller set (10 points) and it works.
EDIT: I have now noticed that the problem only arises on data with points closer than a meter. Shouldn't this be supported?