โ† Back to news

Poles of Inaccessibility in the San Gabriel Mountains

notes.secretsauce.net|14 points|6 comments|by dima55|Aug 2, 2026

Mapping the Remote: Poles of Inaccessibility in the San Gabriel Mountains

By Dima Kogan

While hiking with a companion, a curious question arose: Where is the most isolated spot in the San Gabriel Mountains? For the purpose of this study, "isolated" is defined as the point furthest away from any existing road or trail.

Definition: A Pole of Inaccessibility is a designated point that maximizes the distance from a specific set of objects or boundaries.

While these poles are typically used to find the most landlocked point on a continent or the furthest spot from any coastline, this project applies the concept to a local scale.


๐Ÿ› ๏ธ Project Overview & Workflow

The goal was to identify a location that "hardy" adventurers could seek out as a challenge. The entire process was broken down into a modular pipeline.

The Technical Approach

To find the pole in a 2D space, the most effective method is to generate a Voronoi diagram based on the objects to be avoided. The furthest point will correspond to a Voronoi vertex.

Dealing with Earth's Curvature

The world is not flat; it is an ellipsoid with varying elevations. However, for a region the size of the San Gabriels, extreme precision isn't necessary.

I considered using a complex ellipsoidal model, but instead, I assumed the area is locally flat. I projected all data onto a plane tangent to the Earth's surface at the center of the search area.

The Error Calculation: Assuming a spherical Earth, the elevation error EE increases as one moves a distance dd away from the point of tangency:

E=Rearth2+d2โˆ’RearthE = \sqrt{R_{earth}^2 + d^2} - R_{earth}

Given that the San Gabriels span roughly 80km80\text{km}, the maximum distance from the center is d=40kmd = 40\text{km}, resulting in a maximum error of approximately 125m125\text{m}.

Conceptual Map of San Gabriel Mountains Figure 1: Conceptual representation of the query area.

Other Simplifications:

  • Topography: I ignored terrain elevation. Including it would have required a more complex algorithm and would have made the definition of "inaccessibility" too ambiguous.

๐Ÿ“ Computation Logic

To utilize a basic Voronoi algorithm, the input must be a set of points rather than line segments.

  1. Sampling: Each road and trail was sampled every 100m to ensure a dense enough point cloud for accuracy.
  2. Constraints: Normally, the solution is constrained to the convex hull of the input points to prevent the "furthest point" from being infinitely far away.
  3. Assumption: Since the perimeter of the query area (the flats) is more developed than the interior (the mountains), I assumed the pole would not lie on the convex hull. This allowed me to simply discard any Voronoi vertices falling outside the query region.

The Final Step: The algorithm iterates through every remaining Voronoi vertex, calculates the distance to its nearest input point, and selects the vertex with the maximum distance.


๐Ÿ’ป Implementation Details

The project was built as a series of independent programs to simplify debugging and development.

Task List: Implementation Steps

  • Fetch road/trail data from OpenStreetMap.
  • Project coordinates onto a tangent plane.
  • Generate a dense point set.
  • Compute Voronoi vertices.
  • Identify the maximum distance vertex.

Toolset Summary

ProgramLanguagePurposeInputOutput
query.shShellData AcquisitionCoordinates.json
massage_input.plPerlCoordinate Projection.json.dat
voronoiC++/OtherGeometric Analysis.datCoordinates

1. Data Acquisition (query.sh)

This script takes four arguments (lat0, lon0, lat1, lon1) and queries the Overpass API.

Standard Query (All Highways):

[out:json]; 
way ["highway"] ($lat0, $lon0, $lat1, $lon1); 
(._; >;); 
out;

Filtered Query (Excluding Trails): If one wishes to allow trails but avoid roads, the query is modified:

[out:json]; 
way ["highway"] ["highway" != "footway"] ["highway" != "path"] ($lat0, $lon0, $lat1, $lon1); 
(._; >;); 
out;

Example Execution: $ ./query.sh 34.1390884 -118.4944153 34.5020298 -117.5852966

2. Data Massaging (massage_input.pl)

This script converts latitude/longitude pairs into (x,y) tuples on the tangent plane. It also adds a 4-value header defining the data bounds to help filter outlying vertices.

$ ./massage_input.pl query_34.1390884_-118.4944153_34.5020298_-117.5852966.json

3. Final Computation

The Voronoi computation is surprisingly efficient. For each vertex, the program identifies a neighboring cell and calculates the distance from the vertex to the cell center. The vertex with the largest distance is crowned the Pole of Inaccessibility.


Updates:

  • I have successfully visited the furthest Pole and placed a physical register there.
  • A similar analysis has been performed for the contiguous United States.
  • The source code is available at: https://github.com/dkogan/inaccessibility