Sierra sites
10 m NED
geometry
2026-07-07
What can the engines really do?
Three preliminary terrain questions: how much earth a level pad would move on a sloped foothill lot; where a storm would run across a bluff; and how much water a dammed Sierra canyon would hold. The studies were computed in about an hour and a half using two existing systems that were not built for terrain (how this was built, below).
Computed end to end from public 10 m USGS elevation; proofs of concept rather than a survey. Method · The engines behind it
01Study 1 · Building padFoothill lot · Fresno County · 37.08°N 119.49°W
Imagine a lot for sale in the foothills. You want to buy it and build a house, but the ground sits on a slope. How steep, exactly? How hard would it be to get a pad level, and how much dirt would have to be cut, filled, or trucked out to do it? You can't eyeball any of that, and it's most of the grading bill. It's the number you'd want before you make the offer: what does a level pad here cost in dirt?








The pad
You cut the high side down and fill the low side up until it's level. Put the pad at the balanced grade (2,089 ft) and the dirt you remove matches the dirt you need, so almost nothing leaves the site. On a slope, the trucking is where the money goes.
The dirt
Making the pad moves about 9,160 cubic yards (cut from the high side, placed on the low side), so modeled cut and fill approximately balance. Each figure comes from samples in the public elevation model.
The water
In the modeled surface, runoff moves southwest and concentrates at the low corner. Any drainage intervention would require field verification and site-specific engineering.
02Study 2 · RainwaterWest bluff · San Joaquin River rim · north Fresno
Say your house sits near the rim of this bluff, or you're planning to build one here. Bluffs erode, and 95 feet below runs the San Joaquin. You don't want the foundations creeping toward that edge over the years, so you need to know what every storm does to this ground: which way the rain sheds, where it gathers and cuts, and where it leaves the property. So: where does the rain run?








The slope
A steep northwest-facing bluff dropping 95 feet toward the San Joaquin, 39% at the steepest.
The runoff
This water can't be held in place on a 39% face. A 1-inch storm sheds roughly 604,000 gallons off the modeled slope, all of it running downhill.
Where it goes
The runoff gathers into a draw that cuts west-northwest down the bluff and exits toward the river. Anything built near the rim has to respect that draw: it's where the water and the erosion go.
03Study 3 · ReservoirSan Joaquin River gorge · Sierra Nevada · 37.03°N 119.57°W
A regional screening exercise may begin with many possible reservoir sites and incomplete information. This study asks a narrower question of one dry gorge with a single southern outlet: using public 10-meter elevation, what preliminary capacity and dam-height curve does the modeled surface produce? Dam the outlet, and how much would it hold?









The basin
A dry Sierra gorge that falls to a single narrow outlet on the south. Close that notch with a 256-foot dam and the canyon behind it becomes a reservoir, held on the other three sides by its own rim.
The modeled capacity
At the selected full-pool elevation, the model yields 44,457 acre-feet, about 14.5 billion gallons. The stage–storage curve reports the estimated capacity at successive waterlines.
What the estimate supports
At this resolution, the result is a preliminary capacity and dam-height estimate for comparing sites. It is not a design value and still requires surveyed elevation, calibrated hydrology, and engineering review.
This is a portfolio demonstration rather than a product. It combines Planar—a standard-library C++ geometry workbench built on a hand-written foundation and later expanded with coding agents—with a geospatial platform I architected, applied to three Sierra and foothill sites.
Neither system was built for terrain. The geospatial platform originated as a county data pipeline; Planar began with geometric primitives, polygon operations, and ear-clipping triangulation. Delaunay, Voronoi, and terrain came later.
Public USGS elevation goes in; the geometry engine turns it into a triangulated surface; earthwork, drainage, and reservoir calculations run on that surface; a real lot boundary can come from the platform. The foundational geometry primitives, polygon operations, and original ear-clipping implementation are hand-written. Coding agents later substantially revised the ear clipper and implemented the current Delaunay/Voronoi and terrain layers under my direction and review. I designed the platform architecture, schema, scoring, and test gates; coding agents produced most of its Python implementation.


A bare terminal: numbers in, numbers out. Every surface below is built from what it computes.
$ delaunay_driver --random --random-count=1500 --coord-max=1000 Generated 1500 random points within [-1000, 1000]. Input sites: 1500 Delaunay triangles: 2976 Voronoi vertices: 2976 Voronoi finite edges: 4453 Delaunay validation: passed
Those counts are the summary line, not the computation. In that 0.09 s the engine constructs every one of those objects — each triangle, each Voronoi vertex and edge, coordinates and adjacency — and then verifies the whole structure against the Delaunay condition before printing passed. The terrain surfaces above are these same structures, built from elevation samples instead of random points.


Point twoMinus1 = p2 - p1;
Point thisMinus1 = *this - p1;
// scale epsilon to the problem size
double scale = max({1.0,
fabs(twoMinus1.get_x()), fabs(twoMinus1.get_y()),
fabs(thisMinus1.get_x()), fabs(thisMinus1.get_y())});
double eps = 1e-12 * scale;
// 1) collinear?
if (fabs(cross(twoMinus1, thisMinus1)) > eps) return false;
// 2) between-ness via projection
double proj = dot(thisMinus1, twoMinus1);
if (proj < -eps) return false;$ ./interview_demo --run-sample-demo
Sample polygon
Vertices:
(-4,0)
(-1,3)
(3,4)
(5,1)
(2,-3)
(-3,-4)
Area: 46
Concave/Convex? Convex
Triangulation:
{(-3,-4), (-4,0), (-1,3)}
Center: (-2.66667,-0.333333)
Area: 7.5
{(-3,-4), (-1,3), (3,4)}
Center: (-0.333333,1)
Area: 13
...The same approach on different material: county records go in, versioned scores come out, and the map is just the interface.





How this was made
Real USGS 10-meter elevation, sampled across each site: 100 points on the pad, 576 on the bluff, and 3,721 across the reservoir basin.
The points are triangulated into a continuous surface (a TIN) by a standard-library C++ geometry workbench built on a hand-written foundation and later expanded with coding agents. 162, 1,058, and 7,200 triangles, exact to Euler's formula.
From that surface: cut and fill balanced to a pad, and rainfall routed downhill neighbor-to-neighbor to find where water concentrates.
The 3D views are plots of the mesh underneath. Triangulation, balanced cut and fill, reservoir capacity, and drainage analysis ran locally through the Planar/terrain toolchain; I directed and reviewed the agent-assisted terrain extension. Elevation comes from public USGS data, and the visualizations use external plotting libraries.




It runs on the same engine as my county GIS platform, so a lot boundary can come from official parcel data, and either study runs on any parcel in the county from its address alone, or any given coordinate boundary, provided elevation data exists.
A demonstration of the method on real public data, not a licensed survey or construction document. Locations are approximate; satellite imagery courtesy Esri World Imagery. Ten-meter elevation supports preliminary comparison only. The pipeline can also accept a surveyed point cloud, but that path is not demonstrated here.
