Metadata-Version: 2.3
Name: satpass
Version: 0.1.0
Summary: Get the next satellite overpass (Sentinel-1, Sentinel-2, Landsat-8, Landsat-9) for any location.
Author: Samuel Bancroft
Author-email: Samuel Bancroft <samuel.bancroft@energyaspects.com>
Requires-Dist: beautifulsoup4>=4.14.3
Requires-Dist: geopandas>=1.1.3
Requires-Dist: lxml>=6.0.2
Requires-Dist: pandas>=2.3.3
Requires-Dist: requests>=2.32.5
Requires-Dist: shapely>=2.1.2
Requires-Dist: tabulate>=0.10.0
Requires-Dist: timezonefinder>=8.2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# satpass

Get the next satellite overpass (Sentinel-1, Sentinel-2, Landsat-8, Landsat-9) for any location.

Acquisition plans are fetched from ESA and USGS and cached locally for 12 hours.

## Installation

```bash
pip install satpass
```

Or with uv:

```bash
uv add satpass
```

## Usage

### Command Line

```bash
satpass <lat> <lon> <satellite> [--date YYYY-MM-DD]
```

**Satellites**: `sentinel1`, `sentinel2`, `landsat8`, `landsat9`, `landsat`

**Examples:**

```bash
# Next Sentinel-2 overpass from today
satpass 59.706 28.433 sentinel2

# Next Sentinel-2 overpass on or after a specific date
satpass 59.70629085831534 28.433021598704343 sentinel2 --date 2026-03-25

# Next Landsat overpass (either L8 or L9, whichever is sooner)
satpass 34.05 -118.24 landsat --date 2026-03-25
```

Output (JSON):

```json
{
  "satellite": "sentinel2",
  "date": "2026-03-26 10:14:22+00:00",
  "orbit": 81
}
```

### Python API

```python
from satpass import get_next_overpass
from datetime import datetime, timezone

result = get_next_overpass(
    lat=59.70629085831534,
    lon=28.433021598704343,
    satellite="sentinel2",
    after_date=datetime(2026, 3, 25, tzinfo=timezone.utc),
)
print(result)
# {'satellite': 'sentinel2', 'date': datetime(...), 'orbit': 81}
```

`after_date` defaults to now if omitted.

## Data Sources

- **Sentinel-1 / Sentinel-2**: ESA acquisition plan KML files from the [Copernicus portal](https://sentinels.copernicus.eu)
- **Landsat-8 / Landsat-9**: USGS [Landsat acquisition cycles JSON](https://landsat.usgs.gov) and WRS path/row lookup
