# lexusbelisario/cama-tools architecture

> Architecture diagram of the GitHub repository lexusbelisario/cama-tools, 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/lexusbelisario/cama-tools
- Repository: https://github.com/lexusbelisario/cama-tools

## Overview

CAMA Tools is a desktop GIS toolkit for land-parcel valuation and spatial analysis. Users launch a tool, provide parcel and relevant road, POI, or terrain data, configure its parameters, and run a measurement or analysis; results are intended for GIS workflows. The launcher also supports ordered batch runs, while startup and shared utilities handle database access and application behavior. The tree and excerpts establish tool capabilities and some launcher/UI responsibilities, but do not expose most tool internals or their complete result-writing paths.

Main entry points: [`MAIN.py`](https://github.com/lexusbelisario/cama-tools/blob/main/MAIN.py) (Launcher), [`tools/batchProcessing/checklist.py`](https://github.com/lexusbelisario/cama-tools/blob/main/tools/batchProcessing/checklist.py) (Batch checklist), [`tools/landmarks_within_meters.py`](https://github.com/lexusbelisario/cama-tools/blob/main/tools/landmarks_within_meters.py) (Landmark counts), [`tools/road_width.py`](https://github.com/lexusbelisario/cama-tools/blob/main/tools/road_width.py) (Road width)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_launcher["Launcher<br/>[MAIN.py]"]
  node_startup["Startup and DB UI"]
  node_window["Window management"]
end

subgraph group_batch["Batch runs"]
  node_batchui["Batch checklist<br/>[checklist.py]"]
  node_batchstate["Batch state<br/>[state.py]"]
  node_batchcontract["Batch contract<br/>[contract.py]"]
end

subgraph group_analysis["Spatial tools"]
  node_landmark["Landmark counts"]
  node_roadwidth["Road width<br/>[road_width.py]"]
  node_influence["Influence maps"]
  node_influencedistance["Distance influence"]
  node_landshape["Land shape<br/>[land_shape.py]"]
  node_lotlocation["Lot location<br/>[lot_location.py]"]
  node_roadtools["Road measures"]
  node_terrain["Terrain<br/>[terrain.py]"]
  node_distances["POI distances"]
end

subgraph group_shared["Shared services"]
  node_datautilities["GIS data utilities"]
  node_progress["Progress UI"]
end

node_user(("GIS user"))
node_globalmapper["Global Mapper"]
node_postgis[("PostgreSQL/PostGIS")]
node_gisfiles["GIS files"]

node_user -->|"launches"| node_launcher
node_launcher -->|"opens startup"| node_startup
node_launcher -->|"manages windows"| node_window
node_launcher -.->|"manages launch"| node_globalmapper
node_launcher -->|"opens batch"| node_batchui
node_batchui -->|"updates selection"| node_batchstate
node_batchui -->|"uses order"| node_batchcontract
node_batchui -->|"dispatches tools"| node_launcher
node_launcher -->|"dispatches"| node_landmark
node_launcher -->|"dispatches"| node_roadwidth
node_launcher -->|"dispatches"| node_influence
node_launcher -->|"dispatches"| node_influencedistance
node_launcher -->|"dispatches"| node_landshape
node_launcher -->|"dispatches"| node_lotlocation
node_launcher -->|"dispatches"| node_roadtools
node_launcher -->|"dispatches"| node_terrain
node_launcher -->|"dispatches"| node_distances
node_startup -->|"tests connection"| node_postgis
node_landmark -->|"reads sources"| node_gisfiles
node_landmark -.->|"reads sources"| node_postgis
node_roadwidth -->|"reads sources"| node_gisfiles
node_roadwidth -.->|"reads sources"| node_postgis
node_landmark -->|"reports progress"| node_progress
node_datautilities -.->|"supports access"| node_postgis
node_datautilities -.->|"supports access"| node_gisfiles

click node_launcher "https://github.com/lexusbelisario/cama-tools/blob/main/MAIN.py"
click node_startup "https://github.com/lexusbelisario/cama-tools/blob/main/core/startup_and_db_ui.py"
click node_window "https://github.com/lexusbelisario/cama-tools/blob/main/core/window_management.py"
click node_batchui "https://github.com/lexusbelisario/cama-tools/blob/main/tools/batchProcessing/checklist.py"
click node_batchstate "https://github.com/lexusbelisario/cama-tools/blob/main/tools/batchProcessing/state.py"
click node_batchcontract "https://github.com/lexusbelisario/cama-tools/blob/main/tools/batchProcessing/contract.py"
click node_landmark "https://github.com/lexusbelisario/cama-tools/blob/main/tools/landmarks_within_meters.py"
click node_roadwidth "https://github.com/lexusbelisario/cama-tools/blob/main/tools/road_width.py"
click node_influence "https://github.com/lexusbelisario/cama-tools/blob/main/tools/influence_map_to_land_parcel.py"
click node_influencedistance "https://github.com/lexusbelisario/cama-tools/blob/main/tools/influence_map_distance_to_land_parcel.py"
click node_landshape "https://github.com/lexusbelisario/cama-tools/blob/main/tools/land_shape.py"
click node_lotlocation "https://github.com/lexusbelisario/cama-tools/blob/main/tools/lot_location.py"
click node_roadtools "https://github.com/lexusbelisario/cama-tools/tree/main/tools"
click node_terrain "https://github.com/lexusbelisario/cama-tools/blob/main/tools/terrain.py"
click node_distances "https://github.com/lexusbelisario/cama-tools/blob/main/tools/meters_from_school_shop_transport_church.py"
click node_datautilities "https://github.com/lexusbelisario/cama-tools/tree/main/utils"
click node_progress "https://github.com/lexusbelisario/cama-tools/blob/main/utils/progress_framework.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_launcher,node_startup,node_window,node_user toneBlue
class node_batchui,node_batchstate,node_batchcontract,node_postgis toneAmber
class node_landmark,node_roadwidth,node_influence,node_influencedistance,node_landshape,node_lotlocation,node_roadtools,node_terrain,node_distances toneMint
class node_datautilities,node_progress toneRose
class node_globalmapper,node_gisfiles toneIndigo
```

## Components

### Application

- [Launcher](https://github.com/lexusbelisario/cama-tools/blob/main/MAIN.py): `MAIN.py`
- [Startup and DB UI](https://github.com/lexusbelisario/cama-tools/blob/main/core/startup_and_db_ui.py): `core/startup_and_db_ui.py`
- [Window management](https://github.com/lexusbelisario/cama-tools/blob/main/core/window_management.py): `core/window_management.py`

### Batch runs

- [Batch checklist](https://github.com/lexusbelisario/cama-tools/blob/main/tools/batchProcessing/checklist.py): `tools/batchProcessing/checklist.py`
- [Batch state](https://github.com/lexusbelisario/cama-tools/blob/main/tools/batchProcessing/state.py): `tools/batchProcessing/state.py`
- [Batch contract](https://github.com/lexusbelisario/cama-tools/blob/main/tools/batchProcessing/contract.py): `tools/batchProcessing/contract.py`

### Spatial tools

- [Landmark counts](https://github.com/lexusbelisario/cama-tools/blob/main/tools/landmarks_within_meters.py): `tools/landmarks_within_meters.py`
- [Road width](https://github.com/lexusbelisario/cama-tools/blob/main/tools/road_width.py): `tools/road_width.py`
- [Influence maps](https://github.com/lexusbelisario/cama-tools/blob/main/tools/influence_map_to_land_parcel.py): `tools/influence_map_to_land_parcel.py`
- [Distance influence](https://github.com/lexusbelisario/cama-tools/blob/main/tools/influence_map_distance_to_land_parcel.py): `tools/influence_map_distance_to_land_parcel.py`
- [Land shape](https://github.com/lexusbelisario/cama-tools/blob/main/tools/land_shape.py): `tools/land_shape.py`
- [Lot location](https://github.com/lexusbelisario/cama-tools/blob/main/tools/lot_location.py): `tools/lot_location.py`
- [Road measures](https://github.com/lexusbelisario/cama-tools/tree/main/tools): `tools`
- [Terrain](https://github.com/lexusbelisario/cama-tools/blob/main/tools/terrain.py): `tools/terrain.py`
- [POI distances](https://github.com/lexusbelisario/cama-tools/blob/main/tools/meters_from_school_shop_transport_church.py): `tools/meters_from_school_shop_transport_church.py`

### Shared services

- [GIS data utilities](https://github.com/lexusbelisario/cama-tools/tree/main/utils): `utils`
- [Progress UI](https://github.com/lexusbelisario/cama-tools/blob/main/utils/progress_framework.py): `utils/progress_framework.py`

### Other components

- **GIS user**
- **Global Mapper**
- **PostgreSQL/PostGIS**
- **GIS files**

## Connections

- GIS user → Launcher: launches
- Launcher → Startup and DB UI: opens startup
- Launcher → Window management: manages windows
- Launcher → Global Mapper: manages launch
- Launcher → Batch checklist: opens batch
- Batch checklist → Batch state: updates selection
- Batch checklist → Batch contract: uses order
- Batch checklist → Launcher: dispatches tools
- Launcher → Landmark counts: dispatches
- Launcher → Road width: dispatches
- Launcher → Influence maps: dispatches
- Launcher → Distance influence: dispatches
- Launcher → Land shape: dispatches
- Launcher → Lot location: dispatches
- Launcher → Road measures: dispatches
- Launcher → Terrain: dispatches
- Launcher → POI distances: dispatches
- Startup and DB UI → PostgreSQL/PostGIS: tests connection
- Landmark counts → GIS files: reads sources
- Landmark counts → PostgreSQL/PostGIS: reads sources
- Road width → GIS files: reads sources
- Road width → PostgreSQL/PostGIS: reads sources
- Landmark counts → Progress UI: reports progress
- GIS data utilities → PostgreSQL/PostGIS: supports access
- GIS data utilities → GIS files: supports access
