# Shoreliser

A QGIS plugin for shoreline-change analysis. It wraps a four-step pipeline in a
right-side dock panel (one tab per step) and also registers the four steps as a
Processing provider for batch / Model Builder use.

## Pipeline

| Tab | Step | What it does |
|-----|------|--------------|
| 1 · Prep | Clip & split baseline | Clips baseline + shorelines to a selected beach polygon, splits the baseline into fixed-length segments numbered in a `longi` field, and adds a normalized `date_clean` (YYYYMMDD) field. |
| 2 · Hovmöller | Hovmöller diagram | Casts transects from the baseline, builds width + change rasters and raw/grid point layers, plus a labelled axis-grid overlay (years × longi segments). |
| 3 · Stats | Extract stats & zoom | Computes DSAS statistics (SCE, NSM, EPR, MSP, SD, CV, LRR, LSE, LCI, R²) within a drawn extent and zooms to the area. |
| 4 · Cube | Space-time cube | Generates an offline Plotly HTML (3D cube + 2D OSM map) and opens it in the browser. |

The reference epoch for the integer day index is **1984-01-01** everywhere
(editable per step). Outputs are temporary layers, auto-loaded into the project,
and each tab pre-fills the next.

## Installation

1. Copy the `shoreliser/` folder into your QGIS profile plugins directory, e.g.
   `C:\Users\<you>\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\shoreliser`
   — or install the packaged `shoreliser.zip` via
   *Plugins → Manage and Install Plugins → Install from ZIP*.
2. Enable **Shoreliser** in the plugin manager.
3. Click the toolbar icon (or *Plugins → Shoreliser*) to toggle the panel.

Requires QGIS 3.34+ (tested on 3.40 LTR). Dependencies (shapely, numpy, GDAL)
ship with QGIS. Plotly is bundled — no internet needed.

## Usage

Work top-to-bottom through the tabs. In Tab 1 you must **select one feature** in
the beach boundary layer first. In Tab 3, use the extent box to draw the area of
interest over the Hovmöller diagram before running. Results auto-load and feed
the next tab.

## License & citation

Released under the GNU General Public License v3.0 — see [LICENSE](LICENSE).

- Source code: <https://github.com/gorkovchukjulia-prog/shoreliser>
- Archived release (citable): <https://zenodo.org/records/21410974> — see the
  Zenodo page for the DOI and citation formats.

## Development

`_e2e_test.py` (repo root) runs the whole pipeline headlessly against
`test_data/`:

```
QT_QPA_PLATFORM=offscreen "C:\Program Files\QGIS 3.40.11\bin\python-qgis-ltr.bat" _e2e_test.py
```
