> Historical scientific method. The version labels identify the method described; consult the active site’s readouts for the current model and reference frame. [Data & Licenses](../legal/data-and-licenses.html).

---

# Giza spatial terrain method

Method reference: R26.

## Purpose

R26 uses one geographic terrain surface for both display and visibility calculations. A monument point is obscured when that surface intersects the observer’s line of sight before the point. Selecting a monument changes the analysis target, not the terrain surface.

## Terrain extent and sampling

Giza builds the architectural features first, then derives a route-aligned local frame from the observer toward the geographic centre of all declared feature vertices. The required region includes:

- the observer;
- the Quick Measure target;
- every declared architectural feature vertex;
- a back margin, forward margin, and lateral angular margin.

The mesh is a rectilinear grid in that local plan frame. Every vertex is converted back to a real GPMP easting/northing and WGS84 latitude/longitude before export. The grid is observer-specific in extent and resolution, but its elevations are geographic source values rather than projected-screen values.

### Adaptive density and stop conditions

Preferred nominal grid spacing is distance-aware:

- up to 1.2 km route length: 10 m mesh spacing;
- up to 3 km: 15 m;
- up to 8 km: 25 m;
- up to 15 km: 33 m;
- longer routes: 50 m, increased when needed to remain within the vertex limit.

The implementation may select a coarser candidate to remain below **36,000 vertices**. The complete observer-to-feature and observer-to-target region is limited to **30 km**. Construction stops when the route exceeds the limit or any required vertex lacks a numerical terrain elevation.

Mesh spacing is not source resolution. The embedded local grid may be sampled at approximately 10 m spacing while its GLO-30 source remains approximately 30 m native resolution. R26 records both values and does not claim that oversampling creates new terrain detail.

## Elevation references

Each compact mesh vertex retains:

- WGS84 latitude and longitude;
- GPMP easting and northing;
- `workingSurfaceElevationM`;
- `rawDiagnosticElevationM`;
- source-table index;
- physical-footprint interface metadata where applicable;
- source native resolution and grid spacing through the source table;
- an observer-ground anchor flag.

GLO-30 and Mapzen source identities and datum status remain source-qualified. Mapzen values are not silently relabelled EGM2008. The observer vertex is anchored to the exact imported observer ground elevation so the rendered mesh meets the declared eye-height reference without a source-cell mismatch.

## Monument footprints

A current DSM may contain the monument itself. Giza therefore supplies a `terrainInterface` tied to each monument's true geographic base footprint.

- G1 uses a piecewise-planar quadrilateral surface derived from the four proxy corner elevations.
- G2 uses the assumed constant 69.000 m level base.
- G3 uses the assumed constant 73.000 m level base.

Inside a declared footprint, the working surface uses that base interface rather than counting the monument twice. A short transition anchored to the physical footprint is limited by the native source half-cell diagonal, clamped to 7.5–35 m, because coarse raster cells can be contaminated at their edges. This transition is geographic and source-resolution-qualified; it is not an observer-to-feature corridor, projected silhouette clip, or prescribed visibility adjustment. Raw current-surface values remain available in `rawDiagnosticElevationM`.

## Shared surface

Ouranos converts every selected terrain elevation from WGS84 geodetic coordinates to ECEF and then to observer-centred east/north/up coordinates. It reconstructs two triangles per row-major grid cell.

The resulting triangle array is authoritative for all of the following:

1. visible terrain colour;
2. WebGL depth writing;
3. first terrain-ray intersections;
4. azimuth skyline calculations;
5. G1/G2/G3 corner and apex visibility;
6. terrestrial target obstruction;
7. blocker coordinates, distance, elevation, source, and cell reporting.

The same triangles form the visible ground and the terrain used for obstruction calculations.

## Visibility rule

For any monument point, Ouranos compares the point distance with the nearest intersection of the shared terrain mesh along the same normalized observer ray:

```text
terrain distance < monument-point distance − contact tolerance → terrain hidden
no nearer terrain intersection → visible
intersection within contact tolerance → terrain contact/tangent
```

Terrain to the side of that ray cannot conceal the point.

## Modes

`unified_spatial_surface` is the default working mode. `raw_dsm_diagnostic` uses the same row/column topology and triangle indices but substitutes preserved raw current-surface elevations. Switching modes rebuilds projection and reports without creating a second terrain system.

Retained R20–R24 payloads without `spatialMesh` remain importable through an explicit `legacy_profile_corridor` fallback. New R26 Giza scenes require the spatial mesh.

## Scientific limitations

- The terrain is present-surface-derived, not surveyed or reconstructed ancient bare earth.
- Approximately 30 m native GLO-30 data cannot establish metre-scale ground form for a very close observer.
- Modern alteration, structures, vegetation, embankments, and DSM artifacts may remain outside declared monument footprints.
- G2 and G3 base levels remain model assumptions.
- Terrestrial atmospheric refraction is not applied.
- Complete route coverage is required; unavailable regional source data stop scene construction.
