envship_v2_datasets / README.md
mark000071's picture
README: swap primary citation to Zenodo DOI 10.5281/zenodo.21224009
9ead60f verified
|
Raw
History Blame Contribute Delete
12.5 kB
---
license: cc-by-4.0
language: [en]
pretty_name: "MARIS-Forecast: a multi-region AIS trajectory dataset with temporally aligned maritime context for vessel trajectory forecasting"
size_categories: ["100K<n<1M"]
task_categories:
- time-series-forecasting
- other
tags:
- maritime
- trajectory-prediction
- AIS
- ship
- environmental-context
- social-interaction
- benchmark
- cross-domain
- multi-jurisdiction
- long-horizon
viewer: false
---
**Persistent identifier**: [10.5281/zenodo.21224009](https://doi.org/10.5281/zenodo.21224009) (Zenodo record, mirrors this HF release).
**Companion paper**: Ma, K. (in prep.). *MARIS-Forecast: a multi-region AIS trajectory dataset with temporally aligned maritime context for vessel trajectory forecasting.* Scientific Data.
# MARIS-Forecast — Multi-Region AIS Trajectory Dataset for Vessel Trajectory Forecasting
Four maritime jurisdictions and two prediction horizons, packaged in a
single shape. Each sample carries an OpenStreetMap raster, a
signed-distance field, a 3 km social-neighbour context, a unified
ship-class label, and an inline OSM-temporal-consistency flag.
| | Provider | AIS span | Track A (10/10) | Track B (30/60) |
|-------|-------------------|-------------|-----------------|-----------------|
| DMA | Danish Maritime Authority | 2025-09 | 150,000 | 58,158 |
| NOAA | U.S. MarineCadastre | 2025-03 | 60,000 | 44,766 |
| Piraeus | Tritsarolis et al. (Zenodo 6323416) | 2019 | 60,000 | 1,154 |
| Norway | Kystverket / Kystdatahuset | 2025-08–09 | 60,000 | 2,779 |
| **Combined** | | | **330,000** | **106,857** |
- **Track A** — 10-min observation, 10-min prediction (30 + 30 points at 20 s).
- **Track B** — 30-min observation, 60-min prediction (90 + 180 points at 20 s).
## Layout
```
README.md LICENSE NOTICE.md DATA_CARD.md CITATION.cff CHANGELOG.md SUMMARY_v2.md
checkpoints/ 9 DMA Track A baselines (unchanged from v1)
scripts/extras/ stage_17, PBF parser, taxonomy unifier, verifier
track_a_short-term_Cross-domain_Datasets/ # 10-min observation / 10-min prediction
├── dma_track_v1/
├── noaa_track_v1/
├── piraeus_track_v1/ # contains both context_v1/ (2026 OSM) and context_v1_2019osm/
└── norway_track_v1/
track_b_medium-term_Cross-domain_Datasets/ # 30-min observation / 60-min prediction
├── dma/standard_track_v1/
├── noaa/standard_track_v1/
├── piraeus/standard_track_v1/ # also has context_v1_2019osm/
└── norway/standard_track_v1/
```
Inside every leaf directory (e.g. `track_a_short-term_Cross-domain_Datasets/dma_track_v1/`
or `track_b_medium-term_Cross-domain_Datasets/dma/standard_track_v1/`):
```
train/ val/ test/ part-000.csv.gz — benchmark windows + 4 inline OSM-flag columns
context_v1/ env-SDF + social context
context_v1_2019osm/ Piraeus only — env-SDF built with 2020-01-01 OSM
osm_temporal_consistency/ per-sample flag CSV side-car (full numeric details)
osm_temporal_consistency_2019osm/ Piraeus only — same against 2020-01-01 OSM
reports/ per-split selection metadata
sample_ids/ deterministic sample-id catalogues
summary.json
```
Inside each `context_v1/`:
```
augmented/{train,val,test}/part-000.csv.gz benchmark + env + social merged
environment/
rasters/{split}/masks.npz per-sample 128×128×6 binary masks (uint8, compressed; key='masks')
rasters/{split}/{sample_ids,
signed_dist_shore,signed_dist_nav}.npy sample-id catalogue + 2-channel SDF (float16)
vectors/{split}/vectors.jsonl.gz OSM polylines, lossless
features/{split}/environment_descriptors.csv
anchors/{split}_anchors.csv all_anchors.csv
all_environment_descriptors.csv
osm_cache/tiles/*.json Overpass-format OSM tile cache (0.25°)
summary.json feature_stats.json failed_tiles.json
social/
features/{split}/social_descriptors.csv
snapshot_buckets/ compact AIS snapshots for neighbour lookup
```
## OSM-temporal-consistency flag (inline in main CSVs)
Each row of `train/val/test/part-000.csv.gz` carries 4 extra columns:
| column | meaning |
|------------------------------|--------------------------------------------------|
| `osm_temporal_consistent` | `true` / `false` / empty (paper-default filter: `true`)|
| `osm_max_inland_depth_m` | deepest signed-distance into land along trajectory|
| `osm_n_inland_points` | trajectory points where SDF < 0 |
| `osm_max_consec_inland_run` | longest run of consecutive inland points |
The default rule is `osm_temporal_consistent = true` iff
`max_inland_depth_m ≤ 30 m` AND `max_consec_inland_run < 3`
(positional jitter within one SDF cell is tolerated). Full per-sample
numerics (including `any_anchor_inland`, `anchor_inland_depth_m`,
`n_uncheckable_points`) live in the side-car
`osm_temporal_consistency/{split}_flags.csv`.
For **Piraeus**, the inline flag is computed against the 2020-01-01 OSM
snapshot (`greece-200101.osm.pbf`, Geofabrik) because the AIS year is
2019; this avoids false positives from port piers built between 2020
and 2026. The 2026-OSM flag for ablation is preserved in the side-car
`osm_temporal_consistency_2019osm/` (the directory keeps the
historical filename; the file inside holds the 2019-OSM flags that
the inline column already reflects).
Consistency rates per subset (Track A):
| Subset | Train consistent | Val consistent | Test consistent |
|---------|-----------------:|---------------:|----------------:|
| DMA | 99.26 % | 99.19 % | 99.25 % |
| NOAA | 99.38 % | 99.17 % | 98.77 % |
| Piraeus | 99.59 % (2019 OSM) | 99.80 % | 99.63 % |
| Norway | 96.63 % | 97.43 % | 97.55 % |
Track B rates are in `SUMMARY_v2.md`.
## Anchor-time weather / sea-state / port / TSS columns (Phase 1+2, 2026-06-19)
In addition to the OSM-temporal-consistency flag, every main CSV row
carries 15 anchor-time scalars merged inline:
| Group | Column | Unit | Source |
|---|---|---|---|
| Weather | `met_wind_speed_mps` | m s⁻¹ | Open-Meteo Archive (ERA5 reanalysis) |
| | `met_wind_dir_deg` | deg, met. (FROM) | same |
| | `met_wind_rel_heading_deg` | deg | derived (wind dir − vessel COG) |
| | `met_temperature_c` | °C | same |
| | `met_pressure_hpa` | hPa | same |
| | `met_cloud_cover_pct` | % | same |
| Sea state | `sea_wave_height_m` | m | Open-Meteo Marine (ECMWF WAM) |
| | `sea_wave_dir_deg` | deg, oceanographic (TO) | same |
| | `sea_wave_period_s` | s | same |
| | `sea_swell_wave_height_m` | m | same |
| Port | `port_nearest_dist_km` | km | OSM `harbour=*` / `seamark:type=harbour` |
| | `port_nearest_name` | str | OSM `name` tag |
| TSS / fairway | `in_fairway` | bool (≤100 m centreline) | OSM `seamark:type=fairway` |
| | `dist_to_fairway_m` | m | same |
| | `in_tss` | bool | OSM `seamark:type ∈ {separation_zone, separation_line, separation_boundary}` |
Coverage caveats (see `SUMMARY_v2.md`):
- **Piraeus wave columns are empty** because Open-Meteo Marine begins
on 2022-01-01 and Piraeus AIS is from 2019. The wind/temperature/pressure
columns (ERA5 reanalysis archive) are fully populated.
- NOAA open-Pacific samples can have null wave entries where the model
grid does not resolve a wave field (1.5°× 1.5° west of -150° E).
- Empty cell = no source data; absence is documented, not silent
imputation.
Loader recipe (paper default):
```python
df = pd.read_csv("…/dma_track_v1/train/part-000.csv.gz")
df["met_wind_speed_mps"] = df["met_wind_speed_mps"].astype(float)
# Filter for env-aware models: drop OSM-inconsistent + missing-wave rows
df_clean = df[(df["osm_temporal_consistent"] == "true") &
df["sea_wave_height_m"].notna()]
```
## Quickstart
```python
from huggingface_hub import snapshot_download
import pandas as pd
snapshot_download(
repo_id="mark000071/envship_v2_datasets",
repo_type="dataset",
local_dir="data/envship_v2",
allow_patterns=[
"track_a_short-term_Cross-domain_Datasets/*/train/**",
"track_a_short-term_Cross-domain_Datasets/*/val/**",
"track_a_short-term_Cross-domain_Datasets/*/test/**",
"*.md", "LICENSE", "CITATION.cff",
],
)
# Load DMA + Piraeus Track A (flags inline)
dma = pd.read_csv("data/envship_v2/track_a_short-term_Cross-domain_Datasets/dma_track_v1/train/part-000.csv.gz")
pir = pd.read_csv("data/envship_v2/track_a_short-term_Cross-domain_Datasets/piraeus_track_v1/train/part-000.csv.gz")
print(dma.shape, pir.shape) # ~120k and ~48k rows respectively
# Paper-default filter: drop OSM-temporal-inconsistent windows
dma_clean = dma[dma["osm_temporal_consistent"] == "true"].reset_index(drop=True)
pir_clean = pir[pir["osm_temporal_consistent"] == "true"].reset_index(drop=True)
print(dma_clean.shape, pir_clean.shape) # ~119k and ~47.8k rows
# Decode a Track A trajectory (30 history + 30 future, 20-s step)
import json, numpy as np
row = dma_clean.iloc[0]
hist_xy = np.column_stack([json.loads(row["hist_x_json"]), json.loads(row["hist_y_json"])])
fut_xy = np.column_stack([json.loads(row["fut_x_json"]), json.loads(row["fut_y_json"])])
print(hist_xy.shape, fut_xy.shape) # (30, 2) (30, 2)
```
For **Track B** load from
`track_b_medium-term_Cross-domain_Datasets/<jurisdiction>/standard_track_v1/`.
For **env-aware models**, also download the rasters under
`<subset>/context_v1/environment/rasters/{split}/`. They are NumPy
arrays aligned with the CSV rows via `sample_ids.npy`:
```python
masks = np.load("rasters/train/masks.npz")["masks"] # (N, 6, 128, 128) uint8
sd_shore = np.load("rasters/train/signed_dist_shore.npy") # (N, 128, 128) float16, metres
sd_nav = np.load("rasters/train/signed_dist_nav.npy") # (N, 128, 128) float16, metres
sample_ids = np.load("rasters/train/sample_ids.npy", allow_pickle=True) # (N,) object
```
## Licence
Composite — see `LICENSE` and `NOTICE.md`. Sub-licences:
| Subset | Upstream licence |
|---------|-----------------------------|
| DMA | CC BY 4.0 |
| NOAA | U.S. public domain |
| Piraeus | CC BY 4.0 (Zenodo 6323416) |
| Norway | NLOD 2.0 (Kystverket) |
| OSM rasters / SDFs | ODbL |
The processed benchmark and the pipeline code are released under
CC BY 4.0. Attribution is required for every upstream subset used.
## Citing
```bibtex
@dataset{ma_maris_forecast_2026,
author = {Ma, Kun},
title = {MARIS-Forecast: a multi-region AIS trajectory dataset with temporally aligned maritime context for vessel trajectory forecasting},
year = 2026,
publisher = {Zenodo},
version = {v1.0.0},
doi = {10.5281/zenodo.21224009},
url = {https://doi.org/10.5281/zenodo.21224009}
}
```
Mirror on Hugging Face (bit-for-bit identical files):
https://huggingface.co/datasets/mark000071/envship_v2_datasets
When publishing results, cite the upstream AIS provider for every
subset used. See `CITATION.cff` and `NOTICE.md` for the recommended
attribution lines.
## What's new in v2 (high level)
- **Three new jurisdictions** — NOAA (cross-domain transfer),
Piraeus (port + ferry), Norway (fjord + coast).
- **Track B** added for all four jurisdictions.
- **Stage 17 OSM-temporal-consistency** — every sample carries an
inline flag indicating whether its trajectory stays in water on the
OSM snapshot used to build the env context.
- **Historical OSM for Piraeus** — Piraeus AIS is from 2019; the
inline flag uses the 2020-01-01 Geofabrik snapshot
(`context_v1_2019osm/`) so port construction after 2020 does not
produce false positives.
- **DMA + Norway env rebuilt** after refilling 188 + 184 originally
failed OSM tiles from Geofabrik archives.
`CHANGELOG.md` has the full version history; `SUMMARY_v2.md` walks
through the v2 methodology in narrative form.