Metadata-Version: 2.4
Name: georeadr
Version: 1.0.0
Summary: AI/ML readiness checker for geospatial datasets — score, grade and report any GIS file before feeding it into a model
Author: eritrouib
License: MIT
Project-URL: Homepage, https://github.com/eritrouib/georeadr
Project-URL: Repository, https://github.com/eritrouib/georeadr
Project-URL: Issues, https://github.com/eritrouib/georeadr/issues
Keywords: gis,geospatial,ai,ml,readiness,validation,shapefile,geopackage,arcgis,qgis
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: geopandas>=0.12.0
Dynamic: license-file

# georeadr

Know if your geospatial data is ready for AI/ML before you find out the hard way.

```bash
pip install georeadr
```

> **Requires Python 3.9+** · Depends on geopandas

---

## The problem

You have a shapefile or GeoPackage. You want to feed it into a model. But is the data actually ready?

- Does it have a CRS?
- Are there null geometries hiding in there?
- Are coordinates swapped or out of bounds?
- Are attributes complete enough to be useful?
- Are there duplicate features that will bias your model?

Finding out halfway through a pipeline is painful. **georeadr checks first.**

---

## Quick start

```python
import georeadr

report = georeadr.check("my_data.gpkg")
print(report)
```

Output:
```
============================================================
  georeadr AI/ML Readiness Report
  File: my_data.gpkg
============================================================
  Score: 74.2/100   Grade: C
  Dataset is mostly ready but has 2 warning(s) to address.
============================================================

[PASS] CRS defined
       CRS is defined: EPSG:27700

[PASS] Null geometries
       No null or empty geometries found.

[PASS] Geometry validity
       All geometries are valid.

[WARN] Attribute completeness
       Attribute completeness: 87.3%. 2 column(s) have missing values.

[PASS] Geometry type consistency
       All geometries are of type: Polygon

[WARN] Duplicate features
       3 duplicate geometries found (1.2%).

[PASS] Feature count
       2,847 features found.

[PASS] Bounds sanity
       Bounds look sensible (width=3.2145, height=2.8721).
============================================================
```

---

## Works with any GIS format

```python
georeadr.check("data.shp")
georeadr.check("data.geojson")
georeadr.check("data.gpkg")
georeadr.check("data.gpkg", layer="my_layer")
```

Or pass a GeoDataFrame directly:

```python
import geopandas as gpd
import georeadr

gdf = gpd.read_file("data.shp")
report = georeadr.check(gdf)
```

---

## Run specific checks only

```python
report = georeadr.check("data.gpkg", checks=["crs", "nulls", "validity"])
```

Available checks: `crs`, `nulls`, `validity`, `completeness`, `duplicates`, `geometry_type`, `count`, `bounds`

---

## Use the report programmatically

```python
report = georeadr.check("data.gpkg")

report.score        # 74.2
report.grade        # "C"
report.passed       # True (score >= 70)
report.errors       # list of failed checks with severity="error"
report.warnings     # list of failed checks with severity="warning"

for check in report.checks:
    print(f"{check.name}: {'PASS' if check.passed else 'FAIL'} ({check.score:.0%})")
```

---

## Checks explained

| Check | What it catches |
|-------|----------------|
| CRS defined | Missing coordinate reference system |
| Null geometries | Features with no geometry |
| Geometry validity | Self-intersections, bowtie polygons |
| Attribute completeness | Missing values across columns |
| Duplicate features | Features with identical geometries |
| Geometry type consistency | Mixed Points, Lines and Polygons |
| Feature count | Too few features for meaningful ML |
| Bounds sanity | Swapped coordinates, global extent issues |

---

## License

MIT
