openworld_radio_twin.providers.snapshots#
Local, pinned snapshots of downloadable point datasets such as antenna registers.
A source downloads its published export once, records the export’s release and SHA-256, and converts it to a Parquet point index sorted by 0.1-degree tiles. Queries then read only the row groups of the tiles a scene touches and never use the network. Refreshing a snapshot is an explicit operation because it changes the data every later query reads.
Functions
|
The snapshot recorded in |
|
Stream |
|
Write the point index, then switch |
|
West, south, east and north around the square ENU scene domain. |
|
Rows whose point lies inside the bounding box, read tile row by tile row. |
|
Directory holding one subdirectory of snapshots per source. |
|
Sort points by tile so a bounding-box read touches few row groups. |
Classes
|
The installed snapshot of one source. |
- openworld_radio_twin.providers.snapshots.source_cache_root(settings)[source]#
Directory holding one subdirectory of snapshots per source.
- Return type:
- class openworld_radio_twin.providers.snapshots.Snapshot(directory, release, sha256, index, metadata)[source]#
Bases:
objectThe installed snapshot of one source.
- openworld_radio_twin.providers.snapshots.current_snapshot(directory)[source]#
The snapshot recorded in
current.json, or None before the first download.
- openworld_radio_twin.providers.snapshots.install_snapshot(directory, table, *, release, sha256, metadata)[source]#
Write the point index, then switch
current.jsonto it and drop older indexes.- Return type:
- async openworld_radio_twin.providers.snapshots.download(client, url, destination, *, maximum_bytes, params=None, timeout=600)[source]#
Stream
urltodestinationwithin a size bound; return the file’s SHA-256.- Return type:
- openworld_radio_twin.providers.snapshots.query_bounds(latitude, longitude, radius_m)[source]#
West, south, east and north around the square ENU scene domain.
The margin covers the curvature of the square’s edges; placement cuts records to the exact square afterwards.