Skip to content

rodriguez46p-ui/GeoAI-QGIS-Asset-Refinement-Lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoAI-QGIS-Asset-Refinement-Lab

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.

Reviewer Snapshot

If you only have two minutes, review these artifacts:

  • outputs/maps/04_top_candidate_sites.png for the final cartographic product.
  • outputs/maps/00_portfolio_review_map.png for the fastest visual review.
  • outputs/tables/top_candidate_sites.csv for ranked recommendations and QA status.
  • outputs/tables/site_selection_rationale.csv for plain-English site rationales.
  • outputs/reports/fellowship_reviewer_guide.md for the 60-second approval path.
  • outputs/reports/ai_asset_model_card.md for the AI asset workflow framing.
  • outputs/asset_manifest.json for reproducibility metadata, hashes, layer counts, CRS, and scoring configuration.
  • qgis/GeoAI-QGIS-Asset-Refinement-Lab.qgs for QGIS interoperability.

Why This Fits A QGIS Specialist Role

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.

Map Outputs

Context map Reviewer map Constraints map Suitability surface Top candidate sites Asset QA overview

Technical Stack

  • Python 3.11+
  • GeoPandas, Shapely, PyProj, Pyogrio
  • Pandas, NumPy
  • Matplotlib
  • Pytest
  • QGIS 3.x for optional desktop inspection

Data Model

All source data are synthetic and license-safe. The pipeline generates:

  • area_of_interest
  • neighborhoods
  • roads_transit
  • flood_risk_zones
  • green_spaces
  • protected_areas
  • utilities
  • restricted_zones
  • candidate_parcels
  • suitability_grid
  • top_ranked_sites

The main QGIS-ready package is:

data/processed/geoai_qgis_asset_refinement_lab.gpkg

Methodology

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.

Run The Pipeline

Create an environment and install dependencies:

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

Run the complete workflow:

python scripts/run_pipeline.py

Or 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.py

If 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.py

Run tests:

pytest tests/test_geoai_pipeline.py

Open In QGIS

  1. Open qgis/GeoAI-QGIS-Asset-Refinement-Lab.qgz if available. Otherwise open qgis/GeoAI-QGIS-Asset-Refinement-Lab.qgs, or open QGIS and add data/processed/geoai_qgis_asset_refinement_lab.gpkg.
  2. Load layers in this order: AOI, suitability grid, flood risk, green spaces, roads/transit, candidate parcels, top ranked sites, utilities, restricted zones, protected areas.
  3. Apply QML files from qgis/ to the matching layers.
  4. Inspect suitability_score, site_rank, recommendation, and QA fields in the attribute table.
  5. Export or modify map layouts using the generated PNG maps as reference outputs.

See docs/qgis_workflow.md for detailed QGIS steps.

Outputs

  • 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

QA Checks

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.md
  • outputs/reports/ai_asset_model_card.md
  • outputs/reports/fellowship_reviewer_guide.md
  • outputs/tables/asset_qa_findings.csv
  • outputs/tables/sensitivity_scenarios.csv
  • outputs/tables/site_selection_rationale.csv

What This Demonstrates

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.

Limitations

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.

Future Improvements

  • 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.

About

Reproducible QGIS geospatial asset QA and urban resilience site selection portfolio project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors