Live data from Hacker News

Show HN: 3D map of shade around the world

shademap.app

21–30 of 72 posts

Re: Show HN: 3D map of shade around the world

#21

Hi HN. I've been learning WebGL and working on this project for about a year. I posted it previously when it worked in 2D and wanted to share it again because the 3D really makes the shade come to life. Most of the credit for the update due to migrating from Leaflet to Mapbox GL JS.

Interesting! I had never noticed the amount of shade created by the mountain in the middle of Montreal. It almost seems wrong at first glance, the shadow it casts is huge and it covers most of the city and far beyond. But it's probably my monkey brain that doesn't notice the gradual changes and isn't aware that where I am at that moment has less light than the surrounding areas. What is " shade " according to this ma…

Bigger than you'd think, it's true! Outremont gets sunrise about 45 minutes after the eastern part of the city.

Re: Show HN: 3D map of shade around the world

#23

The WebGL update is awesome! The costs of hosting map tiles for the whole world can be large. How are you funding it?

Great question. It costs nothing up to 50K map loads [1], but I did burn some money learning along the way:

I went with Mapbox and Maptiler for tiles early on. Initially I used Leaflet with raster map tiles and raster elevation tiles. Mapbox free-tier for raster tiles was 750,000 tiles per month and I exceeded that a few months in.

Next I used Leaflet with [maplibre/mapbox]-gl-leaflet plugin which allowed me to use unlimited vector map tiles from Mapbox up to 50K map loads. However, I continued to use raster elevation tiles and these soon started exceeding 750,000 tiles per month.

Finally I switched to Mapbox GL JS. This allows you 50K map loads a month and unlimited loading of elevation and vector map tiles per map load. I used Maplibre GL JS for a bit, but it's missing the 3D terrain functionality so I went with Mapbox instead.

In general, it would cost about $100 for every 3000 visitors before switching to Mapbox GL JS.

[1] https://www.mapbox.com/pricing#maploads

Re: Show HN: 3D map of shade around the world

#24
Looks great, congrats! I have worked on the same sort of project on (and mostly off) over a while, but didn't get as far as having a nice UI on the front etc. I'd started in WebGL but then moved to a back-end server using CUDA and separate front end (mostly as I wanted to learn a bit about CUDA at the time). What did you use for your source of height data? I'd used some free LiDAR data but didn't find high resolution free LiDAR data for Scotland.

EDIT: I found your blog, so can see you used e.g. https://osmbuildings.org/documentation/data/ for buildings. I'd looked at that also but found the data a little sparse and also not so accurate, but its possibly improved since, and does look good on the rendering.

Re: Show HN: 3D map of shade around the world

#25

Looks great, congrats! I have worked on the same sort of project on (and mostly off) over a while, but didn't get as far as having a nice UI on the front etc. I'd started in WebGL but then moved to a back-end server using CUDA and separate front end (mostly as I wanted to learn a bit about CUDA at the time). What did you use for your source of height data? I'd used some free LiDAR data but didn't find high resolution…

I use Mapbox terrain RGB [1]. A good free alternative is Nextzen [2], but they do not generate tiles past zoom level 15 (Mapbox does it to 20) and there are some random elevation spikes that Mapbox has cleaned up.

I'm looking forward to a LIDAR elevation tile set becoming available because it can be loaded into Shademap without any modification and hopefully display shade from trees.

[1] - https://docs.mapbox.com/help/getting-started/mapbox-data/#ma...

[2] - https://www.nextzen.org/#terrain-tiles

EDIT: For buildings I used OSM Buildings initially, but now such data is directly encoded in the vector map tiles provided by Mapbox

Re: Show HN: 3D map of shade around the world

#26

Looks great, congrats! I have worked on the same sort of project on (and mostly off) over a while, but didn't get as far as having a nice UI on the front etc. I'd started in WebGL but then moved to a back-end server using CUDA and separate front end (mostly as I wanted to learn a bit about CUDA at the time). What did you use for your source of height data? I'd used some free LiDAR data but didn't find high resolution…

