Find the flattest route between any two points in SF
Source Entity
Hacker News

A new browser-based tool allows users to map the flattest walking or cycling routes across San Francisco. It uses high-precision USGS lidar data and OpenStreetMap to calculate optimal paths based on a distance-to-climb trade-off.
Navigating San Francisco: The Science of Urban Topography
San Francisco is world-renowned for its iconic, formidable hills, which present a unique challenge for pedestrians and cyclists alike. A newly developed browser-based routing tool now provides a sophisticated solution to this geographic hurdle by calculating the flattest possible paths between any two points in the city. By leveraging 160,000 individual street segments, the tool offers a data-driven approach to urban navigation that prioritizes personal comfort and physical exertion levels over mere distance.
The Technical Architecture: Lidar and Open Data
At the core of this tool is a robust integration of high-resolution data sources. It utilizes 1-meter USGS lidar elevation maps, which provide the granular precision necessary to account for the city's extreme vertical shifts. This elevation data is mapped onto the Overture and OpenStreetMap street graph, ensuring that the routing engine understands not just the horizontal path, but the vertical cost associated with every block. By processing this information directly in the user's browser, the tool maintains high performance while ensuring user privacy and accessibility.
The Trade-off Slider: Distance vs. Elevation
One of the most innovative features of this application is the interactive slider that manages the trade-off between total distance and cumulative climbing. The algorithm is designed to identify Pareto-optimal routes—those where no alternative path is simultaneously shorter and flatter. By quantifying the cost of climbing—where one foot of elevation gain is weighted against 200 feet of walking—the tool allows users to customize their journey based on their tolerance for hills. This mathematical approach effectively turns the subjective experience of 'a hard walk' into a quantifiable, navigable variable.
Specialized Logic for Diverse Transit
The tool distinguishes between different modes of transport, specifically tailoring its logic for pedestrians and cyclists. Notably, the system allows for the inclusion of stairways when calculating walking routes, acknowledging that in a city like San Francisco, a staircase is often the flattest path between two points. Conversely, these stairways are excluded for cycling calculations, ensuring that bike routes remain practical and compliant with the mechanical limitations of bicycles. This attention to detail reflects a deep understanding of urban mobility.
Broader Implications and Future Trends
The release of this tool highlights a growing trend in urban technology: the move toward 'human-centric' routing. While traditional mapping services like Google Maps or Apple Maps generally prioritize the shortest travel time or distance, this specific tool addresses the 'hidden' costs of urban terrain. As cities continue to promote micro-mobility and active transportation, such specialized routing engines will likely become standard, helping residents and tourists navigate complex landscapes with greater ease and confidence.
Conclusion
This tool serves as a powerful testament to the value of open-source data and high-resolution surveying. By making complex topographical data accessible through a simple interface, it empowers San Francisco residents to reclaim their city, reducing the intimidation factor of its infamous hills. As this technology matures, it may serve as a blueprint for other mountainous cities globally, fundamentally changing how we perceive and traverse the urban environment.