# ignf/pompei architecture

> Architecture diagram of the GitHub repository ignf/pompei, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ignf/pompei
- Repository: https://github.com/ignf/pompei

## Overview

Pompei is a Python-and-MicMac photogrammetry workflow for turning scanned historical aerial imagery into orthophotos and surface models, with less manual ground-control work. The documented user journey is to find available projects, select a flight’s images, retrieve the imagery and metadata, then process a project. Processing covers fiducial marks, aerial orientation, ground-control points, orthorectification, radiometric equalization, and mosaicking; outputs can also be compared with existing terrain or surface models. The README describes an overall processing script, but it is not present in this tree, so the graph does not invent its internal orchestration.

Main entry points: [`pompei/scripts/build_mns_micmac.py`](https://github.com/ignf/pompei/blob/main/pompei/scripts/build_mns_micmac.py) (Surface model), [`pompei/scripts/initialize_files.py`](https://github.com/ignf/pompei/blob/main/pompei/scripts/initialize_files.py) (Project setup), [`pompei/scripts/get_flight_plan.py`](https://github.com/ignf/pompei/blob/main/pompei/scripts/get_flight_plan.py) (Flight plan), [`pompei/scripts/get_images.py`](https://github.com/ignf/pompei/blob/main/pompei/scripts/get_images.py) (Image retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Project acquisition"]
  node_catalog["Project catalog<br/>[get_data.py]"]
  node_flight["Flight plan<br/>[get_flight_plan.py]"]
  node_images["Image retrieval<br/>[get_images.py]"]
end

subgraph group_photogrammetry["Photogrammetry"]
  node_init["Project setup"]
  node_fiducials["Fiducial detection"]
  node_manual_marks["Manual mark entry<br/>[fichier3.py]"]
  node_orientation["Camera orientation<br/>[aero_first_step.py]"]
  node_geometry["Projection geometry<br/>[equations.py]"]
  node_gcp["Ground control"]
  node_gcp_review["GCP editing<br/>[add_GCP.py]"]
  node_micmac["MicMac engine"]
end

subgraph group_products["Raster products"]
  node_orthos["Orthophoto creation"]
  node_equalize["Radiometric equalization"]
  node_mosaic["Ortho mosaicking<br/>[mosaiquage.py]"]
  node_surface["Surface model"]
  node_ortho_result["Orthophoto output"]
  node_mns_result["MNS output<br/>[improve_mns.py]"]
end

subgraph group_integration["External data"]
  node_dem["Terrain model<br/>[download_mnt.py]"]
  node_srtm["SRTM elevation<br/>[download_SRTM.py]"]
  node_store["Store-ref MNS"]
  node_geoserver["GeoServer"]
end

node_user(("Project operator"))

node_user -->|"requests projects"| node_catalog
node_catalog -->|"selects project"| node_flight
node_user -->|"chooses project"| node_flight
node_flight -->|"selects images"| node_images
node_user -->|"requests imagery"| node_images
node_images -->|"provides project data"| node_init
node_init -->|"prepares processing"| node_fiducials
node_init -->|"prepares processing"| node_orientation
node_fiducials -->|"supplies marks"| node_micmac
node_manual_marks -.->|"supplies marks"| node_micmac
node_orientation -->|"runs photogrammetry"| node_micmac
node_gcp_review -->|"provides control"| node_micmac
node_micmac -->|"produces control data"| node_gcp
node_geometry -->|"supports projection"| node_orthos
node_micmac -->|"produces orientations"| node_orthos
node_orthos -->|"provides ortho images"| node_equalize
node_equalize -->|"provides corrected imagery"| node_mosaic
node_mosaic -->|"writes mosaic"| node_ortho_result
node_micmac -->|"builds surface"| node_surface
node_surface -->|"writes model"| node_mns_result
node_dem -.->|"provides elevation"| node_surface
node_srtm -.->|"provides elevation"| node_surface
node_store -.->|"provides reference MNS"| node_surface
node_ortho_result -.->|"uploads product"| node_geoserver

click node_catalog "https://github.com/ignf/pompei/blob/main/pompei/scripts/get_data.py"
click node_flight "https://github.com/ignf/pompei/blob/main/pompei/scripts/get_flight_plan.py"
click node_images "https://github.com/ignf/pompei/blob/main/pompei/scripts/get_images.py"
click node_init "https://github.com/ignf/pompei/blob/main/pompei/scripts/initialize_files.py"
click node_fiducials "https://github.com/ignf/pompei/blob/main/pompei/scripts/detect_fiducial_marks_YOLO.py"
click node_manual_marks "https://github.com/ignf/pompei/blob/main/pompei/scripts/fichier3.py"
click node_orientation "https://github.com/ignf/pompei/blob/main/pompei/scripts/aero_first_step.py"
click node_geometry "https://github.com/ignf/pompei/blob/main/pompei/scripts/equations.py"
click node_gcp "https://github.com/ignf/pompei/blob/main/pompei/scripts/pompei_rapide/Aubry_convert_GCP_to_mm3d.py"
click node_gcp_review "https://github.com/ignf/pompei/blob/main/pompei/scripts/add_GCP.py"
click node_orthos "https://github.com/ignf/pompei/blob/main/pompei/scripts/create_orthos_OIS_Reech.py"
click node_equalize "https://github.com/ignf/pompei/blob/main/pompei/scripts/compute_pas_radiometric_equalization.py"
click node_mosaic "https://github.com/ignf/pompei/blob/main/pompei/scripts/mosaiquage.py"
click node_surface "https://github.com/ignf/pompei/blob/main/pompei/scripts/build_mns_micmac.py"
click node_dem "https://github.com/ignf/pompei/blob/main/pompei/scripts/download_mnt.py"
click node_srtm "https://github.com/ignf/pompei/blob/main/pompei/scripts/download_SRTM.py"
click node_store "https://github.com/ignf/pompei/blob/main/pompei/scripts/download_ortho_MNS_store-ref.py"
click node_geoserver "https://github.com/ignf/pompei/blob/main/pompei/scripts/upload_to_geoserver.py"
click node_ortho_result "https://github.com/ignf/pompei/blob/main/pompei/scripts/create_big_Ortho.py"
click node_mns_result "https://github.com/ignf/pompei/blob/main/pompei/scripts/improve_mns.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_catalog,node_flight,node_images toneBlue
class node_init,node_fiducials,node_manual_marks,node_orientation,node_geometry,node_gcp,node_gcp_review,node_micmac toneAmber
class node_orthos,node_equalize,node_mosaic,node_surface,node_ortho_result,node_mns_result toneMint
class node_dem,node_srtm,node_store,node_geoserver toneRose
class node_user toneIndigo
```

## Components

### Project acquisition

- [Project catalog](https://github.com/ignf/pompei/blob/main/pompei/scripts/get_data.py): `pompei/scripts/get_data.py`
- [Flight plan](https://github.com/ignf/pompei/blob/main/pompei/scripts/get_flight_plan.py): `pompei/scripts/get_flight_plan.py`
- [Image retrieval](https://github.com/ignf/pompei/blob/main/pompei/scripts/get_images.py): `pompei/scripts/get_images.py`

### Photogrammetry

- [Project setup](https://github.com/ignf/pompei/blob/main/pompei/scripts/initialize_files.py): `pompei/scripts/initialize_files.py`
- [Fiducial detection](https://github.com/ignf/pompei/blob/main/pompei/scripts/detect_fiducial_marks_YOLO.py): `pompei/scripts/detect_fiducial_marks_YOLO.py`
- [Manual mark entry](https://github.com/ignf/pompei/blob/main/pompei/scripts/fichier3.py): `pompei/scripts/fichier3.py`
- [Camera orientation](https://github.com/ignf/pompei/blob/main/pompei/scripts/aero_first_step.py): `pompei/scripts/aero_first_step.py`
- [Projection geometry](https://github.com/ignf/pompei/blob/main/pompei/scripts/equations.py): `pompei/scripts/equations.py`
- [Ground control](https://github.com/ignf/pompei/blob/main/pompei/scripts/pompei_rapide/Aubry_convert_GCP_to_mm3d.py): `pompei/scripts/pompei_rapide/Aubry_convert_GCP_to_mm3d.py`
- [GCP editing](https://github.com/ignf/pompei/blob/main/pompei/scripts/add_GCP.py): `pompei/scripts/add_GCP.py`
- **MicMac engine**

### Raster products

- [Orthophoto creation](https://github.com/ignf/pompei/blob/main/pompei/scripts/create_orthos_OIS_Reech.py): `pompei/scripts/create_orthos_OIS_Reech.py`
- [Radiometric equalization](https://github.com/ignf/pompei/blob/main/pompei/scripts/compute_pas_radiometric_equalization.py): `pompei/scripts/compute_pas_radiometric_equalization.py`
- [Ortho mosaicking](https://github.com/ignf/pompei/blob/main/pompei/scripts/mosaiquage.py): `pompei/scripts/mosaiquage.py`
- [Surface model](https://github.com/ignf/pompei/blob/main/pompei/scripts/build_mns_micmac.py): `pompei/scripts/build_mns_micmac.py`
- [Orthophoto output](https://github.com/ignf/pompei/blob/main/pompei/scripts/create_big_Ortho.py): `pompei/scripts/create_big_Ortho.py`
- [MNS output](https://github.com/ignf/pompei/blob/main/pompei/scripts/improve_mns.py): `pompei/scripts/improve_mns.py`

### External data

- [Terrain model](https://github.com/ignf/pompei/blob/main/pompei/scripts/download_mnt.py): `pompei/scripts/download_mnt.py`
- [SRTM elevation](https://github.com/ignf/pompei/blob/main/pompei/scripts/download_SRTM.py): `pompei/scripts/download_SRTM.py`
- [Store-ref MNS](https://github.com/ignf/pompei/blob/main/pompei/scripts/download_ortho_MNS_store-ref.py): `pompei/scripts/download_ortho_MNS_store-ref.py`
- [GeoServer](https://github.com/ignf/pompei/blob/main/pompei/scripts/upload_to_geoserver.py): `pompei/scripts/upload_to_geoserver.py`

### Other components

- **Project operator**

## Connections

- Project operator → Project catalog: requests projects
- Project catalog → Flight plan: selects project
- Project operator → Flight plan: chooses project
- Flight plan → Image retrieval: selects images
- Project operator → Image retrieval: requests imagery
- Image retrieval → Project setup: provides project data
- Project setup → Fiducial detection: prepares processing
- Project setup → Camera orientation: prepares processing
- Fiducial detection → MicMac engine: supplies marks
- Manual mark entry → MicMac engine: supplies marks
- Camera orientation → MicMac engine: runs photogrammetry
- GCP editing → MicMac engine: provides control
- MicMac engine → Ground control: produces control data
- Projection geometry → Orthophoto creation: supports projection
- MicMac engine → Orthophoto creation: produces orientations
- Orthophoto creation → Radiometric equalization: provides ortho images
- Radiometric equalization → Ortho mosaicking: provides corrected imagery
- Ortho mosaicking → Orthophoto output: writes mosaic
- MicMac engine → Surface model: builds surface
- Surface model → MNS output: writes model
- Terrain model → Surface model: provides elevation
- SRTM elevation → Surface model: provides elevation
- Store-ref MNS → Surface model: provides reference MNS
- Orthophoto output → GeoServer: uploads product
