Show HN: Algorithmically Finding the Longest Line of Sight on Earth

alltheviews.world

254 points by tombh 7 hours ago


We're Tom and Ryan and we teamed up to build an algorithm with Rust and SIMD to exhaustively search for the longest line of sight on the planet. We can confirm that a previously speculated view between Pik Dankova in Kyrgyzstan and the Hindu Kush in China is indeed the longest, at 530km.

We 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

crazygringo - 2 hours ago

This is so clever and interesting. Congratulations!

But... I want to see a photo! Or at least what it looks like in Google Earth, with a red arrow marking the furthest point.

It feels like the site is setting you up for the big suspense of the longest line of sight... and then it's just a line on a 2D map.

I think it would also really help if the maps themselves were at an angle in 3D with an exaggerated relief, with the line drawn in 3D, so you can get a sense of how it travels between two peaks.

It seems like you've put a ton of effort into this project. I think with just a tiny bit more work on the page, you could really put the "cherry on top".

And with those visualizations, get it picked up by a lot of major news outlets. This is a really fun story, the kind of stuff newspapers and magazines love to run. It's easily understandable, it's a cool new "record", it's a story of someone's perseverance paying off, and then you show a Google Earth image simulating the view as the payoff. (And from slightly above, if necessary, to take account for refraction.)

EDIT: Here, I used Google Earth to show the two points. Unfortunately it's from high above, since otherwise Earth wouldn't show the pin for Pik Dankova, but it at least gives a general idea of the area:

https://imgur.com/hindu-kush-to-pik-dankova-530km-adbVFwb

And here is the Google Earth link for the view, but it doesn't contain the pins:

https://earth.google.com/web/search/41.0181,77.6708/@36.6644...

sllabres - 4 minutes ago

I think this is the furthest true photography [1] with 443 km distance, into the sunrise (corrected from sunset)

[1] https://beyondrange.wordpress.com/2016/08/03/pic-de-finestre...

hdersch - 10 minutes ago

"Viewsheds" of any location can be calculated and matched with photographs using "GeoImageViewer", an application I wrote a couple of years ago. Any feature in the photo can be interactively identified in a mapview and vice versa, including the boundary of the viewshed. See the link below for a couple of examples.

I wonder how atmospheric refraction is handled in the calculations for the longest line of sight. Since it (a) strongly affects the line of sight, and (b) depends on temperature and weather, how is a static "world record" possible, or even defined? E.g. objects may appear 400m higher in 200km distance under typical conditions.

https://hdersch.github.io/Viewing.html

_whiteCaps_ - 7 minutes ago

Oh, neat. I do an amateur radio challenge called SOTA where any peak with 150m prominence is a candidate. British Columbia has detailed LIDAR data so I figure it would be straightforward to do, I just don't know anything about GIS to make it happen. I'll have to browse the repo for some hints.

rob74 - 5 hours ago

Cool project! Unfortunately our planet has this pesky (but very useful!) thing called atmosphere, which makes all these extra-long lines of sight only theoretical, I guess? Ok, the longest line of sight is mostly over the Taklamakan desert, so probably very dry air (which might however have some dust/sand in it), but still?

mrb - 3 hours ago

