running-challenges
running-challenges copied to clipboard
Plot the Voronoi graph using geodesic polygons
At the moment the Voronoi graph uses straight lines based on distance on the WGS84 projection to the nearest parkrun. This is geographically inaccurate, and means that much of the Pacific is shown as closer to California/the Falklands than to the numerous parkruns in New Zealand. There are also inaccuracies that change while zooming, for example the line to the north of the Lecce parkrun 🇮🇹 changes angle considerably, as do the lines extending south from South Africa.
This could be implemented with d3-geo-voronoi and Leaflet.Geodesic.
Thanks for the links @xsanda .
We've seen the problems with zooming before, and believe it is a rounding error somewhere as weird things happen if the dots are quite close together. However, as it's just a bit fo fun and most people are looking zoomed in enough for it not to be an issue - or for the curvature of the earth to be really significant, it hasn't been a big enough deal to invest any serious time in fixing.
We'll certainly take a look at the libraries you've referenced at some point, but can't guarantee when we'll get time.