This project provides a semi-automated method to detect the landfast ice edge and track polynya evolution using Sentinel-2 imagery, training labels, and a coastline shapefile. The framework combines spectral, texture, and spatial features to classify ice vs. open water and extract meaningful ice-edge boundaries β applicable to any coastal Arctic scene.
This workflow takes a single Sentinel-2 image and:
-
Generates a Feature Stack:
- Normalized reflectance from Blue, Green, Red bands.
- Spectral indices (Blue/Green, Green/Red, Blue/Red).
- Texture features (brightness, edge intensity, local standard deviation).
- Euclidean distance to the coastline (as a proxy for spatial context).
-
Loads Vector Training Labels:
- A GeoJSON of manually labeled training polygons representing water and ice classes.
-
Trains a Binary Random Forest Classifier:
- Labels are collapsed into two classes: open water (
0
) and ice (1
). - Trained on extracted pixels from training regions.
- Labels are collapsed into two classes: open water (
-
Performs Image-wide Prediction:
- Predicts water vs. ice across the entire scene.
- Land areas are masked out using a vector coastline shapefile.
-
Saves and Visualizes Results:
- Outputs a GeoTIFF of the binary classification.
- Displays a classified map of open water vs. landfast ice.
-
A land-masked binary classification raster from Sentinel-2 imagery:
0 = Open Water
(typically polynyas)1 = Landfast Ice
NaN = Land
-
A detected landfast ice edge, derived from a user-supplied transect file:
- Transects are drawn manually every 250 meters in QGIS or another GIS tool.
- The script identifies the first water pixel along each transect (moving seaward from land).
- A pixel is only considered part of the ice edge if it is located at least 250 meters from the coastline, ensuring more robust detection and avoiding nearshore misclassifications.
-
These ice edge points can be exported or tracked across time-series imagery for change detection and polynya movement analysis.
Below is an example of what this method produces using Sentinel-2 imagery:
Shows the visual appearance of the ice, water, and land in natural color.
The red line indicates the landfast ice edge automatically detected using the transect-based approach.
-
Sentinel-2 Image (3-band RGB)
GeoTIFF containing at least Blue (B2), Green (B3), and Red (B4) bands. -
Training Polygons
GeoJSON file with labeled polygon geometries and anid
field for class. -
Coastline Shapefile
Vector line shapefile representing the coastal boundary. Used for land masking and generating distance-to-coast features. -
Transect Shapefile (Manual Input)
Manually created line features spaced every 250 meters. These should intersect the ice edge and originate from the coastline. Required for extracting the landfast ice edge.
Install required libraries via pip
:
pip install rasterio numpy matplotlib geopandas shapely scikit-learn scipy scikit-image