geoimpact-ci 1.2.1__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.
- geoimpact_ci-1.2.1/LICENSE +21 -0
- geoimpact_ci-1.2.1/MANIFEST.in +3 -0
- geoimpact_ci-1.2.1/PKG-INFO +302 -0
- geoimpact_ci-1.2.1/README.md +274 -0
- geoimpact_ci-1.2.1/pyproject.toml +47 -0
- geoimpact_ci-1.2.1/setup.cfg +4 -0
- geoimpact_ci-1.2.1/src/geoimpact/analysis.py +219 -0
- geoimpact_ci-1.2.1/src/geoimpact/artifacts.py +278 -0
- geoimpact_ci-1.2.1/src/geoimpact/cli.py +44 -0
- geoimpact_ci-1.2.1/src/geoimpact/contract.py +149 -0
- geoimpact_ci-1.2.1/src/geoimpact/errors.py +17 -0
- geoimpact_ci-1.2.1/src/geoimpact/evidence.py +50 -0
- geoimpact_ci-1.2.1/src/geoimpact/geometry_change.py +124 -0
- geoimpact_ci-1.2.1/src/geoimpact/models.py +169 -0
- geoimpact_ci-1.2.1/src/geoimpact/policy.py +18 -0
- geoimpact_ci-1.2.1/src/geoimpact/provenance.py +83 -0
- geoimpact_ci-1.2.1/src/geoimpact/relationships.py +68 -0
- geoimpact_ci-1.2.1/src/geoimpact/runner.py +41 -0
- geoimpact_ci-1.2.1/src/geoimpact_ci.egg-info/PKG-INFO +302 -0
- geoimpact_ci-1.2.1/src/geoimpact_ci.egg-info/SOURCES.txt +22 -0
- geoimpact_ci-1.2.1/src/geoimpact_ci.egg-info/dependency_links.txt +1 -0
- geoimpact_ci-1.2.1/src/geoimpact_ci.egg-info/entry_points.txt +2 -0
- geoimpact_ci-1.2.1/src/geoimpact_ci.egg-info/requires.txt +6 -0
- geoimpact_ci-1.2.1/src/geoimpact_ci.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Soroush Karahrodi
|
|
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,302 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: geoimpact-ci
|
|
3
|
+
Version: 1.2.1
|
|
4
|
+
Summary: Deterministic spatial change evidence for GeoJSON
|
|
5
|
+
Author: Soroush Karahrodi
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/soroushkarahrodi79-oss/geoimpact-ci
|
|
8
|
+
Project-URL: Documentation, https://github.com/soroushkarahrodi79-oss/geoimpact-ci/tree/main/docs
|
|
9
|
+
Keywords: geospatial,spatial-analysis,geojson,continuous-integration,research
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: pyproj==3.7.2
|
|
23
|
+
Requires-Dist: PyYAML==6.0.3
|
|
24
|
+
Requires-Dist: shapely==2.1.2
|
|
25
|
+
Provides-Extra: test
|
|
26
|
+
Requires-Dist: pytest==8.4.2; extra == "test"
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# GeoImpact CI
|
|
30
|
+
|
|
31
|
+
**Know the spatial blast radius before you merge.**
|
|
32
|
+
|
|
33
|
+
**Current stable release:** [v1.2.1 — packaging release](https://github.com/soroushkarahrodi79-oss/geoimpact-ci/releases/tag/v1.2.1) · Report V5 · MIT · [DOI (all versions) 10.5281/zenodo.24748091](https://doi.org/10.5281/zenodo.24748091)
|
|
34
|
+
|
|
35
|
+
GeoImpact CI compares BASE and CANDIDATE polygon GeoJSON files and measures how
|
|
36
|
+
geometry changes alter declared spatial relationships with fixed dependent
|
|
37
|
+
features. It writes deterministic evidence and a PASS or BLOCK result for a CI
|
|
38
|
+
job. It is a first stable, reproducible research demonstrator with a deliberately
|
|
39
|
+
narrow contract.
|
|
40
|
+
|
|
41
|
+

|
|
42
|
+
|
|
43
|
+
_Conceptual geometry example. GeoImpact CI compares stable-ID polygon states and reports declared downstream spatial-relationship changes before merge; the result is bounded by the configured geometries, predicates, and policy._
|
|
44
|
+
|
|
45
|
+
## The question it answers
|
|
46
|
+
|
|
47
|
+
A normal validator asks, “Is this dataset valid?” GeoImpact asks, “If I merge
|
|
48
|
+
this spatial change, which declared downstream spatial relationships change?”
|
|
49
|
+
It complements geospatial validation, spatial versioning, data quality checks,
|
|
50
|
+
and geometry diffing; it does not replace them.
|
|
51
|
+
|
|
52
|
+
## v1 scope
|
|
53
|
+
|
|
54
|
+
GeoImpact v1 accepts GeoJSON FeatureCollections with Polygon or MultiPolygon
|
|
55
|
+
BASE/CANDIDATE geometries, Point dependent geometries, required unique,
|
|
56
|
+
non-empty string stable IDs, and an analysis CRS of EPSG:25830.
|
|
57
|
+
GeoJSON coordinates are interpreted as OGC:CRS84 and transformed to that fixed
|
|
58
|
+
analysis CRS; arbitrary CRS declarations or inference are not supported. Each
|
|
59
|
+
stable ID is matched only to the same ID in both snapshots; GeoImpact does not
|
|
60
|
+
infer renames or feature identity. Each ID is classified as unchanged,
|
|
61
|
+
modified, added, or removed. The deterministic change
|
|
62
|
+
footprint includes symmetric differences for modified IDs, the candidate
|
|
63
|
+
geometry for added IDs, and the base geometry for removed IDs. Maximum boundary
|
|
64
|
+
displacement compares only modified IDs present in both snapshots; additions
|
|
65
|
+
and removals have no displacement pair. Fixed dependent Point features are
|
|
66
|
+
compared using exact `WITHIN` predicates. An STRtree filters candidates; exact
|
|
67
|
+
GEOS predicates determine results. Boundary `TOUCHES` are reported separately
|
|
68
|
+
and never count as `WITHIN`. A configured relationship-regression policy
|
|
69
|
+
produces PASS or BLOCK evidence.
|
|
70
|
+
|
|
71
|
+
v1 does not support arbitrary CRSs or predicates, raster or network analysis,
|
|
72
|
+
database/PostGIS integration, a web UI or API, generalized change scoring,
|
|
73
|
+
legal or causal interpretation, or automatic administrative-intent inference.
|
|
74
|
+
The result describes the declared geometry and relationships; it does not
|
|
75
|
+
establish that source data are correct or that a real-world impact occurred.
|
|
76
|
+
|
|
77
|
+
## Quick start
|
|
78
|
+
|
|
79
|
+
Requires Python 3.11 or later. The supported installation path is the tagged
|
|
80
|
+
source release or a clean repository clone, and both need Git. Check the
|
|
81
|
+
interpreter with `python --version` (or `python3 --version`) first: some systems,
|
|
82
|
+
including macOS with only its bundled Python, provide an older one. To install
|
|
83
|
+
v1.2.1 directly from its version tag:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
python -m pip install "git+https://github.com/soroushkarahrodi79-oss/geoimpact-ci.git@v1.2.1"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
To work from a clean clone and run the included examples:
|
|
90
|
+
|
|
91
|
+
```powershell
|
|
92
|
+
git clone https://github.com/soroushkarahrodi79-oss/geoimpact-ci.git
|
|
93
|
+
cd geoimpact-ci
|
|
94
|
+
git checkout v1.2.1
|
|
95
|
+
python -m venv .venv
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Activate the environment (`.venv\Scripts\Activate.ps1` in PowerShell, or
|
|
99
|
+
`source .venv/bin/activate` on Linux/macOS), then run:
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
python -m pip install .
|
|
103
|
+
geoimpact analyze --config tests/fixtures/geoimpact.yml --out output
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The fixture intentionally BLOCKs (exit code 1). A PASS fixture is available at
|
|
107
|
+
`tests/fixtures/geoimpact-pass.yml`.
|
|
108
|
+
|
|
109
|
+
For an editable development install with the test suite, use
|
|
110
|
+
`python -m pip install -e ".[test]"`. To build wheel and source distributions,
|
|
111
|
+
install the `build` frontend and run `python -m build`; the archives are written
|
|
112
|
+
to `dist/`. For v1.2.1, install the wheel with
|
|
113
|
+
`python -m pip install dist/geoimpact_ci-1.2.1-py3-none-any.whl` or the source
|
|
114
|
+
archive with `python -m pip install dist/geoimpact_ci-1.2.1.tar.gz`. The
|
|
115
|
+
repository's `scripts/verify_release_candidate.py` qualifies both archives in
|
|
116
|
+
fresh environments.
|
|
117
|
+
|
|
118
|
+
## Configuration
|
|
119
|
+
|
|
120
|
+
Paths to data files are resolved relative to the YAML file. This example uses
|
|
121
|
+
the v1 schema:
|
|
122
|
+
|
|
123
|
+
```yaml
|
|
124
|
+
version: 1
|
|
125
|
+
|
|
126
|
+
analysis:
|
|
127
|
+
crs: EPSG:25830
|
|
128
|
+
|
|
129
|
+
primary:
|
|
130
|
+
dataset: districts
|
|
131
|
+
base: base.geojson
|
|
132
|
+
candidate: candidate.geojson
|
|
133
|
+
id_field: district_id
|
|
134
|
+
|
|
135
|
+
dependencies:
|
|
136
|
+
- dataset: facilities
|
|
137
|
+
path: facilities.geojson
|
|
138
|
+
id_field: facility_id
|
|
139
|
+
predicate: within
|
|
140
|
+
|
|
141
|
+
policy:
|
|
142
|
+
max_relationship_regressions:
|
|
143
|
+
threshold: 0
|
|
144
|
+
severity: block
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
The threshold is the permitted maximum number of relationship regressions; a
|
|
148
|
+
count above it blocks. A zero threshold is a strict example, not a universal
|
|
149
|
+
policy recommendation. Each stable ID must be present and unique in its input.
|
|
150
|
+
|
|
151
|
+
## Run and interpret
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
geoimpact analyze --config PATH --out DIRECTORY
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
The command writes three files:
|
|
158
|
+
|
|
159
|
+
- `report.json` — authoritative machine-readable result.
|
|
160
|
+
- `report.md` — human-readable rendering of that report.
|
|
161
|
+
- `relationship-regressions.geojson` — spatial evidence for changed dependent
|
|
162
|
+
relationships.
|
|
163
|
+
|
|
164
|
+
Exit codes are 0 for a completed PASS, 1 for a completed BLOCK, and 2 for an
|
|
165
|
+
operational, configuration, or input error. PASS means the configured policy
|
|
166
|
+
did not block the observed relationship regressions; it is not a claim that the
|
|
167
|
+
data are correct. BLOCK means analysis completed and the observations exceeded
|
|
168
|
+
the configured policy; it is not an operational failure. ERROR means no policy
|
|
169
|
+
verdict was produced.
|
|
170
|
+
|
|
171
|
+
## Evidence and numerical contract
|
|
172
|
+
|
|
173
|
+
The active report contract is V5. V4 added first-class stable-ID addition and
|
|
174
|
+
removal statuses, ID lists, and complete footprint contributions. V3 reports
|
|
175
|
+
remain interpretable with their earlier shared-ID-only primary change section.
|
|
176
|
+
V5 adds deterministic raw-byte SHA-256 identities for the config, BASE,
|
|
177
|
+
CANDIDATE, and dependencies, together with GeoImpact CI, Shapely/GEOS, and
|
|
178
|
+
PyProj/PROJ versions. It includes no local paths or timestamps; V4 reports
|
|
179
|
+
remain valid V4 documents. See the [V5 migration record](docs/REPORT_V5_MIGRATION.md).
|
|
180
|
+
GeoJSON inputs are analyzed in EPSG:25830;
|
|
181
|
+
the primary comparison is BASE → CANDIDATE and dependencies are fixed reference
|
|
182
|
+
layers. Relationship assignment uses exact GEOS `within`. `touches` is separate
|
|
183
|
+
boundary-ambiguity evidence. STRtree results only shortlist candidate pairs.
|
|
184
|
+
|
|
185
|
+
The derived change footprint uses a `1e-6 m` computational precision grid.
|
|
186
|
+
Maximum boundary displacement is measured on temporary geometry copies
|
|
187
|
+
conformed to its separately defined `1e-6 m` measurement grid. These grids make
|
|
188
|
+
derived values reproducible; they do not describe source survey accuracy.
|
|
189
|
+
Output ordering and report serialization are canonical under the pinned
|
|
190
|
+
dependencies and qualified Linux/Windows runtime matrix.
|
|
191
|
+
|
|
192
|
+
## Reproducible real-world checks
|
|
193
|
+
|
|
194
|
+
The repository includes two bounded cases, not a claim of universal coverage:
|
|
195
|
+
|
|
196
|
+
- **Madrid positive benchmark:** official INE census-section snapshots
|
|
197
|
+
compared against a fixed Ayuntamiento de Madrid portal inventory. The
|
|
198
|
+
reproducible subset records 2,112 assignment changes in 26 old/new section
|
|
199
|
+
transition pairs (1,768 split-like and 344 merge-like patterns), with zero
|
|
200
|
+
gained/lost assignments and zero boundary ambiguities. The pattern labels do
|
|
201
|
+
not assert historical administrative intent or resident reassignment.
|
|
202
|
+
- **Sierra de Baza negative control:** protected-area boundary snapshots
|
|
203
|
+
compared with a fixed REDIAM public-use equipment inventory. It records 52
|
|
204
|
+
unchanged relationships, zero regressions, and zero boundary ambiguities,
|
|
205
|
+
despite a maximum boundary displacement of 368.82509547712834 m. This checks
|
|
206
|
+
that geometry change alone does not manufacture relationship impact.
|
|
207
|
+
|
|
208
|
+
These are source-specific research fixtures. Attribution, reuse conditions,
|
|
209
|
+
snapshot dates, selection recipes, and interpretation limits are recorded in
|
|
210
|
+
the [Madrid source register](docs/GATE_5_SOURCE_REGISTER.md) and [Sierra source
|
|
211
|
+
register](docs/GATE_8_SOURCE_REGISTER.md). The project does not claim ownership
|
|
212
|
+
or grant rights over those datasets.
|
|
213
|
+
|
|
214
|
+
From a clone with the project and test dependencies installed, reproduce the
|
|
215
|
+
frozen real-world checks with `python scripts/verify_madrid_benchmark.py` and
|
|
216
|
+
`python scripts/verify_gate8_case.py`. Both commands run the installed CLI and
|
|
217
|
+
compare the resulting outputs with their committed case expectations.
|
|
218
|
+
|
|
219
|
+
## Performance qualification
|
|
220
|
+
|
|
221
|
+
On the controlled Gate 7 large synthetic relationship benchmark (300 primary
|
|
222
|
+
polygons and 1,500 dependents), the indexed run took 0.134966 s versus 15.420192
|
|
223
|
+
s for the exhaustive reference, a median 114.25× speedup and 99.667% candidate
|
|
224
|
+
reduction. This is a benchmark-specific observation, not a general speed claim
|
|
225
|
+
or runtime SLA. See [performance qualification](docs/GATE_7_PERFORMANCE.md).
|
|
226
|
+
|
|
227
|
+
## Limitations and future work
|
|
228
|
+
|
|
229
|
+
The contract is limited to the pinned Shapely/GEOS and PyProj/PROJ dependencies,
|
|
230
|
+
the declared input model, and the hosted Linux/Python 3.11 and Windows/Python
|
|
231
|
+
3.14 qualification environments. It does not establish portability across
|
|
232
|
+
every geometry, dependency version, CRS, or platform. Fixed dependencies do
|
|
233
|
+
not model simultaneous changes to those layers. Spatial membership does not
|
|
234
|
+
explain legal status, causality, access, service use, or socioeconomic effects.
|
|
235
|
+
|
|
236
|
+
Future work, if supported by external feedback or a specific research need,
|
|
237
|
+
could consider additional predicates and CRSs, GeoParquet, database
|
|
238
|
+
integration, a reusable multi-case verifier, broader real-world cases, package
|
|
239
|
+
registry publication, and a UI/API. These are outside v1.
|
|
240
|
+
|
|
241
|
+
## Development and research record
|
|
242
|
+
|
|
243
|
+
Start with the [current v1 architecture](docs/ARCHITECTURE_V1.md), [test
|
|
244
|
+
strategy](docs/TEST_STRATEGY.md),
|
|
245
|
+
[change model](docs/CHANGE_MODEL.md), and [decision log](docs/DECISION_LOG.md).
|
|
246
|
+
Case and qualification records: [Madrid](docs/GATE_5_REAL_WORLD_CASE.md),
|
|
247
|
+
[performance](docs/GATE_7_PERFORMANCE.md), [Sierra case
|
|
248
|
+
selection](docs/GATE_8_CASE_SELECTION.md), [Sierra interpretation and
|
|
249
|
+
generalization](docs/GATE_8_REAL_WORLD_GENERALIZATION.md), and
|
|
250
|
+
[displacement portability](docs/GATE_9_DISPLACEMENT_PORTABILITY.md). Gate
|
|
251
|
+
reports preserve the development history; they are supporting evidence rather
|
|
252
|
+
than the product contract.
|
|
253
|
+
|
|
254
|
+
## Citation and software license
|
|
255
|
+
|
|
256
|
+
If you use GeoImpact CI in research or applied work, cite the software with
|
|
257
|
+
[`CITATION.cff`](CITATION.cff). Version 1.2.0 is archived on Zenodo; version 1.2.1,
|
|
258
|
+
a packaging release, has no version DOI yet:
|
|
259
|
+
|
|
260
|
+
- **Version DOI of 1.2.0** (cite this to identify exactly v1.2.0):
|
|
261
|
+
[10.5281/zenodo.24748092](https://doi.org/10.5281/zenodo.24748092)
|
|
262
|
+
- **Concept DOI** (all versions; resolves to the latest archived one):
|
|
263
|
+
[10.5281/zenodo.24748091](https://doi.org/10.5281/zenodo.24748091)
|
|
264
|
+
|
|
265
|
+
The [verification record](docs/ZENODO_V1_2_0_VERIFICATION.md) documents how the
|
|
266
|
+
archived files were compared with the `v1.2.0` tag.
|
|
267
|
+
|
|
268
|
+
Contributions are described in [CONTRIBUTING.md](CONTRIBUTING.md) and
|
|
269
|
+
vulnerability reporting in [SECURITY.md](SECURITY.md).
|
|
270
|
+
|
|
271
|
+
GeoImpact CI software is released under the [MIT License](LICENSE). Research
|
|
272
|
+
fixtures and third-party source data are not automatically covered by the
|
|
273
|
+
software license; consult [NOTICE.md](NOTICE.md) and the applicable [Madrid
|
|
274
|
+
source register](docs/GATE_5_SOURCE_REGISTER.md) and [Sierra source
|
|
275
|
+
register](docs/GATE_8_SOURCE_REGISTER.md).
|
|
276
|
+
|
|
277
|
+
## Repository map
|
|
278
|
+
|
|
279
|
+
- `src/geoimpact/` — CLI, analysis, policy, relationship, and artifact code.
|
|
280
|
+
- `tests/` — unit and contract tests with compact synthetic fixtures.
|
|
281
|
+
- `scripts/` — CI contract, benchmark, and release qualification verifiers.
|
|
282
|
+
- `research/` — bounded case fixtures with source notes and attribution.
|
|
283
|
+
- `docs/` — product, architecture, research, and validation records.
|
|
284
|
+
|
|
285
|
+
The GitHub Actions workflow runs the full suite and PASS/BLOCK/ERROR contracts,
|
|
286
|
+
checks canonical synthetic, Madrid, and Sierra outputs, then builds and
|
|
287
|
+
qualifies wheel and source-distribution installs on Linux/Python 3.11 and
|
|
288
|
+
Windows/Python 3.14.
|
|
289
|
+
|
|
290
|
+
An adopting repository can run the same installed CLI from its own workflow by
|
|
291
|
+
installing a tagged source release and invoking `geoimpact analyze` with its
|
|
292
|
+
version-controlled config. For example, after checking out that repository and
|
|
293
|
+
setting up Python:
|
|
294
|
+
|
|
295
|
+
```yaml
|
|
296
|
+
- run: python -m pip install "git+https://github.com/soroushkarahrodi79-oss/geoimpact-ci.git@v1.2.1"
|
|
297
|
+
- run: geoimpact analyze --config geoimpact.yml --out geoimpact-evidence
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
The command's exit code makes BLOCK and ERROR fail the job; the three output
|
|
301
|
+
files are written to the requested directory. GeoImpact does not currently
|
|
302
|
+
provide a reusable GitHub Action or a package-registry release.
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# GeoImpact CI
|
|
2
|
+
|
|
3
|
+
**Know the spatial blast radius before you merge.**
|
|
4
|
+
|
|
5
|
+
**Current stable release:** [v1.2.1 — packaging release](https://github.com/soroushkarahrodi79-oss/geoimpact-ci/releases/tag/v1.2.1) · Report V5 · MIT · [DOI (all versions) 10.5281/zenodo.24748091](https://doi.org/10.5281/zenodo.24748091)
|
|
6
|
+
|
|
7
|
+
GeoImpact CI compares BASE and CANDIDATE polygon GeoJSON files and measures how
|
|
8
|
+
geometry changes alter declared spatial relationships with fixed dependent
|
|
9
|
+
features. It writes deterministic evidence and a PASS or BLOCK result for a CI
|
|
10
|
+
job. It is a first stable, reproducible research demonstrator with a deliberately
|
|
11
|
+
narrow contract.
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
_Conceptual geometry example. GeoImpact CI compares stable-ID polygon states and reports declared downstream spatial-relationship changes before merge; the result is bounded by the configured geometries, predicates, and policy._
|
|
16
|
+
|
|
17
|
+
## The question it answers
|
|
18
|
+
|
|
19
|
+
A normal validator asks, “Is this dataset valid?” GeoImpact asks, “If I merge
|
|
20
|
+
this spatial change, which declared downstream spatial relationships change?”
|
|
21
|
+
It complements geospatial validation, spatial versioning, data quality checks,
|
|
22
|
+
and geometry diffing; it does not replace them.
|
|
23
|
+
|
|
24
|
+
## v1 scope
|
|
25
|
+
|
|
26
|
+
GeoImpact v1 accepts GeoJSON FeatureCollections with Polygon or MultiPolygon
|
|
27
|
+
BASE/CANDIDATE geometries, Point dependent geometries, required unique,
|
|
28
|
+
non-empty string stable IDs, and an analysis CRS of EPSG:25830.
|
|
29
|
+
GeoJSON coordinates are interpreted as OGC:CRS84 and transformed to that fixed
|
|
30
|
+
analysis CRS; arbitrary CRS declarations or inference are not supported. Each
|
|
31
|
+
stable ID is matched only to the same ID in both snapshots; GeoImpact does not
|
|
32
|
+
infer renames or feature identity. Each ID is classified as unchanged,
|
|
33
|
+
modified, added, or removed. The deterministic change
|
|
34
|
+
footprint includes symmetric differences for modified IDs, the candidate
|
|
35
|
+
geometry for added IDs, and the base geometry for removed IDs. Maximum boundary
|
|
36
|
+
displacement compares only modified IDs present in both snapshots; additions
|
|
37
|
+
and removals have no displacement pair. Fixed dependent Point features are
|
|
38
|
+
compared using exact `WITHIN` predicates. An STRtree filters candidates; exact
|
|
39
|
+
GEOS predicates determine results. Boundary `TOUCHES` are reported separately
|
|
40
|
+
and never count as `WITHIN`. A configured relationship-regression policy
|
|
41
|
+
produces PASS or BLOCK evidence.
|
|
42
|
+
|
|
43
|
+
v1 does not support arbitrary CRSs or predicates, raster or network analysis,
|
|
44
|
+
database/PostGIS integration, a web UI or API, generalized change scoring,
|
|
45
|
+
legal or causal interpretation, or automatic administrative-intent inference.
|
|
46
|
+
The result describes the declared geometry and relationships; it does not
|
|
47
|
+
establish that source data are correct or that a real-world impact occurred.
|
|
48
|
+
|
|
49
|
+
## Quick start
|
|
50
|
+
|
|
51
|
+
Requires Python 3.11 or later. The supported installation path is the tagged
|
|
52
|
+
source release or a clean repository clone, and both need Git. Check the
|
|
53
|
+
interpreter with `python --version` (or `python3 --version`) first: some systems,
|
|
54
|
+
including macOS with only its bundled Python, provide an older one. To install
|
|
55
|
+
v1.2.1 directly from its version tag:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
python -m pip install "git+https://github.com/soroushkarahrodi79-oss/geoimpact-ci.git@v1.2.1"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
To work from a clean clone and run the included examples:
|
|
62
|
+
|
|
63
|
+
```powershell
|
|
64
|
+
git clone https://github.com/soroushkarahrodi79-oss/geoimpact-ci.git
|
|
65
|
+
cd geoimpact-ci
|
|
66
|
+
git checkout v1.2.1
|
|
67
|
+
python -m venv .venv
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Activate the environment (`.venv\Scripts\Activate.ps1` in PowerShell, or
|
|
71
|
+
`source .venv/bin/activate` on Linux/macOS), then run:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
python -m pip install .
|
|
75
|
+
geoimpact analyze --config tests/fixtures/geoimpact.yml --out output
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The fixture intentionally BLOCKs (exit code 1). A PASS fixture is available at
|
|
79
|
+
`tests/fixtures/geoimpact-pass.yml`.
|
|
80
|
+
|
|
81
|
+
For an editable development install with the test suite, use
|
|
82
|
+
`python -m pip install -e ".[test]"`. To build wheel and source distributions,
|
|
83
|
+
install the `build` frontend and run `python -m build`; the archives are written
|
|
84
|
+
to `dist/`. For v1.2.1, install the wheel with
|
|
85
|
+
`python -m pip install dist/geoimpact_ci-1.2.1-py3-none-any.whl` or the source
|
|
86
|
+
archive with `python -m pip install dist/geoimpact_ci-1.2.1.tar.gz`. The
|
|
87
|
+
repository's `scripts/verify_release_candidate.py` qualifies both archives in
|
|
88
|
+
fresh environments.
|
|
89
|
+
|
|
90
|
+
## Configuration
|
|
91
|
+
|
|
92
|
+
Paths to data files are resolved relative to the YAML file. This example uses
|
|
93
|
+
the v1 schema:
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
version: 1
|
|
97
|
+
|
|
98
|
+
analysis:
|
|
99
|
+
crs: EPSG:25830
|
|
100
|
+
|
|
101
|
+
primary:
|
|
102
|
+
dataset: districts
|
|
103
|
+
base: base.geojson
|
|
104
|
+
candidate: candidate.geojson
|
|
105
|
+
id_field: district_id
|
|
106
|
+
|
|
107
|
+
dependencies:
|
|
108
|
+
- dataset: facilities
|
|
109
|
+
path: facilities.geojson
|
|
110
|
+
id_field: facility_id
|
|
111
|
+
predicate: within
|
|
112
|
+
|
|
113
|
+
policy:
|
|
114
|
+
max_relationship_regressions:
|
|
115
|
+
threshold: 0
|
|
116
|
+
severity: block
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The threshold is the permitted maximum number of relationship regressions; a
|
|
120
|
+
count above it blocks. A zero threshold is a strict example, not a universal
|
|
121
|
+
policy recommendation. Each stable ID must be present and unique in its input.
|
|
122
|
+
|
|
123
|
+
## Run and interpret
|
|
124
|
+
|
|
125
|
+
```text
|
|
126
|
+
geoimpact analyze --config PATH --out DIRECTORY
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The command writes three files:
|
|
130
|
+
|
|
131
|
+
- `report.json` — authoritative machine-readable result.
|
|
132
|
+
- `report.md` — human-readable rendering of that report.
|
|
133
|
+
- `relationship-regressions.geojson` — spatial evidence for changed dependent
|
|
134
|
+
relationships.
|
|
135
|
+
|
|
136
|
+
Exit codes are 0 for a completed PASS, 1 for a completed BLOCK, and 2 for an
|
|
137
|
+
operational, configuration, or input error. PASS means the configured policy
|
|
138
|
+
did not block the observed relationship regressions; it is not a claim that the
|
|
139
|
+
data are correct. BLOCK means analysis completed and the observations exceeded
|
|
140
|
+
the configured policy; it is not an operational failure. ERROR means no policy
|
|
141
|
+
verdict was produced.
|
|
142
|
+
|
|
143
|
+
## Evidence and numerical contract
|
|
144
|
+
|
|
145
|
+
The active report contract is V5. V4 added first-class stable-ID addition and
|
|
146
|
+
removal statuses, ID lists, and complete footprint contributions. V3 reports
|
|
147
|
+
remain interpretable with their earlier shared-ID-only primary change section.
|
|
148
|
+
V5 adds deterministic raw-byte SHA-256 identities for the config, BASE,
|
|
149
|
+
CANDIDATE, and dependencies, together with GeoImpact CI, Shapely/GEOS, and
|
|
150
|
+
PyProj/PROJ versions. It includes no local paths or timestamps; V4 reports
|
|
151
|
+
remain valid V4 documents. See the [V5 migration record](docs/REPORT_V5_MIGRATION.md).
|
|
152
|
+
GeoJSON inputs are analyzed in EPSG:25830;
|
|
153
|
+
the primary comparison is BASE → CANDIDATE and dependencies are fixed reference
|
|
154
|
+
layers. Relationship assignment uses exact GEOS `within`. `touches` is separate
|
|
155
|
+
boundary-ambiguity evidence. STRtree results only shortlist candidate pairs.
|
|
156
|
+
|
|
157
|
+
The derived change footprint uses a `1e-6 m` computational precision grid.
|
|
158
|
+
Maximum boundary displacement is measured on temporary geometry copies
|
|
159
|
+
conformed to its separately defined `1e-6 m` measurement grid. These grids make
|
|
160
|
+
derived values reproducible; they do not describe source survey accuracy.
|
|
161
|
+
Output ordering and report serialization are canonical under the pinned
|
|
162
|
+
dependencies and qualified Linux/Windows runtime matrix.
|
|
163
|
+
|
|
164
|
+
## Reproducible real-world checks
|
|
165
|
+
|
|
166
|
+
The repository includes two bounded cases, not a claim of universal coverage:
|
|
167
|
+
|
|
168
|
+
- **Madrid positive benchmark:** official INE census-section snapshots
|
|
169
|
+
compared against a fixed Ayuntamiento de Madrid portal inventory. The
|
|
170
|
+
reproducible subset records 2,112 assignment changes in 26 old/new section
|
|
171
|
+
transition pairs (1,768 split-like and 344 merge-like patterns), with zero
|
|
172
|
+
gained/lost assignments and zero boundary ambiguities. The pattern labels do
|
|
173
|
+
not assert historical administrative intent or resident reassignment.
|
|
174
|
+
- **Sierra de Baza negative control:** protected-area boundary snapshots
|
|
175
|
+
compared with a fixed REDIAM public-use equipment inventory. It records 52
|
|
176
|
+
unchanged relationships, zero regressions, and zero boundary ambiguities,
|
|
177
|
+
despite a maximum boundary displacement of 368.82509547712834 m. This checks
|
|
178
|
+
that geometry change alone does not manufacture relationship impact.
|
|
179
|
+
|
|
180
|
+
These are source-specific research fixtures. Attribution, reuse conditions,
|
|
181
|
+
snapshot dates, selection recipes, and interpretation limits are recorded in
|
|
182
|
+
the [Madrid source register](docs/GATE_5_SOURCE_REGISTER.md) and [Sierra source
|
|
183
|
+
register](docs/GATE_8_SOURCE_REGISTER.md). The project does not claim ownership
|
|
184
|
+
or grant rights over those datasets.
|
|
185
|
+
|
|
186
|
+
From a clone with the project and test dependencies installed, reproduce the
|
|
187
|
+
frozen real-world checks with `python scripts/verify_madrid_benchmark.py` and
|
|
188
|
+
`python scripts/verify_gate8_case.py`. Both commands run the installed CLI and
|
|
189
|
+
compare the resulting outputs with their committed case expectations.
|
|
190
|
+
|
|
191
|
+
## Performance qualification
|
|
192
|
+
|
|
193
|
+
On the controlled Gate 7 large synthetic relationship benchmark (300 primary
|
|
194
|
+
polygons and 1,500 dependents), the indexed run took 0.134966 s versus 15.420192
|
|
195
|
+
s for the exhaustive reference, a median 114.25× speedup and 99.667% candidate
|
|
196
|
+
reduction. This is a benchmark-specific observation, not a general speed claim
|
|
197
|
+
or runtime SLA. See [performance qualification](docs/GATE_7_PERFORMANCE.md).
|
|
198
|
+
|
|
199
|
+
## Limitations and future work
|
|
200
|
+
|
|
201
|
+
The contract is limited to the pinned Shapely/GEOS and PyProj/PROJ dependencies,
|
|
202
|
+
the declared input model, and the hosted Linux/Python 3.11 and Windows/Python
|
|
203
|
+
3.14 qualification environments. It does not establish portability across
|
|
204
|
+
every geometry, dependency version, CRS, or platform. Fixed dependencies do
|
|
205
|
+
not model simultaneous changes to those layers. Spatial membership does not
|
|
206
|
+
explain legal status, causality, access, service use, or socioeconomic effects.
|
|
207
|
+
|
|
208
|
+
Future work, if supported by external feedback or a specific research need,
|
|
209
|
+
could consider additional predicates and CRSs, GeoParquet, database
|
|
210
|
+
integration, a reusable multi-case verifier, broader real-world cases, package
|
|
211
|
+
registry publication, and a UI/API. These are outside v1.
|
|
212
|
+
|
|
213
|
+
## Development and research record
|
|
214
|
+
|
|
215
|
+
Start with the [current v1 architecture](docs/ARCHITECTURE_V1.md), [test
|
|
216
|
+
strategy](docs/TEST_STRATEGY.md),
|
|
217
|
+
[change model](docs/CHANGE_MODEL.md), and [decision log](docs/DECISION_LOG.md).
|
|
218
|
+
Case and qualification records: [Madrid](docs/GATE_5_REAL_WORLD_CASE.md),
|
|
219
|
+
[performance](docs/GATE_7_PERFORMANCE.md), [Sierra case
|
|
220
|
+
selection](docs/GATE_8_CASE_SELECTION.md), [Sierra interpretation and
|
|
221
|
+
generalization](docs/GATE_8_REAL_WORLD_GENERALIZATION.md), and
|
|
222
|
+
[displacement portability](docs/GATE_9_DISPLACEMENT_PORTABILITY.md). Gate
|
|
223
|
+
reports preserve the development history; they are supporting evidence rather
|
|
224
|
+
than the product contract.
|
|
225
|
+
|
|
226
|
+
## Citation and software license
|
|
227
|
+
|
|
228
|
+
If you use GeoImpact CI in research or applied work, cite the software with
|
|
229
|
+
[`CITATION.cff`](CITATION.cff). Version 1.2.0 is archived on Zenodo; version 1.2.1,
|
|
230
|
+
a packaging release, has no version DOI yet:
|
|
231
|
+
|
|
232
|
+
- **Version DOI of 1.2.0** (cite this to identify exactly v1.2.0):
|
|
233
|
+
[10.5281/zenodo.24748092](https://doi.org/10.5281/zenodo.24748092)
|
|
234
|
+
- **Concept DOI** (all versions; resolves to the latest archived one):
|
|
235
|
+
[10.5281/zenodo.24748091](https://doi.org/10.5281/zenodo.24748091)
|
|
236
|
+
|
|
237
|
+
The [verification record](docs/ZENODO_V1_2_0_VERIFICATION.md) documents how the
|
|
238
|
+
archived files were compared with the `v1.2.0` tag.
|
|
239
|
+
|
|
240
|
+
Contributions are described in [CONTRIBUTING.md](CONTRIBUTING.md) and
|
|
241
|
+
vulnerability reporting in [SECURITY.md](SECURITY.md).
|
|
242
|
+
|
|
243
|
+
GeoImpact CI software is released under the [MIT License](LICENSE). Research
|
|
244
|
+
fixtures and third-party source data are not automatically covered by the
|
|
245
|
+
software license; consult [NOTICE.md](NOTICE.md) and the applicable [Madrid
|
|
246
|
+
source register](docs/GATE_5_SOURCE_REGISTER.md) and [Sierra source
|
|
247
|
+
register](docs/GATE_8_SOURCE_REGISTER.md).
|
|
248
|
+
|
|
249
|
+
## Repository map
|
|
250
|
+
|
|
251
|
+
- `src/geoimpact/` — CLI, analysis, policy, relationship, and artifact code.
|
|
252
|
+
- `tests/` — unit and contract tests with compact synthetic fixtures.
|
|
253
|
+
- `scripts/` — CI contract, benchmark, and release qualification verifiers.
|
|
254
|
+
- `research/` — bounded case fixtures with source notes and attribution.
|
|
255
|
+
- `docs/` — product, architecture, research, and validation records.
|
|
256
|
+
|
|
257
|
+
The GitHub Actions workflow runs the full suite and PASS/BLOCK/ERROR contracts,
|
|
258
|
+
checks canonical synthetic, Madrid, and Sierra outputs, then builds and
|
|
259
|
+
qualifies wheel and source-distribution installs on Linux/Python 3.11 and
|
|
260
|
+
Windows/Python 3.14.
|
|
261
|
+
|
|
262
|
+
An adopting repository can run the same installed CLI from its own workflow by
|
|
263
|
+
installing a tagged source release and invoking `geoimpact analyze` with its
|
|
264
|
+
version-controlled config. For example, after checking out that repository and
|
|
265
|
+
setting up Python:
|
|
266
|
+
|
|
267
|
+
```yaml
|
|
268
|
+
- run: python -m pip install "git+https://github.com/soroushkarahrodi79-oss/geoimpact-ci.git@v1.2.1"
|
|
269
|
+
- run: geoimpact analyze --config geoimpact.yml --out geoimpact-evidence
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
The command's exit code makes BLOCK and ERROR fail the job; the three output
|
|
273
|
+
files are written to the requested directory. GeoImpact does not currently
|
|
274
|
+
provide a reusable GitHub Action or a package-registry release.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "geoimpact-ci"
|
|
7
|
+
version = "1.2.1"
|
|
8
|
+
description = "Deterministic spatial change evidence for GeoJSON"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "Soroush Karahrodi" },
|
|
15
|
+
]
|
|
16
|
+
keywords = ["geospatial", "spatial-analysis", "geojson", "continuous-integration", "research"]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Environment :: Console",
|
|
19
|
+
"Intended Audience :: Science/Research",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Programming Language :: Python :: 3.14",
|
|
26
|
+
"Topic :: Scientific/Engineering :: GIS",
|
|
27
|
+
]
|
|
28
|
+
dependencies = [
|
|
29
|
+
"pyproj==3.7.2",
|
|
30
|
+
"PyYAML==6.0.3",
|
|
31
|
+
"shapely==2.1.2",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[project.urls]
|
|
35
|
+
Repository = "https://github.com/soroushkarahrodi79-oss/geoimpact-ci"
|
|
36
|
+
Documentation = "https://github.com/soroushkarahrodi79-oss/geoimpact-ci/tree/main/docs"
|
|
37
|
+
|
|
38
|
+
[project.scripts]
|
|
39
|
+
geoimpact = "geoimpact.cli:main"
|
|
40
|
+
|
|
41
|
+
[project.optional-dependencies]
|
|
42
|
+
test = ["pytest==8.4.2"]
|
|
43
|
+
|
|
44
|
+
[tool.pytest.ini_options]
|
|
45
|
+
pythonpath = ["src"]
|
|
46
|
+
testpaths = ["tests"]
|
|
47
|
+
addopts = "-ra"
|