Show HN: Algorithmically finding the longest line of sight on Earth (opens in a new tab)alltheviews.world
412 pointsWe go into all the details at https://alltheviews.world
And there's an interactive map with over 1 billion longest lines, covering the whole world at https://map.alltheviews.world Just click on any point and it'll load its longest line of sight.
Some of you may remember Tom's post[1] from a few months ago about how to efficiently pack visibility tiles for computing the entire planet. Well now it's done. The compute run itself took 100s of AMD Turin cores, 100s of GBs of RAM, a few TBs of disk and 2 days of constant runtime on multiple machines.
If you are interested in the technical details, Ryan and I have written extensively about the algorithm and pipeline that got us here:
* Tom's blog post: https://tombh.co.uk/longest-line-of-sight
* Ryan's technical breakdown: https://ryan.berge.rs/posts/total-viewshed-algorithm
This was a labor of love and we hope it inspires you both technically and naturally, to get you out seeing some of these vast views for yourselves!
1. https://news.ycombinator.com/item?id=45485227
Comments (181) 49 threads
Show all comments
Showing thread 4 of 49
Edit: to be clear the difference stems from our coordinates. Our starting points are:
41.059167,77.683333 (me)
41.0181,77.6708 (you)
And our end points are:
36.295364,78.755593 (me)
36.314,78.7654 (you)
Also I calculate the distance assuming the Earth is spherical (which gives 538 km) not the standard geodesic (which would give 537 km).
And in the DEM data I measure the distance from the center of a cell to another (not the edge), while measuring from edge to edge may explain a difference of at most 0.1 km as the DEM resolution is 3 arcseconds.
So clearly we disagree on the coordinates of the exact actual sightline as we have a 7 km difference :-)
Edit #2: clearly the error is on your side. I should have checked this first, but the coordinates you give for the "To" point (41.0181,77.6708) land in a valley with the south view completely blocked so it's impossible to view 500+ km south as you claim. Look at where the marker lands on this Google Maps Terrain: https://maps.app.goo.gl/PgBWxi31WZC6vk3V9
There's two forms of interpolation going on here that I'm not sure you or Dr Dueschle are using. We interpolate a "band of sight" of single a degree for our azithmual projection, but uniquely we also rotate the DEM elevations around all the observers rather than the observer around to see all the elevations.
The effects of the first can be lessened by lowering the band of sight such that we only process half a degree at a time so that we make sure we get more coverage further away. We plan on running some more experiments by rotating to cover more points.
The algorithm is already fairly expensive to run against the whole world so we weren't particularly interested in that level of coverage for the full earth.
For total viewshed area, our algorithm comes in at roughly a percent or so difference which was what we used as our benchmark for correctness.
All this to say, no, we don't think you both are wrong, we've been looking at making ours more accurate. At a world scale that's quite computationally expensive, so we didn't use that methodology for our initial launch. We see our results as validation of yours, not as something we've disproved.
Edit: grammar
The error I've experienced hunting bugs tends to be within about .5-2%. That's a vibe, not an empirical "I've calculated the error to be 1.5%". We definitely expect that bound to tighten as we get access to more computational resources.
I do not think this is numerical however. I think it's more directly related to rasterization, interpolation, and not enough angle coverage. We have fairly good numerical and viewshed tests to double check we don't have weirdness going on there.
I'm afraid I don't have a good answer. I'm sure with future runs will get closer to you and udeuschle.de
I thought of you when we saw Colombia appear so high up in the list, I remembered that's something you'd found too.
Continue this thread — 1 reply