How It Works
Understand the technology behind XEarthLayer's on-demand satellite imagery streaming.
XEarthLayer uses a combination of technologies to stream satellite imagery directly into X-Plane, downloading only what you need, when you need it.
The Problem
Traditional orthophoto scenery for X-Plane requires downloading entire regions upfront:
- Hundreds of gigabytes per continent, even if you only fly a few routes
- Hours of download and installation time before you can fly
- Large disk space requirements for scenery you may never use
The Solution
XEarthLayer takes a just-in-time streaming approach:
- Virtual Filesystem: Creates a FUSE file system that X-Plane uses to read scenery tiles
- Just-In-Time Fetching: When X-Plane requests tile resources, XEarthLayer fetches it from satellite providers in real-time and then returns the tile dependencies
- Two Tier Caching: Downloaded tiles are cached to memory as X-Plane can request the same tile multiple times in succession. The map image chunks that are used to construct tiles are cached to disk, saving time when revisiting the same location multiple times.
You only download the scenery you actually fly over. No wasted bandwidth or disk space on areas you’ll never visit.
Architecture
Scenery Request Pipeline Stages
- Request: X-Plane requests a DSF from XEarthLayer
- Image Resource: X-Plane decodes DSF and creates requests for textures
- Cache Check: XEarthLayer first checks memory cache for completed tile DDS image, then disk cache for image chunks required to create DDS image. If either is found they are returned to X-Plane
- Download: If not cached, XEarthLayer downloads requires tile chunks from the provider to prepare for assembly
- Assembly: Combine 256 small image chunks into a 4096×4096 DDS image
- Encode: Compress 4096×4096 image into DDS format (BC1/BC3) using one of three backends — Software (pure Rust), ISPC SIMD (default, 5–10× faster), or GPU compute shaders (fastest, requires a wgpu-compatible GPU)
- Cache: Store completed DDS image in memory and cache image chunks to disk
- Serve: Return the DDS texture to X-Plane
Prefetching
XEarthLayer reads your aircraft’s position and heading directly from X-Plane’s built-in Web API — no configuration required. On X-Plane 12.1.1 and later, the Web API is enabled by default, so prefetching works out of the box.
The prefetch system uses two strategies, selected automatically based on flight phase:
- Ground (ground speed < 40 kt): Loads a ring of tiles around the perimeter of X-Plane’s already-loaded scenery area. Since the aircraft could taxi in any direction, the ring is symmetric — no heading bias.
- Cruise (airborne): Maintains a sliding prefetch box biased in the direction of travel. The box covers roughly 9° per axis, overlapping X-Plane’s ~6×6 DSF load area so tiles are ready before the simulator crosses into the next region. The forward bias slides proportionally with heading — at cardinal headings the primary axis gets up to 80/20 bias, while at diagonals both axes share equal bias.
A brief transition phase bridges the two: when a takeoff is detected (ground speed exceeds 40 kt), prefetching is suppressed until the aircraft climbs 1,000 ft above the departure elevation (or a 90-second timeout elapses). This reserves system resources for X-Plane while it loads departure scenery. Once cruise is confirmed, prefetching ramps up gradually from 25% to full rate over 30 seconds to avoid flooding the pipeline.
Consolidated Mounting
XEarthLayer uses a single FUSE mount point (zzXEL_ortho) for all of your installed scenery packages. Whether you have one region or a dozen, they are all merged into one virtual folder that X-Plane reads from. Custom tile patches (for airport add-ons, for example) are included in the same mount and automatically take priority over regional package tiles. This means your scenery_packs.ini only needs one ortho entry, and resource usage stays low regardless of how many regions you have installed.
Performance
- Scene load: 1-2 minutes with cached data (down from 5+ minutes when downloading chunks)
- Cache hits: <10ms response time
- Cold download: 1-2 seconds per tile with 1 Gig+ internet connection
Technical Details
XEarthLayer is written in Rust for performance and memory safety. Key technologies:
- fuse3: Async FUSE filesystem implementation
- tokio: Async runtime for concurrent I/O
- reqwest: HTTP client with connection pooling
- image: JPEG decoding and manipulation