← Blog

Finding hills with lidar

Stillwater, Oklahoma is not a hilly town. It has 89 metres of relief across 13 kilometres and a street grid laid out on farmland. It also has 252 rideable descents, and we found all of them without leaving the desk.

Three public datasets, no permission needed

Everything here is built from data that already existed. Elevation comes from the USGS 3D Elevation Program, which is airborne lidar covering most of the United States at one metre or better. Roads come from OpenStreetMap. Aerial imagery comes from USDA NAIP at roughly 30 centimetres. All three are free, none need an API key, and two of the three are outright public domain.

The work is not getting the data. The work is deciding what counts as a hill.

The problem is already solved, just for cyclists

Finding a sustained descent in an elevation profile is exactly the problem competitive cycling solved twenty years ago, run backwards. Garmin's ClimbPro, Best Bike Split, and the FIETS index all answer the same question: given a squiggly line of elevations, where does a climb start and stop?

The obvious approach is to walk the profile and start a run wherever the grade goes negative. That produces garbage. Every driveway dip, every drainage crossing, every surveying wobble splits one good hill into six fragments.

The trick the cycling world worked out is counter-slope tolerance. A climb does not end the moment the road briefly flattens; it ends when the accumulated reversal gets big relative to what you have climbed so far. We use the same rule inverted: a descent survives until the climb-back from its lowest point exceeds half the drop achieved so far.

Borrowing that one rule is the difference between 252 runs and about fifteen hundred fragments, none of them longer than a driveway.

Thirty centimetres of noise fakes a 3% grade

Here is the trap. Lidar elevation is accurate to roughly 10 to 30 centimetres vertically. That sounds superb, and it is, until you compute grade between two points 10 metres apart. Thirty centimetres of error over a 10 metre run is a 3% grade conjured out of nothing.

Three percent is not a rounding error for us. It is the threshold where a road stops being flat and starts being rideable. The noise floor and the signal are the same size.

So grade is never measured between adjacent samples. It is measured over a rolling window of plus and minus 25 metres, which spreads the same error across 50 metres of run and drops the phantom grade to a harmless 0.6%. It is a one-line change and it is the difference between a tool and a random number generator.

Ranking by physics instead of points

Most route tools score climbs with an invented formula, usually some variation on length times gradient. We wanted the ranking to mean something physical, so instead the rider is simulated down the actual profile from a single push:

v dv/ds = g(sinθ − Crrcosθ) − (ρCdA / 2m)v²

Gravity pulls, rolling resistance and air drag push back. Rolling resistance for urethane on good asphalt is about 0.012. Drag area for a tucked skater is around 0.30 m², considerably worse than a speed skier because a skater's legs cannot be folded out of the wind and contribute nearly half the total drag.

Integrating rather than solving for terminal velocity matters, because almost no residential hill is long enough to reach terminal velocity. A 140 metre pitch at 8% and a 500 metre roll at 4% can have identical terminal speeds and completely different real ones. The physics makes length matter without anyone inventing a weighting for it.

What the map cannot see

It reads terrain. That is all it reads. It has no idea about traffic, gravel, potholes, sightlines, parked cars, driveways, whether a street is private, or whether skating it is legal where you live. The top-ranked hill in a town can be a genuinely stupid place to ride.

The most useful thing we added was not speed at all. It was runout: what happens after the bottom. We follow the road past the end of each descent and classify the terrain. A hill that bottoms out into an uphill slows you down for free. A hill that keeps dropping hands your speed to whatever is next. In Stillwater's creek-drainage terrain, 159 of 252 runs bottom out into an uphill, which is a large part of why the town is more rideable than its 89 metres of relief suggest.

Go and look at it

The map is a shortlist, not a recommendation. Every hill on it deserves a visit in daylight before it deserves a run.

Open the map