
I built a small website that shows the distance between house walls and the nearest road, using OSM data.
Data-processing (Rust + python):
- I read building and road data from .osm.pbf files
- For each building wall vertex, I compute the distance to the nearest driveable road
- I write that whole data into two .geojson files (per-wall file for lower LODs, and average point per-house file for higher LODs)
- I convert those .geojsons into .pmtiles using tippecanoe
Rendering (Deckgl + MapLibre):
- I color the building walls by distance
- At low zoom, it shows one dot per building/cluster
- At high zoom, it shows detailed wall segments
Data source: OpenStreetMap
Happy to discuss and read ideas, this is my first public project and will certainly not be the last one.
by Alternative_Meal8373
2 Comments
Quick notes:
– I’ve excluded non-drivable ways such as footways or cycleways from the road set.
– Multi-polygons are not handled
– All buildings are technically considered, not houses only, will be updated later on. For instance barns or shelters or even malls are included right now, which is not the most useful data.
Tools used: OpenStreetMap, Rust (geo, rstar, osmpbf, proj), tippecanoe, GeoJSON, PMTiles, Python.
Link to the repository: [https://github.com/byjtew/osm_house_to_street](https://github.com/byjtew/osm_house_to_street)
This is really cool! I was also very much surprised to see Greece as one of the maps for this, usually Greece is not really in projects such as these!