# a7it/satellite-image-change-detection-for-sea-level-rising architecture

> Architecture diagram of the GitHub repository a7it/satellite-image-change-detection-for-sea-level-rising, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/a7it/satellite-image-change-detection-for-sea-level-rising
- Repository: https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising

## Overview

This repository builds coastal-change labels and a model-ready dataset from multi-year Landsat imagery. The principal workflow loads an area of interest, processes each year into a shoreline, compares successive shorelines, and saves transect-level change labels. A separate dataset-building workflow engineers spectral, location, temporal, spatial, cloud, and elevation features before preparing training data. The yearly orchestrator’s calls are excerpted; several implementation details, especially the dataset builder and individual change-analysis helpers, were not sampled, so their internal links are limited to documented or indexed evidence.

Main entry points: [`src/pipeline/year_pipeline.py`](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/pipeline/year_pipeline.py) (Annual workflow), [`src/dataset/build_dataset.py`](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/build_dataset.py) (Dataset builder), [`src/models/year_dataset.py`](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/models/year_dataset.py) (Year data model), [`main.py`](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/main.py) (Run coordinator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Workflow orchestration"]
  node_main["Run coordinator<br/>[main.py]"]
  node_year_pipeline["Annual workflow<br/>[year_pipeline.py]"]
  node_change_processor["Change workflow"]
  node_dataset_builder["Dataset builder<br/>[build_dataset.py]"]
end

subgraph group_imagery["Imagery processing"]
  node_scene_search["Scene search<br/>[searcher.py]"]
  node_download_setup["Year directories"]
  node_year_download["Scene download<br/>[year_downloader.py]"]
  node_scene_download["Asset retrieval"]
  node_preprocess["Scene preparation<br/>[processor.py]"]
  node_annual_composite["Annual composite"]
  node_indices["Spectral indices<br/>[index_processor.py]"]
  node_water["Water masks<br/>[water_processor.py]"]
  node_shoreline["Shoreline extraction"]
end

subgraph group_change["Shoreline change"]
  node_comparison["Shoreline comparison<br/>[comparison.py]"]
  node_intersections["Transect intersections<br/>[intersection.py]"]
  node_metrics["Change metrics<br/>[metrics.py]"]
  node_statistics["Change statistics<br/>[statistics.py]"]
  node_transects["Transect analysis<br/>[transects.py]"]
end

subgraph group_features["Dataset engineering"]
  node_spectral_features["Spectral features"]
  node_location_features["Location features"]
  node_temporal_features["Temporal features"]
  node_spatial_features["Spatial features"]
  node_missing_values["Missing-value handling"]
  node_cloud_features["Cloud features"]
  node_dem_features["Elevation features"]
  node_training_data["Training preparation"]
  node_ml_preparation["ML data preparation<br/>[prepare_data.py]"]
end

subgraph group_shared["Shared models and I/O"]
  node_year_data["Year data model<br/>[year_dataset.py]"]
  node_scene_model["Scene model<br/>[scene.py]"]
  node_raster_writer["Raster output<br/>[raster_writer.py]"]
  node_change_results["Change result"]
end

node_operator(("Pipeline operator"))
node_aoi["Study area"]
node_stac{{"Planetary Computer"}}

node_operator -->|"runs"| node_main
node_main -->|"loads"| node_aoi
node_main -->|"runs yearly"| node_year_pipeline
node_main -->|"processes periods"| node_change_processor
node_main -->|"then runs"| node_dataset_builder
node_year_pipeline -->|"searches"| node_scene_search
node_scene_search -->|"queries catalog"| node_stac
node_year_pipeline -->|"prepares paths"| node_download_setup
node_year_pipeline -->|"downloads scenes"| node_year_download
node_year_download -->|"uses"| node_scene_download
node_year_pipeline -->|"preprocesses"| node_preprocess
node_year_pipeline -->|"builds composite"| node_annual_composite
node_year_pipeline -->|"calculates indices"| node_indices
node_year_pipeline -->|"extracts water"| node_water
node_year_pipeline -->|"extracts shoreline"| node_shoreline
node_year_pipeline -->|"creates data"| node_year_data
node_download_setup -->|"sets directories"| node_year_data
node_year_download -->|"updates scenes"| node_year_data
node_scene_search -->|"creates scenes"| node_scene_model
node_preprocess -->|"processes"| node_scene_model
node_preprocess -->|"writes bands"| node_raster_writer
node_annual_composite -->|"uses"| node_year_data
node_annual_composite -->|"writes raster"| node_raster_writer
node_indices -->|"uses"| node_year_data
node_water -->|"uses"| node_year_data
node_water -->|"writes masks"| node_raster_writer
node_shoreline -->|"uses"| node_year_data
node_change_processor -->|"compares"| node_comparison
node_change_processor -->|"summarizes"| node_statistics
node_change_processor -->|"returns result"| node_change_results
node_comparison -->|"computes"| node_intersections
node_comparison -->|"calculates"| node_metrics
node_comparison -->|"uses"| node_transects
node_dataset_builder -->|"engineers"| node_spectral_features
node_dataset_builder -->|"engineers"| node_location_features
node_dataset_builder -->|"engineers"| node_temporal_features
node_dataset_builder -->|"engineers"| node_spatial_features
node_dataset_builder -->|"handles missing"| node_missing_values
node_dataset_builder -->|"adds metadata"| node_cloud_features
node_dataset_builder -->|"adds elevation"| node_dem_features
node_dataset_builder -->|"prepares training"| node_training_data
node_training_data -.->|"prepares data"| node_ml_preparation

click node_main "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/main.py"
click node_year_pipeline "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/pipeline/year_pipeline.py"
click node_change_processor "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/change_detection/change_processor.py"
click node_dataset_builder "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/build_dataset.py"
click node_scene_search "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/acquisition/searcher.py"
click node_download_setup "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/acquisition/download_manager.py"
click node_year_download "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/acquisition/year_downloader.py"
click node_scene_download "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/acquisition/scene_downloader.py"
click node_preprocess "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/preprocessing/processor.py"
click node_annual_composite "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/compositing/annual_composite.py"
click node_indices "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/indices/index_processor.py"
click node_water "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/water/water_processor.py"
click node_shoreline "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/shoreline/shoreline_processor.py"
click node_year_data "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/models/year_dataset.py"
click node_scene_model "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/models/scene.py"
click node_raster_writer "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/io/raster_writer.py"
click node_comparison "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/change_detection/comparison.py"
click node_intersections "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/change_detection/intersection.py"
click node_metrics "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/change_detection/metrics.py"
click node_statistics "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/change_detection/statistics.py"
click node_transects "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/change_detection/transects.py"
click node_change_results "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/models/change_detection_result.py"
click node_spectral_features "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/add_satellite_features.py"
click node_location_features "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/create_location_features.py"
click node_temporal_features "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/add_temporal_features.py"
click node_spatial_features "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/add_spatial_features.py"
click node_missing_values "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/handle_missing_values.py"
click node_cloud_features "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/add_cloud_features.py"
click node_dem_features "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/add_dem_features.py"
click node_training_data "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/create_ml_training_dataset.py"
click node_ml_preparation "https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/ml/prepare_data.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_main,node_year_pipeline,node_change_processor,node_dataset_builder toneBlue
class node_scene_search,node_download_setup,node_year_download,node_scene_download,node_preprocess,node_annual_composite,node_indices,node_water,node_shoreline toneAmber
class node_comparison,node_intersections,node_metrics,node_statistics,node_transects toneMint
class node_spectral_features,node_location_features,node_temporal_features,node_spatial_features,node_missing_values,node_cloud_features,node_dem_features,node_training_data,node_ml_preparation toneRose
class node_year_data,node_scene_model,node_raster_writer,node_change_results,node_operator,node_aoi,node_stac toneIndigo
```

## Components

### Workflow orchestration

- [Run coordinator](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/main.py): `main.py`
- [Annual workflow](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/pipeline/year_pipeline.py): `src/pipeline/year_pipeline.py`
- [Change workflow](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/change_detection/change_processor.py): `src/change_detection/change_processor.py`
- [Dataset builder](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/build_dataset.py): `src/dataset/build_dataset.py`

### Imagery processing

- [Scene search](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/acquisition/searcher.py): `src/acquisition/searcher.py`
- [Year directories](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/acquisition/download_manager.py): `src/acquisition/download_manager.py`
- [Scene download](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/acquisition/year_downloader.py): `src/acquisition/year_downloader.py`
- [Asset retrieval](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/acquisition/scene_downloader.py): `src/acquisition/scene_downloader.py`
- [Scene preparation](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/preprocessing/processor.py): `src/preprocessing/processor.py`
- [Annual composite](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/compositing/annual_composite.py): `src/compositing/annual_composite.py`
- [Spectral indices](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/indices/index_processor.py): `src/indices/index_processor.py`
- [Water masks](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/water/water_processor.py): `src/water/water_processor.py`
- [Shoreline extraction](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/shoreline/shoreline_processor.py): `src/shoreline/shoreline_processor.py`

### Shoreline change

- [Shoreline comparison](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/change_detection/comparison.py): `src/change_detection/comparison.py`
- [Transect intersections](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/change_detection/intersection.py): `src/change_detection/intersection.py`
- [Change metrics](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/change_detection/metrics.py): `src/change_detection/metrics.py`
- [Change statistics](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/change_detection/statistics.py): `src/change_detection/statistics.py`
- [Transect analysis](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/change_detection/transects.py): `src/change_detection/transects.py`

### Dataset engineering

- [Spectral features](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/add_satellite_features.py): `src/dataset/add_satellite_features.py`
- [Location features](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/create_location_features.py): `src/dataset/create_location_features.py`
- [Temporal features](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/add_temporal_features.py): `src/dataset/add_temporal_features.py`
- [Spatial features](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/add_spatial_features.py): `src/dataset/add_spatial_features.py`
- [Missing-value handling](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/handle_missing_values.py): `src/dataset/handle_missing_values.py`
- [Cloud features](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/add_cloud_features.py): `src/dataset/add_cloud_features.py`
- [Elevation features](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/add_dem_features.py): `src/dataset/add_dem_features.py`
- [Training preparation](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/dataset/create_ml_training_dataset.py): `src/dataset/create_ml_training_dataset.py`
- [ML data preparation](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/ml/prepare_data.py): `src/ml/prepare_data.py`

### Shared models and I/O

- [Year data model](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/models/year_dataset.py): `src/models/year_dataset.py`
- [Scene model](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/models/scene.py): `src/models/scene.py`
- [Raster output](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/io/raster_writer.py): `src/io/raster_writer.py`
- [Change result](https://github.com/a7it/satellite-image-change-detection-for-sea-level-rising/blob/main/src/models/change_detection_result.py): `src/models/change_detection_result.py`

### Other components

- **Pipeline operator**
- **Study area**
- **Planetary Computer**

## Connections

- Pipeline operator → Run coordinator: runs (evidence: `README.md`)
- Run coordinator → Study area: loads (evidence: `main.py`)
- Run coordinator → Annual workflow: runs yearly (evidence: `main.py`)
- Run coordinator → Change workflow: processes periods (evidence: `main.py`)
- Run coordinator → Dataset builder: then runs (evidence: `README.md`)
- Annual workflow → Scene search: searches (evidence: `src/pipeline/year_pipeline.py`)
- Scene search → Planetary Computer: queries catalog (evidence: `src/acquisition/searcher.py`)
- Annual workflow → Year directories: prepares paths (evidence: `src/pipeline/year_pipeline.py`)
- Annual workflow → Scene download: downloads scenes (evidence: `src/pipeline/year_pipeline.py`)
- Scene download → Asset retrieval: uses (evidence: `src/acquisition/year_downloader.py`)
- Annual workflow → Scene preparation: preprocesses (evidence: `src/pipeline/year_pipeline.py`)
- Annual workflow → Annual composite: builds composite (evidence: `src/pipeline/year_pipeline.py`)
- Annual workflow → Spectral indices: calculates indices (evidence: `src/pipeline/year_pipeline.py`)
- Annual workflow → Water masks: extracts water (evidence: `src/pipeline/year_pipeline.py`)
- Annual workflow → Shoreline extraction: extracts shoreline (evidence: `src/pipeline/year_pipeline.py`)
- Annual workflow → Year data model: creates data (evidence: `src/pipeline/year_pipeline.py`)
- Year directories → Year data model: sets directories (evidence: `src/acquisition/download_manager.py`)
- Scene download → Year data model: updates scenes (evidence: `src/acquisition/year_downloader.py`)
- Scene search → Scene model: creates scenes (evidence: `src/acquisition/searcher.py`)
- Scene preparation → Scene model: processes (evidence: `src/preprocessing/processor.py`)
- Scene preparation → Raster output: writes bands (evidence: `src/preprocessing/processor.py`)
- Annual composite → Year data model: uses (evidence: `src/compositing/annual_composite.py`)
- Annual composite → Raster output: writes raster (evidence: `src/compositing/annual_composite.py`)
- Spectral indices → Year data model: uses (evidence: `src/indices/index_processor.py`)
- Water masks → Year data model: uses (evidence: `src/water/water_processor.py`)
- Water masks → Raster output: writes masks (evidence: `src/water/water_processor.py`)
- Shoreline extraction → Year data model: uses (evidence: `src/shoreline/shoreline_processor.py`)
- Change workflow → Shoreline comparison: compares (evidence: `src/change_detection/change_processor.py`)
- Change workflow → Change statistics: summarizes (evidence: `src/change_detection/change_processor.py`)
- Change workflow → Change result: returns result (evidence: `src/change_detection/change_processor.py`)
- Shoreline comparison → Transect intersections: computes (evidence: `src/change_detection/comparison.py`)
- Shoreline comparison → Change metrics: calculates (evidence: `src/change_detection/comparison.py`)
- Shoreline comparison → Transect analysis: uses (evidence: `src/change_detection/comparison.py`)
- Dataset builder → Spectral features: engineers (evidence: `README.md`)
- Dataset builder → Location features: engineers (evidence: `README.md`)
- Dataset builder → Temporal features: engineers (evidence: `README.md`)
- Dataset builder → Spatial features: engineers (evidence: `README.md`)
- Dataset builder → Missing-value handling: handles missing (evidence: `README.md`)
- Dataset builder → Cloud features: adds metadata (evidence: `README.md`)
- Dataset builder → Elevation features: adds elevation (evidence: `README.md`)
- Dataset builder → Training preparation: prepares training (evidence: `README.md`)
- Training preparation → ML data preparation: prepares data
