Skip to content

Commit

Permalink
add mermaid to steps
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricebrito committed Oct 31, 2023
1 parent 9b47115 commit 3be2257
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 1 deletion.
22 changes: 22 additions & 0 deletions docs/app/crop/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

Purpose: to crop a particular band defined as a common band name (such as the "green" or "nir" band) from a satellite image acquired by either Sentinel-2 or Landsat-9.

This step is highlighted below:

``` mermaid
graph TB
style B stroke:#f66,stroke-width:2px,stroke-dasharray: 5 5
style C stroke:#f66,stroke-width:2px,stroke-dasharray: 5 5
subgraph Process STAC item
A[STAC Item] -- STAC Item URL --> B
A[STAC Item] -- STAC Item URL --> C
A[STAC Item] -- STAC Item URL --> F
subgraph scatter on bands
B["crop(green)"];
C["crop(nir)"];
end
B["crop(green)"] -- crop_green.tif --> D[Normalized difference];
C["crop(nir)"] -- crop_green.tif --> D[Normalized difference];
D -- norm_diff.tif --> E[Otsu threshold]
end
E -- otsu.tif --> F[Create STAC Catalog]
F -- "catalog.json/item.json/asset otsu.tif" --> G[(storage)]
```

### Code

The `crop.py` script is a command-line tool that takes as input
Expand Down
21 changes: 21 additions & 0 deletions docs/app/normalized-difference/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

Purpose: to calculate the normalized difference of the "green" or "nir" bands.

This step is highlighted below:

``` mermaid
graph TB
style D stroke:#f66,stroke-width:2px,stroke-dasharray: 5 5
subgraph Process STAC item
A[STAC Item] -- STAC Item URL --> B
A[STAC Item] -- STAC Item URL --> C
A[STAC Item] -- STAC Item URL --> F
subgraph scatter on bands
B["crop(green)"];
C["crop(nir)"];
end
B["crop(green)"] -- crop_green.tif --> D[Normalized difference];
C["crop(nir)"] -- crop_green.tif --> D[Normalized difference];
D -- norm_diff.tif --> E[Otsu threshold]
end
E -- otsu.tif --> F[Create STAC Catalog]
F -- "catalog.json/item.json/asset otsu.tif" --> G[(storage)]
```

### Code

The `norm_diff` script is a command-line tool for performing a normalized difference between two raster images.
Expand Down
21 changes: 21 additions & 0 deletions docs/app/otsu/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

Purpose: to apply the Otsu threshold to the normalized difference.

This step is highlighted below:

``` mermaid
graph TB
style E stroke:#f66,stroke-width:2px,stroke-dasharray: 5 5
subgraph Process STAC item
A[STAC Item] -- STAC Item URL --> B
A[STAC Item] -- STAC Item URL --> C
A[STAC Item] -- STAC Item URL --> F
subgraph scatter on bands
B["crop(green)"];
C["crop(nir)"];
end
B["crop(green)"] -- crop_green.tif --> D[Normalized difference];
C["crop(nir)"] -- crop_green.tif --> D[Normalized difference];
D -- norm_diff.tif --> E[Otsu threshold]
end
E -- otsu.tif --> F[Create STAC Catalog]
F -- "catalog.json/item.json/asset otsu.tif" --> G[(storage)]
```

### Code

The `otsu` Python script is a command-line tool for applying the Otsu threshold to a single input raster image.
Expand Down
22 changes: 21 additions & 1 deletion docs/app/stac/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,28 @@

Purpose: produce a STAC Catalog with a STAC Item describing the detected water body result.

### Code
This step is highlighted below:

``` mermaid
graph TB
style F stroke:#f66,stroke-width:2px,stroke-dasharray: 5 5
subgraph Process STAC item
A[STAC Item] -- STAC Item URL --> B
A[STAC Item] -- STAC Item URL --> C
A[STAC Item] -- STAC Item URL --> F
subgraph scatter on bands
B["crop(green)"];
C["crop(nir)"];
end
B["crop(green)"] -- crop_green.tif --> D[Normalized difference];
C["crop(nir)"] -- crop_green.tif --> D[Normalized difference];
D -- norm_diff.tif --> E[Otsu threshold]
end
E -- otsu.tif --> F[Create STAC Catalog]
F -- "catalog.json/item.json/asset otsu.tif" --> G[(storage)]
```

### Code

The `stac` script is a command-line tool for creating a SpatioTemporal Asset Catalog (STAC) catalog containing detected water bodies.

Expand Down

0 comments on commit 3be2257

Please sign in to comment.