d3-geo-voronoi icon indicating copy to clipboard operation
d3-geo-voronoi copied to clipboard

Voronoi where each site is a segment instead of a point.

Open HDv2b opened this issue 3 years ago • 0 comments

I have a map with one or more polylines, and want to know the segment that is closest to the cursor. I've successfully done this in another library (https://github.com/Voxel8/pyvoronoi), however (besides preferring to be using JS), I'm seeing that on larger scales the voronoi chart is being warped by the earth's curvature, hence this d3-geo-voronoi seems worth a try. Problem is my understanding of geometry isn't sufficient enough to bridge the gap between generating from points to generating from segments. Does anyone please have some advice? Thanks.

HDv2b avatar Oct 21 '21 05:10 HDv2b