Show HN: A map of cafes that are in the sun (sunny.coffee)

2 points by BrunoJo ↗ HN
I wanted to sit outside for coffee but there was no way to see which cafes are in the sun right now. So I built a map that shows which cafes, benches, and outdoor seats are in the sun vs. shade at any time of day.

It ray-marches building shadows live in a WebGL shader over a MapLibre map. I also pre-index all places from OpenStreetMap into H3 hex cells and serve them as static JSON on Cloudflare R2, so the client just fetches the cells in view and no backend is needed.

Feedback welcome, especially on shadow accuracy in your city. Currently only buildings and trees are taken into account when calculating the shadows but I'm planning to add terrain/mountain shadows as well.

Try it: https://sunny.coffee

2 comments

[ 0.22 ms ] story [ 6.2 ms ] thread
That's a great idea, but the only thing I'm not clear on is that predicting sun exposure is one thing, but taking into account slopes and surrounding buildings that might cast shadows in that area is another. I think this is designed more for flat areas and single-story buildings. This is a problem I personally encountered in the past and couldn't solve, but I'll try it out and see if it actually works.