Hi Tom it's Marc, I'm glad to see you finished your sightline project ! Any clue why you report the longest sightline as "530.8 km" when it seems to be actually 538.1 km? That's what my code calculated (https://news.ycombinator.com/item?id=45512970) that's what Dr. Ulrich Deuschle also calculates (https://www.udeuschle.de/panoramas/panqueryfull.aspx?mode=ne...) You, Deuschle, and I all use the same DEM data (https://www.viewfinderpanoramas.org/Coverage%20map%20viewfin...) and the same refraction coeff (0.13), and nearly the same camera height (1.5m for me, 2.0m for Deuschle, and 1.65m for you—and these differing heights make no difference given the coarse DEM resolution). Something must be slighly off in your computations? Or do you think both Deuschle and I are wrong?

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

brucehoult - 5 hours ago

I tried the summit of Mt Ruapehu here in NZ and got 358.8 km to Mt Owen. Not bad as I was expecting Tapuae-o-Uenuku which is a little shorter at 342 km.

One advantage in NZ is that on a nice day you actually have a good chance of seeing it.

Oh ... clicking on Mt Owen doesn't return the favour ... or the other nearest peaks. But Culliford Hill does show a return back to Ruapehu, 355.4 km. Clicking on Tapuae-o-Uenuku also, as expected, gives a line to Ruapehu: 342.3km.

Mt Cook is high, but has too many other high peaks near it.

Mt Taranaki is isolated, but doesn't turn up any very long distances.

I don't expect any other candidates in NZ.

Update: actual and accidental photo of Tapuae-o-Uenuku from Ruapehu (342 km), seven months ago.

https://www.reddit.com/r/newzealand/comments/1m9p0bh/tapuaeo...

And, as pointed out in a comment, also Mount Alarm 2.5 km further.

What is the longest in North America? Or Europe proper -- not Elbrus (which I've not been to but have been close enough to see, from several places e.g. from a house in Lermontov (~94 km only), summit of Beshtau (93 km), Dombai ski field (~63 km), somewhere on A157 (~50km).

danielsamuels - 5 hours ago

The website claims the longest line of sight in my city is 24.7km from someone's garden that is surrounded by houses. I walk past this particular spot on my way to the gym. I walk downhill from my house to get there. I seriously question the reliability of this data.

amingilani - 2 hours ago

Now we just need to put two hams with 2m/70cm radios to make the longest line-of-sight QSO on the planet. Bonus points for QRP.

Definitions:

* Hams: Amateur radio operators.

* QSO: conversation or contact between two radio stations.

* QRP: Low power, typically under 5 watts.

hybrid_study - 2 hours ago

Maybe including an actual picture of the sight would be helpful here?

comonoid - an hour ago

I've seen Mallorca from the Tibidabo mountain in Barcelona (the website states it is 194km). It required number of attempts for perfect atmosphere.

This is an independent observation from the Fabra Observatory: https://english.elpais.com/elpais/2015/03/03/inenglish/14253...

jstanley - 6 hours ago

Neat. I did a related project a little while ago. I wasn't interested in how far I can see from everywhere, so much as what I can see from one place in particular.

So in mine you can click on a spot and it draws black lines over any land that is occluded by terrain, within 100km.

(But all with AI-generated JavaScript, not cool Rust and SIMD stuff)

https://incoherency.co.uk/line-of-sight-map/

observationist - an hour ago

I found my big summer hike. It's the farthest point that can be seen from the highest point near where I live. I can make the hike and then get some pictures of that highest point, from the farthest point away it has a line of sight.

Thanks for this tool!

croisillon - an hour ago

Related: https://news.ycombinator.com/item?id=34609865

werds - 2 hours ago

You can see Scotland from Wales! https://map.alltheviews.world/longest/-3.9754324057705617_53...

justjash - 2 hours ago

Pretty interesting. I recently got some cheap Meshtastic devices just to play around with and it looks like the longest line of sight from my house is about 20 miles. Might have to leave one at home and see if I can directly connect to it from the general area it is showing.

1970-01-01 - 4 hours ago

There was a post here about 6 years ago for a site that calculated line of site for any two points on a map with both the max line of sight and 2D cross sectional view of the terrain difference between the two points. I haven't been able to find it since 2020, but it was awesome.

zoobab - 6 hours ago

Cool places to try wifi long shots.

I did some longshots back in the early days of wifi.

noosphr - 4 hours ago

Since you have the data could you show how far you can see in every direction rather than the longest direction?

__mharrison__ - 2 hours ago

I was expecting photos...

alvsilvao - 5 hours ago

This is so interesting. Thanks for sharing. I have been working on a similar project where instead of finding all the sights I have focused on finding all the cycling climbs in the world. I think there is a sense of satisfaction in finding ALL of something.

Cheers

www.climbs.cc

lutusp - 35 minutes ago

On this general topic, guess how distant the horizon (the "vanishing point") is, across open water, assuming clear weather and a six-foot-tall observer standing on a beach? The answer is a mere six miles.

Next curious fact -- the two towers of the Golden Gate Bridge are perfectly vertical, but the top of one tower is 4.6 cm (1.8 inches) farther away from the other, compared to the bottom of the towers -- because there is a small angular tilt between the towers. Guess why ...

Okay, it's because the towers are independently vertical with respect the center of the earth, are horizontally separated by 4,200 feet, and each tower is 746 feet tall. These dimensions assure that the towers have a distinct angle with respect to each other. It's a small difference, but it's not zero.

I thought about these things (and many others) during my four-year solo around-the-world sail (https://arachnoid.com/sailbook/).

IshKebab - 3 hours ago

Can you actually see anything in real life though?

keepamovin - an hour ago

And yet all you have to do is look up to the stars and you can see millions, trillions of kilometeres away. Starlight straight line of sight in so many directions. Almost nothing in the way. Crazy.

This is cool tho. What about to an ocean point from a mountain? Was there anything longer?

em-bee - 4 hours ago

how close is this to the theoretical maximum?

if we put mt. everest on a sperical cow, i mean on a planet with only ocean, how far could you see there? how far away could a second peak of the same height be, before it gets hidden by the curvature of the planet?

ourmandave - 5 hours ago

Hopefully this won't become a tool for the Flat Earthers. =)

alansaber - 4 hours ago

This is the geography I was promised in school

sandos - 3 hours ago

I mean this is coming to the same result as heywhatsthat, apparently using the same dataset. Sadly it is not really correct, in that I think it blends a lot of things, including TREEs into the height. Its very obvious many places that some height is just not true, unless you account for buildings and treetops.

I believe I _might_ have a 33km view FROM MY ROOF, from 2m above ground I have much less than 1 km.

colechristensen - 4 hours ago

It's wild in the upper midwest you can SEE the glacial effects on the terrain better than any topo map I've seen before.

drcongo - 4 hours ago

This is my favourite kind of HN post, and I absolutely love this one. Would love to see photos from each of these views.

pestatije - 5 hours ago

It be nice to get the 3 or 5 longest distances from a specific point, not just the longestest

umpriel - 7 hours ago

Claps!

OhNoNotAgain_99 - an hour ago

[dead]