Metadata-Version: 2.4
Name: earth-bridge
Version: 0.2.0
Summary: Open Earth Data & Cross-Cloud STAC Engine bridging Google Earth Engine, Microsoft Planetary Computer, and Overture Maps Foundation.
Author-email: Open GeoAI Developer <developer@opengeo.ai>
License-Expression: MIT
Project-URL: Homepage, https://github.com/Sai-Kumar1729/earth-bridge
Project-URL: Documentation, https://github.com/Sai-Kumar1729/earth-bridge/blob/main/README.md
Project-URL: Repository, https://github.com/Sai-Kumar1729/earth-bridge
Keywords: gis,earth-observation,google-earth-engine,planetary-computer,overture-maps,stac,remote-sensing,rasterio,geopandas
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.22
Requires-Dist: pandas>=1.5
Requires-Dist: geopandas>=0.12
Requires-Dist: shapely>=2.0
Requires-Dist: duckdb>=0.9
Provides-Extra: gee
Requires-Dist: earthengine-api>=0.1.370; extra == "gee"
Provides-Extra: stac
Requires-Dist: pystac-client>=0.6; extra == "stac"
Requires-Dist: planetary-computer>=1.0; extra == "stac"
Requires-Dist: rasterio>=1.3; extra == "stac"
Provides-Extra: all
Requires-Dist: earthengine-api>=0.1.370; extra == "all"
Requires-Dist: pystac-client>=0.6; extra == "all"
Requires-Dist: planetary-computer>=1.0; extra == "all"
Requires-Dist: rasterio>=1.3; extra == "all"
Dynamic: license-file

# 🌍 earth-bridge: Open Earth Data & Cross-Cloud STAC Engine

[![PyPI version](https://img.shields.io/badge/pypi-v0.1.0-blue.svg)](https://pypi.org/project/earth-bridge/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Google Earth Engine](https://img.shields.io/badge/GEE-Supported-34A853.svg)](https://earthengine.google.com/)
[![Microsoft Planetary Computer](https://img.shields.io/badge/Planetary_Computer-Supported-00A4EF.svg)](https://planetarycomputer.microsoft.com/)
[![Overture Maps](https://img.shields.io/badge/Overture_Maps-Supported-FF6B4A.svg)](https://overturemaps.org/)

> **Bridging Google Earth Engine, Microsoft Planetary Computer, and Overture Maps Foundation into a unified, zero-boilerplate Python SDK and Web GIS Studio.**

---

## 🚀 Key Novel Features

- **🌐 Cross-Cloud STAC Standardizer**: Dynamically converts Google Earth Engine (`ee.Image` / `ee.ImageCollection`) assets into STAC 1.0.0 (SpatioTemporal Asset Catalog) Item specification for instant consumption in QGIS and open-data platforms.
- **🔓 Zero-Auth Anonymous STAC Reader (`stac_reader`)**: Query Microsoft Planetary Computer STAC catalogs and stream satellite metadata **100% anonymously with zero login or API keys**.
- **🗺️ State-Scale Bounding Box Grid Partitioning (`tiling`)**: Automatically splits large state-scale regions into sub-district grid tiles, allowing state-wide spatial joins to process chunk-by-chunk on a 16GB RAM laptop without memory crashes.
- **🏛️ Overture Vector-Raster Spatial Joins (`overture_join`)**: Zero-copy DuckDB spatial overlay linking Overture Maps building footprints with satellite indices (NDVI, NDWI, LSWI, NBR, LST Thermal Anomaly).
- **📦 1-Click Open Dataset Exporter (`exporter`)**: Export enriched building-level spatial datasets directly to **GeoJSON**, **GeoParquet (HuggingFace compatible)**, and **STAC ItemCollections**.
- **🖥️ Interactive Web GIS Workbench**: Dark-themed visual interface featuring real-time index selection, grid partitioning overlays, bounding box synchronization, and 1-click Python/JS code generator. Live at `http://localhost:8000`.

---

## 🏗️ Architecture

```mermaid
graph TD
    A["🛰️ Earth Observation Data Sources"] --> B["Google Earth Engine"]
    A --> C["MS Planetary Computer STAC (Zero-Auth)"]
    A --> D["Overture Maps (Parquet)"]
    
    B --> E["earth-bridge Engine (D:\\earth-bridge)"]
    C --> E
    D --> E
    
    E --> F["STAC 1.0.0 JSON Specs"]
    E --> G["State-Scale Grid Partitioning"]
    E --> H["HuggingFace GeoParquet / GeoJSON"]
    E --> I["Interactive Web Studio (http://localhost:8000)"]
```

---

## 💻 Quick Start & CLI Usage

### 1. Installation

```bash
cd D:\earth-bridge
pip install -e .
```

### 2. State-Scale Grid Partitioning (CLI)

```bash
earthbridge partition --bbox 78.0,17.0,79.0,18.0 --tile-size 0.1
# Output: Partitioned state BBox into 100 memory-safe grid tiles.
```

### 3. Zero-Auth Anonymous STAC Search (CLI)

```bash
earthbridge stac-search --bbox 78.4,17.3,78.5,17.4 --collection sentinel-2-l2a
# Output: [Zero-Auth STAC] Found 5 items anonymously.
```

### 4. Python Usage Example

```python
from earthbridge import (
    compute_ndvi,
    export_gee_to_stac,
    spatial_join_overture_satellite,
    partition_state_bbox,
    search_stac_anonymously
)

# 1. Zero-auth STAC search
stac_res = search_stac_anonymously([78.4, 17.3, 78.5, 17.4])

# 2. State-scale partitioning
tiles = partition_state_bbox([78.0, 17.0, 79.0, 18.0])
print(f"Total tiles to process safely: {len(tiles)}")
```

### 5. Launch Web Studio

```bash
python D:\earth-bridge\web_studio\server.py
```
Open **`http://localhost:8000`** in your browser to interactively analyze map layers and copy cloud snippets!

---

## 🏆 Open Source Recognition & Submission Pathways

1. **Google Earth Engine Community Developer Submission**:
   - See [`GEE_COMMUNITY_SUBMISSION.md`](./GEE_COMMUNITY_SUBMISSION.md) to register `earth-bridge` as an official GEE community module.
2. **Microsoft Planetary Computer Ecosystem**:
   - Feature `earth-bridge` in Planetary Computer showcase notebooks.
3. **Overture Maps Foundation**:
   - Contribute enriched datasets generated by `earth-bridge` back to Overture Maps & OpenStreetMap.

---

## 📄 License
Released under the [MIT License](./LICENSE).
