Skip to content

SVS: Photorealistic terrain texture via satellite imagery tiles #266

Description

@billmallard

Overview

The current SVS renderer draws terrain using solid color fills (green/brown by elevation band). Photorealistic SVS — like NightHawk Guardian, Garmin G3X Touch, and X-Plane — drapes aerial/satellite imagery as a texture over the terrain elevation mesh, producing near-photographic ground detail.

How It Works

The core technique is identical to what pyEfis SVS already does for terrain geometry: triangulate an elevation mesh from SRTM data, then render it via GPU. The visual upgrade replaces solid fill colors with satellite imagery texture-mapped onto that same mesh.

Elevation data: unchanged — SRTM (already in use).

Imagery layer: standard XYZ/TMS raster tiles at zoom ~14–15 (2–4 m/px for CONUS), fetched from a tile provider and applied as OpenGL textures.

Candidate Data Sources

Source Cost Resolution Licensing
Mapbox Satellite Free ≤ 50k tiles/mo ~0.5 m CONUS Attribution required; compatible with OSS
USGS National Map (TNM) Free, public domain 1 m lidar CONUS Best free option for US
NASA GIBS / Worldview Free, public domain 250 m – 15 m Lower res but no strings
Bing Maps Aerial Pay-per-use (free tier) ~0.3 m CONUS Used by Garmin / ForeFlight
Google Photorealistic 3D Tiles Pay-per-use Sub-meter + 3D buildings Requires Google Maps Platform key + Cesium SDK

Recommended starting point: Mapbox Satellite — standard XYZ tile URL, free tier is ample for flight use, attribution-compatible with GPL.

Implementation Sketch

  1. Tile fetch module: given a lat/lon bounding box and zoom level, compute the XYZ tile coordinates, download PNGs (with caching to disk), and stitch into a texture atlas.
  2. UV mapping: for each terrain mesh vertex, compute the corresponding texture coordinate from its geographic position.
  3. Renderer integration: bind the texture atlas in the OpenGL render pass; replace the elevation-band color shader with a texture lookup.
  4. Cache management: pre-fetch tiles for the visible area on startup / position change; evict old tiles to bound disk usage.

The elevation mesh geometry work is already done in the SVS renderer — this is purely an additive texture layer.

Priority / Complexity

  • Priority: Low — current SVS is functional and useful without this.
  • Complexity: Medium — requires OpenGL texture management and a tile-fetch/cache subsystem.
  • Dependencies: Mapbox account (free tier), requests or httpx for tile fetch.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions