Skip to content

Imaging access analysis

Lox computes per-(spacecraft, AOI) access windows for two sensor families:

Both share the same area-of-interest primitive (Aoi) and the same result type (AccessResults). See the individual sensor pages for worked examples.

Areas of interest

An Aoi is a closed geographic polygon defined by (longitude, latitude) pairs in degrees. The first and last vertex must be the same:

import lox_space as lox

# Rectangular bounding box around Rome
rome = lox.Aoi([(12.2, 41.7), (12.7, 41.7), (12.7, 42.1), (12.2, 42.1), (12.2, 41.7)])

You can also load an AOI from a GeoJSON string:

sicily = lox.Aoi.from_geojson('{"type":"Polygon","coordinates":[[[13,37],[16,37],[16,39],[13,39],[13,37]]]}')

Spacecraft without a payload of the appropriate type are silently skipped during analysis. Multiple AOIs can be passed to a single analysis run:

analysis = lox.OpticalAccessAnalysis(
    scenario,
    aois=[("rome", rome), ("sicily", sicily)],
    step=30 * lox.seconds,
)

Results

Both OpticalAccessAnalysis and SarAccessAnalysis return an AccessResults object. Call windows(spacecraft_name, aoi_name) to retrieve the list of access windows for a given spacecraft–AOI pair:

results = analysis.compute()
for window in results.windows("S2A", "rome"):
    iv = window.interval()
    print(f"{iv.start()}{iv.end()}  ({float(iv.duration()):.0f}s)")

Pass direction

Each access window carries the spacecraft's pass direction (PassDirection.Ascending or PassDirection.Descending) at the window midpoint. Useful for InSAR coherence, change-detection workflows, and disambiguating the two near-identical windows per orbit produced by SarPayload with LookSide.Either.

for window in results.windows("s1a", "europe"):
    print(window.interval(), window.direction())

For LEO orbits over non-polar AOIs the direction is essentially constant through any single window (a typical LEO pass is short relative to a pole crossing). The midpoint sample is representative.


Aoi

An area of interest (AOI) defined as a geographic polygon.

Coordinates follow GeoJSON convention: longitude/latitude in degrees.

Parameters:

  • coords

    List of (longitude, latitude) tuples forming the polygon exterior ring. The ring should be closed (first == last).

Examples:

>>> aoi = lox.Aoi([(10, 45), (11, 45), (11, 46), (10, 46), (10, 45)])
>>> aoi = lox.Aoi.from_geojson('{"type":"Polygon","coordinates":[[[10,45],[11,45],[11,46],[10,46],[10,45]]]}')

Methods:

from_geojson classmethod

from_geojson(geojson: str) -> Self

Parse an AOI from a GeoJSON string.

Expects a GeoJSON Polygon geometry, Feature, or FeatureCollection.


AccessResults

Results of an access analysis.

Provides access windows for each (spacecraft, AOI) pair.

Methods:

  • all_windows

    Return all access windows for all (spacecraft, AOI) pairs.

  • windows

    Return access windows for a specific (spacecraft, AOI) pair.

all_windows

all_windows() -> dict[tuple[str, str], list[AccessWindow]]

Return all access windows for all (spacecraft, AOI) pairs.

windows

windows(spacecraft_id: str, aoi_id: str) -> list[AccessWindow]

Return access windows for a specific (spacecraft, AOI) pair.

Parameters:

  • spacecraft_id

    (str) –

    Spacecraft identifier.

  • aoi_id

    (str) –

    AOI identifier.

Returns:

  • list[AccessWindow]

    List of AccessWindow objects, or empty list if pair not found.