Menu

How a peak finder decides which mountains you can see, and what I measured
📰

How a peak finder decides which mountains you can see, and what I measured

DEV Community: opensource·Arthur031221·4 days ago
#PYYzfcBO
#devtoopensource#devto#dev#whichpeak#peak
Reading 0:00
15s threshold

I wanted a peak finder whose method I can read, change and host myself. So I built WhichPeak, a static web app that draws a labeled 360 degree panorama from open elevation tiles.

What it does

You open a link or drop a pin. WhichPeak reads AWS Terrain Tiles, builds the terrain in six rings of detail from 5 km out to 1000 km, and draws the view. It adds earth curvature and refraction, shades the terrain with the real sun for the hour you pick, and labels each summit that is actually above the horizon. Click a label for elevation, distance, bearing, the angle above the horizon and how far the peak clears the terrain in front of it.

There is also a line of sight tool that plots the profile between two points and names the ridge that blocks it.

How the horizon works

For each pixel column the renderer sweeps outward and keeps the highest slope it has seen. Curvature drops the ground by d squared over twice the effective radius, and refraction enlarges that radius by 1 over (1 minus k) with k set to 0.13.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.