Binary partitioning with k-d trees is silly amazing. And with OSM data in radians and pretending the planet is a perfect sphere, scikit-learn's BallTree works wonderfully for quickly finding things nearby some reference point.

Like how far away the nearest bicycle_parking is for every building in a city.

https://github.com/ellieayla/bicycle-parking-distance/blob/main/distance_from_buildings_to_nearest_bicycle_parking.geojson

#IMadeAThing #python #osm #overpassql

bicycle-parking-distance/distance_from_buildings_to_nearest_bicycle_parking.geojson at main · ellieayla/bicycle-parking-distance

Contribute to ellieayla/bicycle-parking-distance development by creating an account on GitHub.

GitHub