geochip 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- geochip-3.0.0/LICENSE +21 -0
- geochip-3.0.0/PKG-INFO +229 -0
- geochip-3.0.0/README.md +187 -0
- geochip-3.0.0/geochip/__init__.py +36 -0
- geochip-3.0.0/geochip/auth.py +273 -0
- geochip-3.0.0/geochip/cli.py +235 -0
- geochip-3.0.0/geochip/config.py +115 -0
- geochip-3.0.0/geochip/datasets.py +172 -0
- geochip-3.0.0/geochip/downloader.py +407 -0
- geochip-3.0.0/geochip/geometry.py +300 -0
- geochip-3.0.0/geochip/tiler.py +278 -0
- geochip-3.0.0/geochip/ui.py +376 -0
- geochip-3.0.0/geochip/uploader.py +205 -0
- geochip-3.0.0/geochip.egg-info/PKG-INFO +229 -0
- geochip-3.0.0/geochip.egg-info/SOURCES.txt +24 -0
- geochip-3.0.0/geochip.egg-info/dependency_links.txt +1 -0
- geochip-3.0.0/geochip.egg-info/entry_points.txt +3 -0
- geochip-3.0.0/geochip.egg-info/requires.txt +20 -0
- geochip-3.0.0/geochip.egg-info/top_level.txt +1 -0
- geochip-3.0.0/pyproject.toml +75 -0
- geochip-3.0.0/setup.cfg +4 -0
- geochip-3.0.0/tests/test_cli_and_auth.py +65 -0
- geochip-3.0.0/tests/test_datasets_and_downloader.py +140 -0
- geochip-3.0.0/tests/test_devops_reviewer.py +114 -0
- geochip-3.0.0/tests/test_geometry.py +169 -0
- geochip-3.0.0/tests/test_tiler.py +93 -0
geochip-3.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
ο»ΏMIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 GeoChip Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
geochip-3.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: geochip
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: GeoChip CLI: Interactive geospatial pipeline for multi-satellite imagery ingestion, raster chipping, and Roboflow annotation.
|
|
5
|
+
Author: GeoChip CLI Contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Anovvy/GeoChip-CLI
|
|
8
|
+
Project-URL: Repository, https://github.com/Anovvy/GeoChip-CLI
|
|
9
|
+
Project-URL: Issues, https://github.com/Anovvy/GeoChip-CLI/issues
|
|
10
|
+
Keywords: geospatial,earth-engine,sentinel-2,landsat,roboflow,remote-sensing,cli
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: earthengine-api>=1.0.0
|
|
23
|
+
Requires-Dist: pyshp>=2.3.0
|
|
24
|
+
Requires-Dist: pyproj>=3.6.0
|
|
25
|
+
Requires-Dist: rasterio>=1.3.0
|
|
26
|
+
Requires-Dist: numpy>=1.24.0
|
|
27
|
+
Requires-Dist: pillow>=10.0.0
|
|
28
|
+
Requires-Dist: requests>=2.31.0
|
|
29
|
+
Requires-Dist: tqdm>=4.65.0
|
|
30
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
31
|
+
Requires-Dist: roboflow>=1.1.0
|
|
32
|
+
Requires-Dist: rich>=13.0.0
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
|
|
36
|
+
Requires-Dist: ruff>=0.6.0; extra == "dev"
|
|
37
|
+
Requires-Dist: bandit>=1.7.9; extra == "dev"
|
|
38
|
+
Requires-Dist: pip-audit>=2.7.0; extra == "dev"
|
|
39
|
+
Requires-Dist: build>=1.2.0; extra == "dev"
|
|
40
|
+
Requires-Dist: twine>=5.0.0; extra == "dev"
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# GeoChip CLI
|
|
44
|
+
|
|
45
|
+
<p align="center">
|
|
46
|
+
<b>Beginner-Friendly Satellite Imagery Ingestion, Raster Chipping, and Roboflow Annotation Pipeline</b>
|
|
47
|
+
</p>
|
|
48
|
+
|
|
49
|
+
<p align="center">
|
|
50
|
+
<img src="https://img.shields.io/badge/Python-3.10%20%7C%203.11%20%7C%203.12-blue.svg" alt="Python Versions">
|
|
51
|
+
<img src="https://img.shields.io/badge/CLI-GeoChip-06B6D4.svg" alt="GeoChip CLI">
|
|
52
|
+
<img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License MIT">
|
|
53
|
+
<img src="https://img.shields.io/badge/Satellites-Sentinel--2_|_Landsat_|_Sentinel--1_SAR_|_MODIS_|_DEM-orange.svg" alt="Multi-Satellite">
|
|
54
|
+
<img src="https://img.shields.io/badge/Annotation-Roboflow-purple.svg" alt="Roboflow">
|
|
55
|
+
</p>
|
|
56
|
+
|
|
57
|
+
<p align="center">
|
|
58
|
+
<img src="docs/assets/hero-banner.gif" alt="GeoChip CLI Hero Banner" width="820">
|
|
59
|
+
</p>
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Overview
|
|
64
|
+
|
|
65
|
+
**GeoChip CLI** is a native Python command-line tool that guides you from defining an Area of Interest (AOI) to downloading cloud-filtered satellite imagery from **Google Earth Engine (GEE)**, slicing rasters into ML-ready image chips, and uploading labeled task batches to **Roboflow**.
|
|
66
|
+
|
|
67
|
+
### Key Highlights
|
|
68
|
+
|
|
69
|
+
- **Beginner-Friendly Interactive UI**: Arrow-key menus, live GEE/Roboflow connection status badges, date validation, progress spinners, and a **Quick Start: Full Pipeline** mode.
|
|
70
|
+
- **Multi-Sensor Earth Observation Catalog**:
|
|
71
|
+
- **Copernicus Sentinel-2 L2A (10m)** β Optical multispectral with QA60 + SCL cloud masking
|
|
72
|
+
- **USGS Landsat 9 & Landsat 8 C2 L2 (30m)** β Surface reflectance with `QA_PIXEL` masking
|
|
73
|
+
- **Copernicus Sentinel-1 SAR GRD (10m)** β All-weather, cloud-penetrating radar
|
|
74
|
+
- **MODIS Terra Surface Reflectance (250m/500m)** β Daily global revisit
|
|
75
|
+
- **NASA SRTM Digital Elevation Model (30m)** β Global elevation terrain
|
|
76
|
+
- **Single-Scene or Cloud-Free Composite**: Pick an individual acquisition or merge scenes with **Median**, **25th Percentile (Q25)**, **Mean**, or **Lowest Cloud Cover**.
|
|
77
|
+
- **Raster Chipping & WGS84 Manifest**: Slice GeoTIFFs into `160Γ160`, `320Γ320`, `640Γ640`, or `1280Γ1280` px PNG chips grouped into task batches with a WGS84 `manifest.json`.
|
|
78
|
+
- **Direct Roboflow Upload**: Push task folders straight to Roboflow as annotation batches, with masked secret handling.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Architecture & Pipeline Flow
|
|
83
|
+
|
|
84
|
+
```mermaid
|
|
85
|
+
flowchart TD
|
|
86
|
+
subgraph Step1["Step 1: Download Satellite Imagery"]
|
|
87
|
+
A["AOI File (GeoJSON or Shapefile)\ndata/aoi/"] --> B["Auto-Reproject CRS to WGS84\n& Select Satellite Dataset"]
|
|
88
|
+
B --> C["Date Range, Cloud Filter\n& GEE Catalog Query"]
|
|
89
|
+
C -->|"Single Scene or Composite"| D["Raw UInt8 GeoTIFF\ndata/raw/*.tif"]
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
subgraph Step2["Step 2: Chipping & Roboflow Upload"]
|
|
93
|
+
D --> E["Select Chip Size\n160 / 320 / 640 / 1280 px"]
|
|
94
|
+
E --> F["Tile Grid + WGS84 manifest.json\ndata/chips/<raster>/task*/"]
|
|
95
|
+
F --> G{"Upload to Roboflow?"}
|
|
96
|
+
G -->|"Yes"| H["Roboflow Annotation Batches"]
|
|
97
|
+
G -->|"Local Only"| I["Saved Locally"]
|
|
98
|
+
end
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Quickstart Installation
|
|
104
|
+
|
|
105
|
+
**Requirement:** Python **3.10+** (modern geospatial wheels bundle GDAL and PROJ automatically).
|
|
106
|
+
|
|
107
|
+
### Option 1: One-Command Installer (Recommended for Beginners)
|
|
108
|
+
|
|
109
|
+
**Windows (PowerShell):**
|
|
110
|
+
```powershell
|
|
111
|
+
irm https://raw.githubusercontent.com/Anovvy/GeoChip-CLI/main/scripts/install.ps1 | iex
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**macOS / Linux (Bash):**
|
|
115
|
+
```bash
|
|
116
|
+
curl -fsSL https://raw.githubusercontent.com/Anovvy/GeoChip-CLI/main/scripts/install.sh | bash
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Option 2: Install via `pip` / `pipx`
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
pip install git+https://github.com/Anovvy/GeoChip-CLI.git
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Launch GeoChip CLI
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
GeoChip
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
To verify your installed version or run inside a specific project folder:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
GeoChip --version
|
|
135
|
+
GeoChip --work-dir path/to/project
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Preparing Your Area of Interest (AOI)
|
|
141
|
+
|
|
142
|
+
Place one or more AOI files inside `data/aoi/` in your working folder:
|
|
143
|
+
|
|
144
|
+
- **GeoJSON (Recommended for Beginners)**: Draw a polygon at [geojson.io](https://geojson.io), save as `.geojson`, and drop that single file into `data/aoi/`.
|
|
145
|
+
- **ESRI Shapefile**: Place `.shp`, `.shx`, `.dbf`, and `.prj` inside `data/aoi/`. Projected coordinate systems (such as UTM) are automatically reprojected to WGS84 (`EPSG:4326`).
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Credentials Setup
|
|
150
|
+
|
|
151
|
+
Credentials are stored securely in `~/.config/geochip/.env` (with optional local `.env` overrides), so they work across any directory:
|
|
152
|
+
|
|
153
|
+
1. Run `GeoChip` and choose **`π Setup Credentials & Authentication`** (or run `GeoChip auth`).
|
|
154
|
+
2. **Google Earth Engine**: Sign in via browser OAuth and enter your GCP Project ID (registered for Earth Engine at [console.cloud.google.com/earth-engine/configuration](https://console.cloud.google.com/earth-engine/configuration)).
|
|
155
|
+
3. **Roboflow (Optional)**: Enter your Private API Key (masked on input), Workspace Slug, and Target Project ID.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## CLI Subcommands (Scripting & Automation)
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Interactive main menu
|
|
163
|
+
GeoChip
|
|
164
|
+
|
|
165
|
+
# Authentication setup
|
|
166
|
+
GeoChip auth --login
|
|
167
|
+
GeoChip auth --roboflow
|
|
168
|
+
|
|
169
|
+
# Download satellite imagery interactively
|
|
170
|
+
GeoChip download
|
|
171
|
+
|
|
172
|
+
# Slice a GeoTIFF into chips headlessly
|
|
173
|
+
GeoChip chip --raster data/raw/sentinel-2_AOI-1_median.tif --chip-size 640 --chips-per-task 5
|
|
174
|
+
|
|
175
|
+
# Upload generated batches to Roboflow
|
|
176
|
+
GeoChip upload --chips-dir data/chips/sentinel-2_AOI-1_median --task all
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Repository Structure
|
|
182
|
+
|
|
183
|
+
```text
|
|
184
|
+
GeoChip-CLI/
|
|
185
|
+
βββ .github/
|
|
186
|
+
β βββ scripts/
|
|
187
|
+
β β βββ devops_pr_reviewer.py # AGY SDK Senior DevOps PR Reviewer (4-tier Gemini fallback)
|
|
188
|
+
β βββ workflows/
|
|
189
|
+
β β βββ ci.yml # PR CI: Ruff, Pytest, Build, Bandit, CodeQL, pip-audit, AGY review
|
|
190
|
+
β β βββ cd.yml # Tag CD: SemVer dist/ build, Canary Pre-Release, Prod promotion
|
|
191
|
+
β βββ dependabot.yml # Automated dependency & action updates
|
|
192
|
+
βββ docs/
|
|
193
|
+
β βββ assets/
|
|
194
|
+
β βββ hero-banner.gif # Terminal hero banner animation
|
|
195
|
+
βββ geochip/
|
|
196
|
+
β βββ __init__.py # Package exports & version (3.0.0)
|
|
197
|
+
β βββ auth.py # GEE OAuth & Roboflow credential setup
|
|
198
|
+
β βββ cli.py # Main GeoChip CLI entrypoint & subcommands
|
|
199
|
+
β βββ config.py # Global/local .env config, workspace paths & secret masking
|
|
200
|
+
β βββ datasets.py # Satellite catalog definitions & cloud masks
|
|
201
|
+
β βββ downloader.py # Optimized GEE query, compositing & GeoTIFF download
|
|
202
|
+
β βββ geometry.py # GeoJSON & Shapefile loader with auto CRS reprojection
|
|
203
|
+
β βββ tiler.py # Raster chipping & WGS84 manifest.json generator
|
|
204
|
+
β βββ ui.py # Interactive menus, spinners & masked prompts
|
|
205
|
+
β βββ uploader.py # Roboflow batch uploader
|
|
206
|
+
βββ scripts/
|
|
207
|
+
β βββ install.ps1 # Windows one-command installer
|
|
208
|
+
β βββ install.sh # macOS/Linux one-command installer
|
|
209
|
+
βββ tests/ # Offline unit & regression test suite
|
|
210
|
+
βββ AGENTS.md # Engineering, CI/CD, Git & multi-agent governance
|
|
211
|
+
βββ CHANGELOG.md # Release history (Keep a Changelog)
|
|
212
|
+
βββ cliff.toml # Automated changelog generator config
|
|
213
|
+
βββ LICENSE # MIT License
|
|
214
|
+
βββ pyproject.toml # Package metadata, GeoChip scripts & tool configs
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Development & Release Workflow
|
|
220
|
+
|
|
221
|
+
1. Create a feature branch from `main` and make atomic commits following [AGENTS.md](AGENTS.md).
|
|
222
|
+
2. Open a Pull Request targeting `main` β CI runs linting, matrix tests, wheel build checks, Bandit/CodeQL SAST, `pip-audit`, and the **AGY SDK Senior DevOps PR Reviewer**.
|
|
223
|
+
3. After the Project Owner merges the PR, pushing a SemVer tag (`vMAJOR.MINOR.PATCH`) triggers CD to build `dist/`, publish a Canary Pre-Release, and promote to Production after manual approval.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## License
|
|
228
|
+
|
|
229
|
+
This project is licensed under the [MIT License](LICENSE).
|
geochip-3.0.0/README.md
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# GeoChip CLI
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<b>Beginner-Friendly Satellite Imagery Ingestion, Raster Chipping, and Roboflow Annotation Pipeline</b>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img src="https://img.shields.io/badge/Python-3.10%20%7C%203.11%20%7C%203.12-blue.svg" alt="Python Versions">
|
|
9
|
+
<img src="https://img.shields.io/badge/CLI-GeoChip-06B6D4.svg" alt="GeoChip CLI">
|
|
10
|
+
<img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License MIT">
|
|
11
|
+
<img src="https://img.shields.io/badge/Satellites-Sentinel--2_|_Landsat_|_Sentinel--1_SAR_|_MODIS_|_DEM-orange.svg" alt="Multi-Satellite">
|
|
12
|
+
<img src="https://img.shields.io/badge/Annotation-Roboflow-purple.svg" alt="Roboflow">
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<img src="docs/assets/hero-banner.gif" alt="GeoChip CLI Hero Banner" width="820">
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Overview
|
|
22
|
+
|
|
23
|
+
**GeoChip CLI** is a native Python command-line tool that guides you from defining an Area of Interest (AOI) to downloading cloud-filtered satellite imagery from **Google Earth Engine (GEE)**, slicing rasters into ML-ready image chips, and uploading labeled task batches to **Roboflow**.
|
|
24
|
+
|
|
25
|
+
### Key Highlights
|
|
26
|
+
|
|
27
|
+
- **Beginner-Friendly Interactive UI**: Arrow-key menus, live GEE/Roboflow connection status badges, date validation, progress spinners, and a **Quick Start: Full Pipeline** mode.
|
|
28
|
+
- **Multi-Sensor Earth Observation Catalog**:
|
|
29
|
+
- **Copernicus Sentinel-2 L2A (10m)** β Optical multispectral with QA60 + SCL cloud masking
|
|
30
|
+
- **USGS Landsat 9 & Landsat 8 C2 L2 (30m)** β Surface reflectance with `QA_PIXEL` masking
|
|
31
|
+
- **Copernicus Sentinel-1 SAR GRD (10m)** β All-weather, cloud-penetrating radar
|
|
32
|
+
- **MODIS Terra Surface Reflectance (250m/500m)** β Daily global revisit
|
|
33
|
+
- **NASA SRTM Digital Elevation Model (30m)** β Global elevation terrain
|
|
34
|
+
- **Single-Scene or Cloud-Free Composite**: Pick an individual acquisition or merge scenes with **Median**, **25th Percentile (Q25)**, **Mean**, or **Lowest Cloud Cover**.
|
|
35
|
+
- **Raster Chipping & WGS84 Manifest**: Slice GeoTIFFs into `160Γ160`, `320Γ320`, `640Γ640`, or `1280Γ1280` px PNG chips grouped into task batches with a WGS84 `manifest.json`.
|
|
36
|
+
- **Direct Roboflow Upload**: Push task folders straight to Roboflow as annotation batches, with masked secret handling.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Architecture & Pipeline Flow
|
|
41
|
+
|
|
42
|
+
```mermaid
|
|
43
|
+
flowchart TD
|
|
44
|
+
subgraph Step1["Step 1: Download Satellite Imagery"]
|
|
45
|
+
A["AOI File (GeoJSON or Shapefile)\ndata/aoi/"] --> B["Auto-Reproject CRS to WGS84\n& Select Satellite Dataset"]
|
|
46
|
+
B --> C["Date Range, Cloud Filter\n& GEE Catalog Query"]
|
|
47
|
+
C -->|"Single Scene or Composite"| D["Raw UInt8 GeoTIFF\ndata/raw/*.tif"]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
subgraph Step2["Step 2: Chipping & Roboflow Upload"]
|
|
51
|
+
D --> E["Select Chip Size\n160 / 320 / 640 / 1280 px"]
|
|
52
|
+
E --> F["Tile Grid + WGS84 manifest.json\ndata/chips/<raster>/task*/"]
|
|
53
|
+
F --> G{"Upload to Roboflow?"}
|
|
54
|
+
G -->|"Yes"| H["Roboflow Annotation Batches"]
|
|
55
|
+
G -->|"Local Only"| I["Saved Locally"]
|
|
56
|
+
end
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Quickstart Installation
|
|
62
|
+
|
|
63
|
+
**Requirement:** Python **3.10+** (modern geospatial wheels bundle GDAL and PROJ automatically).
|
|
64
|
+
|
|
65
|
+
### Option 1: One-Command Installer (Recommended for Beginners)
|
|
66
|
+
|
|
67
|
+
**Windows (PowerShell):**
|
|
68
|
+
```powershell
|
|
69
|
+
irm https://raw.githubusercontent.com/Anovvy/GeoChip-CLI/main/scripts/install.ps1 | iex
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**macOS / Linux (Bash):**
|
|
73
|
+
```bash
|
|
74
|
+
curl -fsSL https://raw.githubusercontent.com/Anovvy/GeoChip-CLI/main/scripts/install.sh | bash
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Option 2: Install via `pip` / `pipx`
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install git+https://github.com/Anovvy/GeoChip-CLI.git
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Launch GeoChip CLI
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
GeoChip
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
To verify your installed version or run inside a specific project folder:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
GeoChip --version
|
|
93
|
+
GeoChip --work-dir path/to/project
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Preparing Your Area of Interest (AOI)
|
|
99
|
+
|
|
100
|
+
Place one or more AOI files inside `data/aoi/` in your working folder:
|
|
101
|
+
|
|
102
|
+
- **GeoJSON (Recommended for Beginners)**: Draw a polygon at [geojson.io](https://geojson.io), save as `.geojson`, and drop that single file into `data/aoi/`.
|
|
103
|
+
- **ESRI Shapefile**: Place `.shp`, `.shx`, `.dbf`, and `.prj` inside `data/aoi/`. Projected coordinate systems (such as UTM) are automatically reprojected to WGS84 (`EPSG:4326`).
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Credentials Setup
|
|
108
|
+
|
|
109
|
+
Credentials are stored securely in `~/.config/geochip/.env` (with optional local `.env` overrides), so they work across any directory:
|
|
110
|
+
|
|
111
|
+
1. Run `GeoChip` and choose **`π Setup Credentials & Authentication`** (or run `GeoChip auth`).
|
|
112
|
+
2. **Google Earth Engine**: Sign in via browser OAuth and enter your GCP Project ID (registered for Earth Engine at [console.cloud.google.com/earth-engine/configuration](https://console.cloud.google.com/earth-engine/configuration)).
|
|
113
|
+
3. **Roboflow (Optional)**: Enter your Private API Key (masked on input), Workspace Slug, and Target Project ID.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## CLI Subcommands (Scripting & Automation)
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Interactive main menu
|
|
121
|
+
GeoChip
|
|
122
|
+
|
|
123
|
+
# Authentication setup
|
|
124
|
+
GeoChip auth --login
|
|
125
|
+
GeoChip auth --roboflow
|
|
126
|
+
|
|
127
|
+
# Download satellite imagery interactively
|
|
128
|
+
GeoChip download
|
|
129
|
+
|
|
130
|
+
# Slice a GeoTIFF into chips headlessly
|
|
131
|
+
GeoChip chip --raster data/raw/sentinel-2_AOI-1_median.tif --chip-size 640 --chips-per-task 5
|
|
132
|
+
|
|
133
|
+
# Upload generated batches to Roboflow
|
|
134
|
+
GeoChip upload --chips-dir data/chips/sentinel-2_AOI-1_median --task all
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Repository Structure
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
GeoChip-CLI/
|
|
143
|
+
βββ .github/
|
|
144
|
+
β βββ scripts/
|
|
145
|
+
β β βββ devops_pr_reviewer.py # AGY SDK Senior DevOps PR Reviewer (4-tier Gemini fallback)
|
|
146
|
+
β βββ workflows/
|
|
147
|
+
β β βββ ci.yml # PR CI: Ruff, Pytest, Build, Bandit, CodeQL, pip-audit, AGY review
|
|
148
|
+
β β βββ cd.yml # Tag CD: SemVer dist/ build, Canary Pre-Release, Prod promotion
|
|
149
|
+
β βββ dependabot.yml # Automated dependency & action updates
|
|
150
|
+
βββ docs/
|
|
151
|
+
β βββ assets/
|
|
152
|
+
β βββ hero-banner.gif # Terminal hero banner animation
|
|
153
|
+
βββ geochip/
|
|
154
|
+
β βββ __init__.py # Package exports & version (3.0.0)
|
|
155
|
+
β βββ auth.py # GEE OAuth & Roboflow credential setup
|
|
156
|
+
β βββ cli.py # Main GeoChip CLI entrypoint & subcommands
|
|
157
|
+
β βββ config.py # Global/local .env config, workspace paths & secret masking
|
|
158
|
+
β βββ datasets.py # Satellite catalog definitions & cloud masks
|
|
159
|
+
β βββ downloader.py # Optimized GEE query, compositing & GeoTIFF download
|
|
160
|
+
β βββ geometry.py # GeoJSON & Shapefile loader with auto CRS reprojection
|
|
161
|
+
β βββ tiler.py # Raster chipping & WGS84 manifest.json generator
|
|
162
|
+
β βββ ui.py # Interactive menus, spinners & masked prompts
|
|
163
|
+
β βββ uploader.py # Roboflow batch uploader
|
|
164
|
+
βββ scripts/
|
|
165
|
+
β βββ install.ps1 # Windows one-command installer
|
|
166
|
+
β βββ install.sh # macOS/Linux one-command installer
|
|
167
|
+
βββ tests/ # Offline unit & regression test suite
|
|
168
|
+
βββ AGENTS.md # Engineering, CI/CD, Git & multi-agent governance
|
|
169
|
+
βββ CHANGELOG.md # Release history (Keep a Changelog)
|
|
170
|
+
βββ cliff.toml # Automated changelog generator config
|
|
171
|
+
βββ LICENSE # MIT License
|
|
172
|
+
βββ pyproject.toml # Package metadata, GeoChip scripts & tool configs
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Development & Release Workflow
|
|
178
|
+
|
|
179
|
+
1. Create a feature branch from `main` and make atomic commits following [AGENTS.md](AGENTS.md).
|
|
180
|
+
2. Open a Pull Request targeting `main` β CI runs linting, matrix tests, wheel build checks, Bandit/CodeQL SAST, `pip-audit`, and the **AGY SDK Senior DevOps PR Reviewer**.
|
|
181
|
+
3. After the Project Owner merges the PR, pushing a SemVer tag (`vMAJOR.MINOR.PATCH`) triggers CD to build `dist/`, publish a Canary Pre-Release, and promote to Production after manual approval.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## License
|
|
186
|
+
|
|
187
|
+
This project is licensed under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""
|
|
2
|
+
GeoChip CLI: Interactive Geospatial Earth Observation Pipeline & Roboflow Ingestion.
|
|
3
|
+
|
|
4
|
+
Download multi-sensor satellite imagery (Sentinel-2, Landsat 8/9, Sentinel-1 SAR, MODIS, SRTM DEM),
|
|
5
|
+
generate georeferenced image chips, and upload annotation batches to Roboflow.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "3.0.0"
|
|
9
|
+
|
|
10
|
+
from .auth import init_earth_engine, login_flow, test_all_connections, test_earth_engine_connection
|
|
11
|
+
from .datasets import COMPOSITE_METHODS, DATASETS
|
|
12
|
+
from .downloader import interactive_download_workflow, load_aoi_geometry
|
|
13
|
+
from .geometry import AOIData, estimate_download_size_mb, list_available_aois, load_aoi_data
|
|
14
|
+
from .tiler import CHIP_SIZES, create_single_raster_chips, interactive_chipping_workflow
|
|
15
|
+
from .uploader import interactive_upload_flow, upload_chips_to_roboflow
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
"__version__",
|
|
19
|
+
"AOIData",
|
|
20
|
+
"CHIP_SIZES",
|
|
21
|
+
"COMPOSITE_METHODS",
|
|
22
|
+
"DATASETS",
|
|
23
|
+
"create_single_raster_chips",
|
|
24
|
+
"estimate_download_size_mb",
|
|
25
|
+
"init_earth_engine",
|
|
26
|
+
"interactive_chipping_workflow",
|
|
27
|
+
"interactive_download_workflow",
|
|
28
|
+
"interactive_upload_flow",
|
|
29
|
+
"list_available_aois",
|
|
30
|
+
"load_aoi_data",
|
|
31
|
+
"load_aoi_geometry",
|
|
32
|
+
"login_flow",
|
|
33
|
+
"test_all_connections",
|
|
34
|
+
"test_earth_engine_connection",
|
|
35
|
+
"upload_chips_to_roboflow",
|
|
36
|
+
]
|