satchange 0.1.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.
@@ -0,0 +1,49 @@
1
+ # Secrets / credentials
2
+ .env
3
+ scripts/config/elevenlabs.txt
4
+ scripts/config/ee-geodetic.json
5
+ scripts/config/*.json
6
+ scripts/config/*.txt
7
+ *-service-account*.json
8
+
9
+ # Raw satellite inputs (large / licensed) — keep the folder's README
10
+ data/*
11
+ !data/README.md
12
+
13
+ # Generated change-detection result images (reproduce with detect.py)
14
+ images/deforestation_*
15
+ images/mining_*
16
+ images/urbanization_*
17
+ images/urban-trend_*
18
+ images/flood_*
19
+ images/burn_*
20
+ images/water_*
21
+
22
+ # Per-run change-detection outputs (detect.py writes output/<run-id>/)
23
+ output/
24
+
25
+ # Generated map products (reproduce with detect.py --map / make_map.py)
26
+ maps/
27
+
28
+ # Large binary outputs (regenerate with scripts)
29
+ audio/
30
+ scenes/
31
+ *.mp4
32
+ *.mp3
33
+
34
+ # Temp files
35
+ /tmp/
36
+ *.pyc
37
+ __pycache__/
38
+
39
+ # macOS
40
+ .DS_Store
41
+
42
+ # Python packaging build artifacts
43
+ build/
44
+ dist/
45
+ *.egg-info/
46
+ .eggs/
47
+
48
+ # API docs are generated in CI (pdoc) and deployed by the docs workflow
49
+ docs/api/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Firman Hadi
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.
@@ -0,0 +1,125 @@
1
+ Metadata-Version: 2.4
2
+ Name: satchange
3
+ Version: 0.1.0
4
+ Summary: Multipurpose satellite change detection (deforestation, mining, urbanisation, floods, burns, water, urban growth) via Google Earth Engine or Microsoft Planetary Computer.
5
+ Project-URL: Homepage, https://github.com/firmanhadi21/rs-change-detection
6
+ Project-URL: Documentation, https://firmanhadi21.github.io/rs-change-detection/
7
+ Project-URL: Repository, https://github.com/firmanhadi21/rs-change-detection
8
+ Author-email: Firman Hadi <firmanhadi21@lecturer.undip.ac.id>
9
+ Maintainer-email: Firman Hadi <firmanhadi21@lecturer.undip.ac.id>
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Keywords: change-detection,deforestation,earth-engine,flood,geospatial,gis,landsat,ndbi,ndvi,planetary-computer,remote-sensing,sentinel
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Topic :: Scientific/Engineering :: GIS
20
+ Classifier: Topic :: Scientific/Engineering :: Image Recognition
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: requests
23
+ Provides-Extra: all
24
+ Requires-Dist: contextily; extra == 'all'
25
+ Requires-Dist: earthengine-api; extra == 'all'
26
+ Requires-Dist: matplotlib; extra == 'all'
27
+ Requires-Dist: numpy; extra == 'all'
28
+ Requires-Dist: odc-stac; extra == 'all'
29
+ Requires-Dist: planetary-computer; extra == 'all'
30
+ Requires-Dist: pystac-client; extra == 'all'
31
+ Requires-Dist: rasterio; extra == 'all'
32
+ Requires-Dist: rioxarray; extra == 'all'
33
+ Provides-Extra: gee
34
+ Requires-Dist: earthengine-api; extra == 'gee'
35
+ Provides-Extra: maps
36
+ Requires-Dist: contextily; extra == 'maps'
37
+ Requires-Dist: matplotlib; extra == 'maps'
38
+ Requires-Dist: numpy; extra == 'maps'
39
+ Requires-Dist: rasterio; extra == 'maps'
40
+ Provides-Extra: mpc
41
+ Requires-Dist: numpy; extra == 'mpc'
42
+ Requires-Dist: odc-stac; extra == 'mpc'
43
+ Requires-Dist: planetary-computer; extra == 'mpc'
44
+ Requires-Dist: pystac-client; extra == 'mpc'
45
+ Requires-Dist: rasterio; extra == 'mpc'
46
+ Requires-Dist: rioxarray; extra == 'mpc'
47
+ Description-Content-Type: text/markdown
48
+
49
+ # satchange
50
+
51
+ **Multipurpose satellite change detection in pure Python.** Map deforestation,
52
+ mining, urbanisation, floods, burns, surface-water change and multi-epoch urban
53
+ growth anywhere on Earth from free Sentinel-1/2 and Landsat data — via **Google
54
+ Earth Engine** or **Microsoft Planetary Computer** (no account needed). Export
55
+ georeferenced GeoTIFFs, quick-look PNGs, statistics, and print-ready A4 maps.
56
+
57
+ - 📖 **Full hands-on tutorial (English & Bahasa Indonesia):** <https://firmanhadi21.github.io/rs-change-detection/>
58
+ - 💻 **Source, examples & case study:** <https://github.com/firmanhadi21/rs-change-detection>
59
+
60
+ ## Install
61
+
62
+ Heavy dependencies are optional *extras*, so the install stays lean:
63
+
64
+ ```bash
65
+ pip install 'satchange[gee]' # Google Earth Engine backend (free account)
66
+ pip install 'satchange[mpc,maps]' # Planetary Computer + maps (no account)
67
+ pip install 'satchange[all]' # everything
68
+ ```
69
+
70
+ ## Quick start
71
+
72
+ ```bash
73
+ # Deforestation around a coordinate, with a finished map
74
+ satchange -s deforestation --lat -3.333 --lon 122.25 --radius 6 --map
75
+
76
+ # Flood extent from Sentinel-1 SAR — no Earth Engine account needed
77
+ satchange -s flood --lat 27.2 --lon 68.3 \
78
+ --pre 2022-07-01:2022-07-25 --post 2022-08-20:2022-09-10 --backend mpc
79
+
80
+ # Urban growth timing across 2010/2015/2020 (Landsat 5/8/9)
81
+ satchange -s urban-trend --lat -6.30 --lon 107.15 --map
82
+
83
+ # List everything
84
+ satchange --list
85
+ ```
86
+
87
+ Each run writes a self-contained `output/<run-id>/` folder containing the PNG,
88
+ GeoTIFF, statistics JSON, metadata, and any maps.
89
+
90
+ ## Scenarios
91
+
92
+ | Scenario | Method | Sensor |
93
+ |----------|--------|--------|
94
+ | `deforestation` | NDVI loss | Sentinel-2 |
95
+ | `urbanization` | Built-up gain — `NDBI` (default), `UI`, `BU`, `IBI`, or thermal `NDISI`/`EBBI` via `--method` | Sentinel-2 / Landsat |
96
+ | `water` | NDWI change | Sentinel-2 |
97
+ | `burn` | dNBR severity | Sentinel-2 |
98
+ | `mining` | SIRAD radar temporal + NDVI loss | Sentinel-1 + S2 |
99
+ | `flood` | SAR water extent (event vs baseline) | Sentinel-1 |
100
+ | `urban-trend` | NDBI at 3 epochs → RGB growth-timing map | Landsat 5/8/9 |
101
+
102
+ ## Two backends
103
+
104
+ | `--backend` | Data source | Account? |
105
+ |-------------|-------------|----------|
106
+ | `gee` (default) | Google Earth Engine | free account + `earthengine authenticate` |
107
+ | `mpc` | Microsoft Planetary Computer (STAC) | **none** — streams COGs, processes locally |
108
+
109
+ Optical scenarios build cloud-masked median composites; radar scenarios
110
+ auto-select the Sentinel-1 orbit with coverage. The AOI is a square centred on
111
+ your coordinate. Landsat 7 is skipped (SLC-off gaps).
112
+
113
+ ## Make maps from a finished run
114
+
115
+ ```bash
116
+ satmap output/<run-id> # render A4 map sheets offline (no GEE)
117
+ ```
118
+
119
+ Map sheets include an OpenStreetMap basemap, the change layer, legend, a
120
+ statistics panel, a location inset, coordinate grid, scale bar and north arrow.
121
+
122
+ ## License
123
+
124
+ MIT © Firman Hadi. Data: Copernicus Sentinel (ESA) and Landsat (USGS/NASA),
125
+ via Google Earth Engine or Microsoft Planetary Computer.
@@ -0,0 +1,79 @@
1
+ # Publishing `satchange` to PyPI
2
+
3
+ The package lives in [`satchange/`](satchange/) and is configured by
4
+ [`pyproject.toml`](pyproject.toml). These steps build and upload it. **Nothing
5
+ here uploads automatically** — you run the final step with your own PyPI token.
6
+
7
+ ## 0. One-time prerequisites
8
+
9
+ ```bash
10
+ pip install --upgrade build twine
11
+ ```
12
+
13
+ - Create accounts on **[TestPyPI](https://test.pypi.org/)** and **[PyPI](https://pypi.org/)**.
14
+ - Create an **API token** for each (Account → API tokens). You'll paste it as the
15
+ password with username `__token__`.
16
+ - **Check the name is free:** https://pypi.org/project/satchange/ must 404.
17
+ If taken, change `name = "..."` in `pyproject.toml` (the import package
18
+ `satchange/` can keep its name, but the PyPI distribution name must be unique).
19
+
20
+ ## 1. Build the distributions
21
+
22
+ ```bash
23
+ python -m build # writes dist/satchange-0.1.0.tar.gz and .whl
24
+ python -m twine check dist/*
25
+ ```
26
+
27
+ ## 2. Test on TestPyPI first
28
+
29
+ ```bash
30
+ python -m twine upload --repository testpypi dist/*
31
+ # then try installing it in a clean venv:
32
+ pip install --index-url https://test.pypi.org/simple/ \
33
+ --extra-index-url https://pypi.org/simple 'satchange[all]'
34
+ satchange --list
35
+ ```
36
+
37
+ ## 3. Upload to the real PyPI
38
+
39
+ ```bash
40
+ python -m twine upload dist/*
41
+ ```
42
+
43
+ Then anyone can:
44
+
45
+ ```bash
46
+ pip install 'satchange[gee]' # Earth Engine backend
47
+ pip install 'satchange[mpc,maps]' # Planetary Computer + maps, no GEE account
48
+ pip install 'satchange[all]' # everything
49
+ satchange -s deforestation --lat -3.333 --lon 122.25 --map
50
+ ```
51
+
52
+ ## Cutting a new version
53
+
54
+ 1. Bump `version` in `pyproject.toml` (PyPI versions are immutable — you can't
55
+ re-upload the same one).
56
+ 2. Rebuild (`rm -rf dist && python -m build`) and re-upload.
57
+ 3. Tag the release: `git tag v0.1.0 && git push --tags`.
58
+
59
+ ## Regenerating the API docs
60
+
61
+ The API reference under `docs/api/` is generated from the docstrings with
62
+ [pdoc](https://pdoc.dev) and served by GitHub Pages at `…/rs-change-detection/api/`.
63
+ Rebuild it after changing public functions/docstrings:
64
+
65
+ ```bash
66
+ pip install pdoc
67
+ pdoc satchange -o docs/api # needs the package importable (pip install -e .)
68
+ git add docs/api && git commit -m "docs: regenerate API reference"
69
+ ```
70
+
71
+ ## Notes
72
+
73
+ - **Extras** keep the install lean: core is tiny (`requests`); `gee`, `mpc`,
74
+ `maps` pull only what that path needs.
75
+ - The Capkala investigation (`data-collection/`, `scripts/`, `narration/`,
76
+ `images/`) is **not** shipped in the wheel — only the `satchange/` package is.
77
+ - Outputs are written to `./output/<run-id>/` in the current directory, and the
78
+ GEE service-account key (if used) is read from `./scripts/config/ee-geodetic.json`
79
+ or `~/.config/earthengine/` — never bundled.
@@ -0,0 +1,77 @@
1
+ # satchange
2
+
3
+ **Multipurpose satellite change detection in pure Python.** Map deforestation,
4
+ mining, urbanisation, floods, burns, surface-water change and multi-epoch urban
5
+ growth anywhere on Earth from free Sentinel-1/2 and Landsat data — via **Google
6
+ Earth Engine** or **Microsoft Planetary Computer** (no account needed). Export
7
+ georeferenced GeoTIFFs, quick-look PNGs, statistics, and print-ready A4 maps.
8
+
9
+ - 📖 **Full hands-on tutorial (English & Bahasa Indonesia):** <https://firmanhadi21.github.io/rs-change-detection/>
10
+ - 💻 **Source, examples & case study:** <https://github.com/firmanhadi21/rs-change-detection>
11
+
12
+ ## Install
13
+
14
+ Heavy dependencies are optional *extras*, so the install stays lean:
15
+
16
+ ```bash
17
+ pip install 'satchange[gee]' # Google Earth Engine backend (free account)
18
+ pip install 'satchange[mpc,maps]' # Planetary Computer + maps (no account)
19
+ pip install 'satchange[all]' # everything
20
+ ```
21
+
22
+ ## Quick start
23
+
24
+ ```bash
25
+ # Deforestation around a coordinate, with a finished map
26
+ satchange -s deforestation --lat -3.333 --lon 122.25 --radius 6 --map
27
+
28
+ # Flood extent from Sentinel-1 SAR — no Earth Engine account needed
29
+ satchange -s flood --lat 27.2 --lon 68.3 \
30
+ --pre 2022-07-01:2022-07-25 --post 2022-08-20:2022-09-10 --backend mpc
31
+
32
+ # Urban growth timing across 2010/2015/2020 (Landsat 5/8/9)
33
+ satchange -s urban-trend --lat -6.30 --lon 107.15 --map
34
+
35
+ # List everything
36
+ satchange --list
37
+ ```
38
+
39
+ Each run writes a self-contained `output/<run-id>/` folder containing the PNG,
40
+ GeoTIFF, statistics JSON, metadata, and any maps.
41
+
42
+ ## Scenarios
43
+
44
+ | Scenario | Method | Sensor |
45
+ |----------|--------|--------|
46
+ | `deforestation` | NDVI loss | Sentinel-2 |
47
+ | `urbanization` | Built-up gain — `NDBI` (default), `UI`, `BU`, `IBI`, or thermal `NDISI`/`EBBI` via `--method` | Sentinel-2 / Landsat |
48
+ | `water` | NDWI change | Sentinel-2 |
49
+ | `burn` | dNBR severity | Sentinel-2 |
50
+ | `mining` | SIRAD radar temporal + NDVI loss | Sentinel-1 + S2 |
51
+ | `flood` | SAR water extent (event vs baseline) | Sentinel-1 |
52
+ | `urban-trend` | NDBI at 3 epochs → RGB growth-timing map | Landsat 5/8/9 |
53
+
54
+ ## Two backends
55
+
56
+ | `--backend` | Data source | Account? |
57
+ |-------------|-------------|----------|
58
+ | `gee` (default) | Google Earth Engine | free account + `earthengine authenticate` |
59
+ | `mpc` | Microsoft Planetary Computer (STAC) | **none** — streams COGs, processes locally |
60
+
61
+ Optical scenarios build cloud-masked median composites; radar scenarios
62
+ auto-select the Sentinel-1 orbit with coverage. The AOI is a square centred on
63
+ your coordinate. Landsat 7 is skipped (SLC-off gaps).
64
+
65
+ ## Make maps from a finished run
66
+
67
+ ```bash
68
+ satmap output/<run-id> # render A4 map sheets offline (no GEE)
69
+ ```
70
+
71
+ Map sheets include an OpenStreetMap basemap, the change layer, legend, a
72
+ statistics panel, a location inset, coordinate grid, scale bar and north arrow.
73
+
74
+ ## License
75
+
76
+ MIT © Firman Hadi. Data: Copernicus Sentinel (ESA) and Landsat (USGS/NASA),
77
+ via Google Earth Engine or Microsoft Planetary Computer.