AI-assisted urban resilience site selection and geospatial asset QA for a QGIS specialist portfolio.
This repository is a complete, runnable geospatial analysis project. It creates deterministic synthetic urban GIS data, validates and repairs spatial assets, runs a transparent site suitability model, exports QGIS-ready layers and styles, and produces cartographic PNG maps and Markdown reports.
If you only have two minutes, review these artifacts:
outputs/maps/04_top_candidate_sites.pngfor the final cartographic product.outputs/maps/00_portfolio_review_map.pngfor the fastest visual review.outputs/tables/top_candidate_sites.csvfor ranked recommendations and QA status.outputs/tables/site_selection_rationale.csvfor plain-English site rationales.outputs/reports/fellowship_reviewer_guide.mdfor the 60-second approval path.outputs/reports/ai_asset_model_card.mdfor the AI asset workflow framing.outputs/asset_manifest.jsonfor reproducibility metadata, hashes, layer counts, CRS, and scoring configuration.qgis/GeoAI-QGIS-Asset-Refinement-Lab.qgsfor QGIS interoperability.
The project demonstrates the practical work expected from a geospatial analyst supporting AI research digital assets:
- CRS-aware vector data preparation in a projected meter-based CRS.
- Geometry validation, repair, clipping, buffering, overlay, spatial joins, and proximity analysis.
- Grid-based suitability scoring with explainable weighted factors.
- GeoPackage and GeoJSON exports that open cleanly in QGIS.
- QML style files and a QGIS project file for cartographic review.
- Asset QA reporting for schema, geometry, ID, topology, and bounds issues.
- Asset lineage gates so known source defects are retained for audit but excluded from recommendations.
- Sensitivity analysis across alternate weighting schemes.
- Reproducible command-line automation and tests.
- Python 3.11+
- GeoPandas, Shapely, PyProj, Pyogrio
- Pandas, NumPy
- Matplotlib
- Pytest
- QGIS 3.x for optional desktop inspection
All source data are synthetic and license-safe. The pipeline generates:
area_of_interestneighborhoodsroads_transitflood_risk_zonesgreen_spacesprotected_areasutilitiesrestricted_zonescandidate_parcelssuitability_gridtop_ranked_sites
The main QGIS-ready package is:
data/processed/geoai_qgis_asset_refinement_lab.gpkg
The analysis selects candidate AI research field lab sites using normalized criteria:
| Factor | Purpose | Weight |
|---|---|---|
| Accessibility | Near transit corridors or major roads | 0.24 |
| Utility access | Near power, fiber, or water infrastructure | 0.18 |
| Flood safety | Away from high and moderate flood-risk zones | 0.22 |
| Green proximity | Near green space, but not too close or inside protected land | 0.14 |
| Area suitability | Sufficient parcel area for field operations | 0.12 |
| Neighborhood balance | Avoids over-concentrating recommendations | 0.10 |
Restricted zones and protected areas are treated as exclusion constraints. Flood exposure and proximity measures are computed in EPSG:26918, so distances and areas are meter-based.
Parcels with duplicate IDs or known source geometry defects are not recommended even if their repaired geometry scores well. This is intentional: an AI research asset workflow should preserve questionable source features for audit while preventing them from entering final recommendations.
Create an environment and install dependencies:
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txtRun the complete workflow:
python scripts/run_pipeline.pyOr run stages individually:
python scripts/00_generate_sample_data.py
python scripts/01_preprocess.py
python scripts/02_run_suitability_analysis.py
python scripts/04_asset_qa.py
python scripts/03_export_maps.py
python scripts/05_build_qgis_project.py
python scripts/06_generate_asset_manifest.py
python scripts/validate_outputs.pyIf QGIS is installed locally, generate the polished .qgz project:
"C:\Program Files\QGIS 3.44.10\bin\python-qgis-ltr.bat" scripts\07_build_qgis_project_pyqgis.pyRun tests:
pytest tests/test_geoai_pipeline.py- Open
qgis/GeoAI-QGIS-Asset-Refinement-Lab.qgzif available. Otherwise openqgis/GeoAI-QGIS-Asset-Refinement-Lab.qgs, or open QGIS and adddata/processed/geoai_qgis_asset_refinement_lab.gpkg. - Load layers in this order: AOI, suitability grid, flood risk, green spaces, roads/transit, candidate parcels, top ranked sites, utilities, restricted zones, protected areas.
- Apply QML files from
qgis/to the matching layers. - Inspect
suitability_score,site_rank,recommendation, and QA fields in the attribute table. - Export or modify map layouts using the generated PNG maps as reference outputs.
See docs/qgis_workflow.md for detailed QGIS steps.
- Maps:
outputs/maps/*.png - Reports:
outputs/reports/*.md - Tables:
outputs/tables/*.csv - Asset manifest:
outputs/asset_manifest.json - GeoPackage:
data/processed/geoai_qgis_asset_refinement_lab.gpkg - GeoJSON exports:
data/processed/geojson/*.geojson - QGIS styles/project:
qgis/*.qml,qgis/*.qgs,qgis/*.qgz
The asset QA module checks for missing CRS, invalid and empty geometries, duplicate IDs, required schema fields, out-of-bounds features, suspicious areas or lengths, naming issues, and parcel overlaps. Findings are exported to:
outputs/reports/geospatial_asset_qa_report.mdoutputs/reports/ai_asset_model_card.mdoutputs/reports/fellowship_reviewer_guide.mdoutputs/tables/asset_qa_findings.csvoutputs/tables/sensitivity_scenarios.csvoutputs/tables/site_selection_rationale.csv
For hiring reviewers, this project shows that the candidate can move beyond map screenshots and deliver a reproducible geospatial asset workflow: data engineering, spatial analysis, cartographic communication, QGIS interoperability, QA discipline, and clear reporting for AI research operations.
The data are synthetic and designed to demonstrate method quality. A production study would add authoritative parcel, zoning, flood, utility, and mobility data; stakeholder constraints; community review; and formal uncertainty reporting.
- Add raster cost-distance analysis for evacuation or service accessibility.
- Add QGIS print layout XML generation through PyQGIS when QGIS is installed.
- Add CI checks for GeoPackage layer presence and map artifact generation.





