# Digital Earth Pacific Seagrass Extent, Machine Learning (Sentinel-2, 10 m)

## Facts

- Provider: Pacific Community (SPC) / Digital Earth Pacific
- License: CC-BY-4.0
- Size: 17,149 objects, 12.06 GB
- Records: 3,430 tile-year items x 4 layers; each layer 9600 x 9600 px at 10 m. 13,720 GeoTIFFs and 3,429 STAC items (full listing, exact)
- Format: JSON, TIFF (in sampled files)
- Stored at: Amazon S3, s3://dep-public-data/dep_s2_seagrass (us-west-2)
- Access: public, readable without an account
- Category: Earth Observation & Geospatial
- Source: https://registry.opendata.aws/dep-seagrass/
- Page: https://scigantic.com/archive/3f69cfcd-61a5-5e3a-acee-d3ada3b40521
- Keywords: Earth Observation & Geospatial, satellite imagery, AWS Open Data

## About

Seagrass ecosystem distribution across the Pacific from Sentinel-2 imagery at 10 m, classified with machine learning; includes seagrass probability, classification and thresholded extent layers from 2017 onward. Measured: the prefix holds 17,149 objects and about 12 GB. Part of the Digital Earth Pacific public bucket dep-public-data (us-west-2), published by the Pacific Community (SPC) under CC BY 4.0.

## Load the data

```python
# Task: seagrass area on one 96 km tile for 2017 vs 2024 from the classification layer (class 4 = seagrass).
import os, numpy as np, rasterio
root = os.path.expanduser("~/archive")
def read(year, layer):
    p = f"{root}/0-2-0/024/032/{year}/dep_s2_seagrass_024_032_{year}_{layer}.tif"
    with rasterio.open(p) as s:
        return s.read(1)           # uint8, 255 = nodata
for year in (2017, 2024):
    cl = read(year, "classification")
    valid = cl != 255
    sea = cl == 4
    print(year, "valid km2 %.0f" % (valid.sum() * 1e-4), "| class 4 km2 %.1f" % (sea.sum() * 1e-4),
          "| %.1f%% of valid" % (100 * sea.sum() / valid.sum()))
    th = read(year, "seagrass_threshold_60")
    print("   prob>=60 km2 %.1f" % ((th == 1).sum() * 1e-4), "| classes:", dict(zip(*[x.tolist() for x in np.unique(cl[valid], return_counts=True)])))
```

Written for a Scigantic notebook, where /mnt/archive (SCIGANTIC_MOUNT_PATH) is the mounted dataset.

## Data structure

File types in sampled files: JSON, TIFF

| Field | Type |
| --- | --- |
| `classification` | uint8, nodata 255, no scale/offset. Values 1 to 10 observed on four tiles (0 and 11-16 never seen). 4 = seagrass (the… |
| `seagrass` | uint8, 0/1, nodata 255. Identical to (classification == 4) on all four tiles checked (zero mismatches). |
| `seagrass_probability` | uint8, 0 to 100, nodata 255. Observed max 96. Pixels with class 4 span probability 15 to 96 (median 43 in tile 024/032… |
| `seagrass_threshold_60` | uint8, 0/1, nodata 255. Exactly (probability >= 60); a strict subset of seagrass.tif. |
| `grid` | All layers: 9600 x 9600 px, 10 m, EPSG:3832, 512 x 512 tiled deflate COG with overviews 2,4,8,16,32. The four layers of… |
| `year` | Folder name YYYY (2017 to 2024). STAC datetime YYYY-01-01 with end_datetime YYYY-12-31. |

Files:

```text
Version folder 0-2-0, then COL/ROW tile, then year, then four COGs and a STAC item per tile-year.
0-2-0/{COL}/{ROW}/{YEAR}/dep_s2_seagrass_{COL}_{ROW}_{YEAR}_{layer}.tif   layer = classification | seagrass | seagrass_probability | seagrass_threshold_60
0-2-0/{COL}/{ROW}/{YEAR}/dep_s2_seagrass_{COL}_{ROW}_{YEAR}.stac-item.json
Tile id is COL/ROW, three digits each. Tiles are 96 km squares (9600 x 9600 px at 10 m) in EPSG:3832: xmin = COL*96000 - 3,000,000 and ymin = ROW*96000 - 4,000,000 (checked against proj:bbox of items in all three archives). EPSG:3832 is a Pacific-centred Mercator, so tiles east of the antimeridian have large positive x and negative longitude in STAC bbox. 488 tiles (columns 009 to 130, rows 008 to 065), years 2017 to 2024, annual. Tiles per year: 2017 337, 2018 343, 2019 431, 2020 428, 2021 427, 2022 488, 2023 488, 2024 488.
```

Example file: `0-2-0/024/032/2024/dep_s2_seagrass_024_032_2024_classification.tif  (4,525,392 bytes): uint8 land-cover class map for tile 024/032, year 2024; value 4 is seagrass, 255 is nodata.`

## Open it

- In a hosted notebook with the data mounted: https://scigantic.com/archive/3f69cfcd-61a5-5e3a-acee-d3ada3b40521
- Full record as JSON (schema card included): https://api.scigantic.com/api/archives/3f69cfcd-61a5-5e3a-acee-d3ada3b40521
- Over MCP: `get_schema_card` with id `3f69cfcd-61a5-5e3a-acee-d3ada3b40521` at https://api.scigantic.com/mcp

## Related topics

- [Earth Observation & Geospatial datasets](https://scigantic.com/topics/earth-observation-and-geospatial)
- [Satellite imagery datasets](https://scigantic.com/topics/satellite-imagery)