I use Mapbox terrain RGB [1]. A good free alternative is Nextzen [2], but they do not generate tiles past zoom level 15 (Mapbox does it to 20) and there are some random elevation spikes that Mapbox has cleaned up. I'm looking forward to a LIDAR elevation tile set becoming available because it can be loaded into Shademap without any modification and hopefully display shade from trees. [1] - https://docs.mapbox.com/hel…

Interesting, thanks, I'll have a look at Mapbox terrain RGB. Will be interesting to see the resolution of a LIDAR tile set if Mapbox are going to have one, I've found that I could sometimes find low-resolution free data (5M / 10M etc), but that higher resolution 25cm/50cm/1M etc was often commercial and very expensive, but that gives much more accurate results in city areas. I'll have a look at Nextzen also.

Re: Show HN: 3D map of shade around the world

#27

The WebGL update is awesome! The costs of hosting map tiles for the whole world can be large. How are you funding it?

Great question. It costs nothing up to 50K map loads [1], but I did burn some money learning along the way: I went with Mapbox and Maptiler for tiles early on. Initially I used Leaflet with raster map tiles and raster elevation tiles. Mapbox free-tier for raster tiles was 750,000 tiles per month and I exceeded that a few months in. Next I used Leaflet with [maplibre/mapbox]-gl-leaflet plugin which allowed me to use u…

Being on the HN front page is going to blow out your budget for the month probably. Hope it doesn't cost you too much! I had issues with my own site using Street View which is even more expensive than maps (https://james.darpinian.com/satellites/) until I found out you can apply for large amounts of free Google Maps API credits for educational and non-profit use. It's a little stressful because if you exceed your credits and don't deactivate the API in time you can still end up with a large bill, and the credits have to be re-approved every year in a slow and uncertain manual process. But hey, it's free and pretty generous, and nobody else has Street View so my site can't work without it.

Re: Show HN: 3D map of shade around the world

#28

Earlier quoted context omitted.

Great question. It costs nothing up to 50K map loads [1], but I did burn some money learning along the way: I went with Mapbox and Maptiler for tiles early on. Initially I used Leaflet with raster map tiles and raster elevation tiles. Mapbox free-tier for raster tiles was 750,000 tiles per month and I exceeded that a few months in. Next I used Leaflet with [maplibre/mapbox]-gl-leaflet plugin which allowed me to use u…

Being on the HN front page is going to blow out your budget for the month probably. Hope it doesn't cost you too much! I had issues with my own site using Street View which is even more expensive than maps ( https://james.darpinian.com/satellites/ ) until I found out you can apply for large amounts of free Google Maps API credits for educational and non-profit use. It's a little stressful because if you exceed your c…

It's a little early to say, but someone posted it on r/InternetIsBeautiful last month and it had about 75K visitors over two days. It looks like the front page of HN will be just a fraction (20%?) of that traffic.

Reddit is truly massive, but I appreciate the HN discussions more.

Re: Show HN: 3D map of shade around the world

#29

Earlier quoted context omitted.

Being on the HN front page is going to blow out your budget for the month probably. Hope it doesn't cost you too much! I had issues with my own site using Street View which is even more expensive than maps ( https://james.darpinian.com/satellites/ ) until I found out you can apply for large amounts of free Google Maps API credits for educational and non-profit use. It's a little stressful because if you exceed your c…

It's a little early to say, but someone posted it on r/InternetIsBeautiful last month and it had about 75K visitors over two days. It looks like the front page of HN will be just a fraction (20%?) of that traffic. Reddit is truly massive, but I appreciate the HN discussions more.

You're right, I went and looked up my stats and HN doesn't seem as large as I thought. My biggest traffic days have been from Facebook. When Starlink is visible over a major city, I sometimes get a bump in traffic from people sharing the site. I was skeptical at first that adding social share buttons was important, but I think it actually has driven quite a bit of traffic. And I've gotten a ton of twitter followers which is cool. Though they don't actually care about what I tweet about, it's just nice to have a big number on my profile.
Post reply on HN