Thursday, April 11, 2019

Voronoi Mapping on the Fly


Jackson Voekel has created an interesting interactive map which allows you to create a Voronoi map on the fly. His Voronoi Leaflet Map allows you to add any number of markers to any location in the world and create a Voronoi map showing different regions based on the proximity to each of your added points.

A Voronoi map partitions a location into different regions based on the distance to specified points on the map. The screenshot above shows an example Voronoi map created using the Voronoi Leaflet Map. This map divides London into areas based on the nearest Premiership football team. To create the map I dropped a map marker on London's six EPL teams and then drew a large polygon around much of London. The Voronoi Leaflet Map then instantly divided my large polygon into six distinct London regions, each of these regions being determined by the nearest EPL team.

The beauty of Jackson's map is that you can use it to create Voronoi maps on the fly. For example you could drop markers on Manhattan subway stations to see New York divided into regions based on the nearest subway stop. Alternatively, you could drop markers on the U.S. state capitals to create a new map of the United States, where the country is divided up into new states based on the proximity to state capitals.

I believe that the Voronoi Leaflet Map uses Turf.js. If you are interested in making your own interactive Voronoi maps then here is the documentation on creating Voronoi maps with Turf.js.

No comments: