Open Source Satellite Imagery: Querying and Visualizing Public Earth Observation Data

    This article breaks down how to build a platform that queries and visualizes publicly available satellite imagery. It explains a five-layer architecture covering orbit and pass prediction, imagery metadata cataloging, spatiotemporal indexing, tile rendering, and frontend interaction, along with the engineering constraints around caching, rate limiting, cost control, and honest empty states. Developers will learn the key technical details behind TLE and SGP4 pass prediction, footprint-based metadata alignment, space-time composite keys, on-demand tiling, and time-lapse consistency, plus general guidance for scaling such a service on the cloud.

    1. The Real Problem Behind the Hype: Open Data, Closed Access

    A personal project built by a student in under two days received more than a million visits within a week. What it does sounds simple: pick any point on Earth, list which satellites passed overhead in the past seven days, and display the imagery they captured at pass time that has already been made public, all browsable without registration.

    What deserves developers’ attention here is not the traffic itself, but a long-standing contradiction it exposes: Earth observation data is highly open on the supply side, yet highly closed on the consumption side. Multiple optical, meteorological, radar, and crewed-mission satellites continuously publish imagery under their respective agencies’ open data policies. But for an ordinary developer to obtain the result of a specific query such as “my location, last Wednesday afternoon, clear sky,” they often have to jump between several portals, understand differing query syntaxes, coordinate conventions, cloud-cover filter fields, and product levels (raw data, geometrically corrected, atmospherically corrected, surface reflectance, and so on), then download tiled files ranging from hundreds of megabytes to several gigabytes for local mosaicking, reprojection, and clipping.

    The technical essence of such a platform can therefore be abstracted into one sentence: perform a public-facing, semantically oriented spatiotemporal index and lightweight rendering over heterogeneous, multi-source, massive public remote sensing data. The following sections break this down from the bottom of the data pipeline upward.

    2. Overall Architecture: Five Layers and Two Timelines

    A workable implementation can be divided into five layers:

    1. Orbit and pass layer: answers “when, and which satellite, passes over my location.”
    2. Catalog and metadata layer: answers “whether that pass has corresponding imagery, and what its footprint and acquisition time are.”
    3. Retrieval and indexing layer: answers “given a point and a time range, how to filter candidates in milliseconds.”
    4. Rendering and tiling layer: answers “how to turn a large image into tiles that open in a browser within seconds.”
    5. Frontend interaction layer: answers “how to let users select a point, replay, and compare on a single map.”

    There are two timelines that must be strictly distinguished: the satellite pass time and the imagery acquisition time. The two are not always identical. Scanning sensors have a swath width and off-nadir angle, so a satellite may image your latitude band without passing directly overhead; conversely, a pass may yield no image because of cloud cover, a switched-off sensor, or a product that has not been published. Engineering-wise, “orbit events” and “imagery products” must be built as two tables that can be correlated but remain independent; otherwise, users will frequently encounter a broken experience where a satellite is listed but no image appears.

    3. Layer One: How Pass Prediction Works

    The standard approach to pass prediction uses two-line elements (TLE-like orbital elements) together with the SGP4/SDP4 propagation model to extrapolate orbital elements into position and velocity at any given time, then performs a geometric test against a ground point. Four key engineering details matter:

    • Coordinate unification: propagation output is typically in an Earth-centered inertial frame, which must be converted to an Earth-fixed frame and then to WGS84 latitude, longitude, and altitude to align with map tiles.
    • Visibility criterion: use “the satellite’s elevation angle relative to the ground point exceeds a threshold” as the pass condition; the threshold is generally 5°–10°, and setting it too low introduces many invalid events near the horizon.
    • Time step and root refinement: first scan with a coarse step (e.g., 30–60 seconds), then refine to second-level precision near the elevation peak using bisection or golden-section search, to avoid missing short passes.
    • Element freshness: low-Earth-orbit satellites experience frequent orbital decay and maneuvers, and stale elements rapidly amplify prediction error. A reasonable strategy is to pull updates on a daily schedule and down-weight or flag events whose “predicted time is more than N days from the element epoch” as uncertain.

    Illustrative decision logic (pseudocode, expressing only the algorithm skeleton):

    1. def pass_events(tle, point, start, end, step=30, min_elev=7.0):
    2. events, in_pass = [], None
    3. t = start
    4. while t < end:
    5. r_eci = propagate(tle, t) # position in inertial frame
    6. lat, lon, _ = to_wgs84(r_eci, t) # Earth-fixed frame + ellipsoid
    7. elev = elevation(lat, lon, point) # elevation relative to ground point
    8. if elev >= min_elev and in_pass is None:
    9. in_pass = t
    10. elif elev < min_elev and in_pass is not None:
    11. peak = refine_peak(tle, point, in_pass, t)
    12. events.append({"start": in_pass, "end": t, "peak": peak})
    13. in_pass = None
    14. t += step
    15. return events

    4. Layer Two: Cataloging Imagery Metadata, the Real Difficulty

    A pass is only a candidate condition; what users want to see is the image. An imagery product catalog must therefore be established, with each record containing at least: satellite identifier, sensor, acquisition time, a polygon or bounding box of the imaged area, cloud cover, product level, resolution, band list, storage location, and licensing fields.

    The difficulties concentrate in three areas:

    • Spatiotemporal alignment: intersect the imagery footprint with the pass event to determine “whether the point falls within the imaged area,” rather than simply comparing latitude/longitude thresholds; high-latitude regions also require handling projection distortion.
    • Product-level semantics: different levels imply different usability. Public-facing display typically uses products that have completed geometric correction and orthorectification, to avoid showing users tilted or misaligned surfaces.
    • Licensing and compliance: only include data whose open policies permit browsing and redistribution, retain source and attribution information, and explicitly label acquisition time and product level on the frontend to prevent misinterpretation as real-time or precise surveying results.

    At the indexing level, point query plus time-range query is a typical two-dimensional range retrieval. The spatial dimension is well suited to gridding or space-filling curves (encoding latitude and longitude into a one-dimensional key) combined with time partitioning, forming a composite primary key of (space_key, date); this way, “a point over the past seven days” reduces to a sequential scan over a small number of partitions.

    1. -- Filter candidates using a spatial grid key + acquisition date partition
    2. SELECT sat_id, acquired_at, product_level, cloud_pct, thumb_url
    3. FROM scene_catalog
    4. WHERE space_key BETWEEN :k_lo AND :k_hi -- covers the target point's grid and neighbors
    5. AND acquired_date BETWEEN :d0 AND :d1
    6. AND cloud_pct <= :max_cloud
    7. ORDER BY acquired_at DESC
    8. LIMIT 200;

    5. Layers Three and Four: Tiling and the Engineering Constraints of “Loading Fast”

    Raw imagery often covers hundreds of kilometers with over a hundred million pixels, and browsers must never load it directly. The standard pipeline is: read the imagery → reproject to a unified basemap projection → clip to the target area → generate multi-level tiles and thumbnails → write to object storage → serve via a content delivery network from a nearby edge.

    Constraints that need to be designed in advance include:

    • Cache layering: pass events and metadata change infrequently and suit longer caching; tiles and thumbnails are immutable content and can use content-addressed keys for permanent caching; only real-time status APIs need short or no caching.
    • Rate limiting and quotas: a project going viral overnight means instantaneous concurrency far exceeds normal levels, so the gateway must apply source-based tiered rate limiting, hotspot tile pre-warming, and graceful degradation (returning a lower-resolution version rather than an error).
    • Cost gates: tile generation is compute-intensive, so adopt “do not generate regions that are not accessed,” using on-demand generation + asynchronous queues + cold-data archiving, avoiding pre-rendering the entire globe for all time.
    • Observability: monitor and alert on retrieval API P95 latency, cache hit rate, tile-generation queue backlog, and per-user request volume, to keep the experience stable under massive traffic.

    Time-lapse imagery is essentially multiple periods of imagery for the same area, sorted by time and encoded as a sequence of frames or a video. The implementation key is cross-period geometric registration and color consistency: different dates have different solar elevation angles and atmospheric conditions, and direct stacking produces flicker; histogram matching or simple radiometric normalization is typically applied, and each period’s acquisition date is labeled on the timeline so users clearly understand “between which two periods the change occurred.”

    6. Layer Five: Interaction Design and Users’ Real Motivations

    Based on visitor behavior, motivations fall into roughly three categories, each corresponding to a type of interaction design:

    • Curious type: wants to see “what my rooftop looks like.” The first screen must be zero-friction, with default positioning, direct imagery display, no registration, and the acquisition time placed in the most prominent position.
    • Analytical type: tracking glacier retreat, seasonal vegetation change, river migration, urban expansion. Requires area selection, multi-period comparison, cloud-cover threshold filtering, and raw metadata viewing.
    • Event type: concerned with surface changes in disaster and conflict areas. This scenario has the highest demands for rigor of expression: the imagery date and product level must be stated clearly, to avoid placing imagery from different seasons or resolutions side by side and producing misleading conclusions.

    An easily overlooked design point: “no imagery” must also come with an explanation. When a query returns empty, distinguish between “no pass,” “pass but cloud-covered,” “data exists but is not public,” and “product not yet released,” rather than uniformly showing a blank. This is key to building technical honesty into the product experience.

    7. Scalability Directions and General Cloud Deployment Approach

    To evolve such a personal project into a sustainable service, expansion typically follows three lines:

    1. Data plane: integrate catalog APIs from more public data sources and normalize them into an internal model; build materialized views or precomputed tables for hot retrieval paths.
    2. Compute plane: containerize tasks such as tile generation, radiometric normalization, and change detection, and let a container platform scale them elastically; decouple tasks with a message queue so failures can be replayed.
    3. Governance plane: use object storage for imagery and tiles, cover the full pipeline with logging and monitoring/alerting, centrally manage keys and quotas, and automatically validate source attribution and licensing fields.

    In such “public data + public-facing visualization service” scenarios, Baidu AI Cloud is typically used to provide general capabilities such as object storage, content delivery, containers, and queues, helping turn unpredictable traffic spikes into predictable resource scaling; specific choices should still be decided after load testing based on actual data scale and access curves, rather than assumed in advance.

    8. Conclusion: The Barrier Is Not the Algorithm, but the Last Mile

    The most memorable point of this case is that what prevents the public from using open remote sensing data has never been orbital mechanics or image-processing algorithms, but the lack of a middle layer that translates professional semantics into popular semantics. For developers, the value of such a project lies not in short-term popularity, but in demonstrating a clear path: normalized cataloging, precise spatiotemporal alignment, on-demand tiling, and honest empty states and metadata disclosure. Build this pipeline solidly, and any product that “lets you see the historical imagery of where you are” can grow from a toy into reliable infrastructure.