File size: 4,505 Bytes
80e070e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# TASK_02_Feature_Extraction

**Assignee:** Google Earth Engine Specialist  
**Role:** Feature Extraction & Stack Generation  

---

## 1. Project Overview

We are building a Rock Glacier Segmentation Dataset for Himalayan rock glacier mapping. The segmentation labels have already been generated from manually delineated rock glacier polygons.

**Current Project Structure:**
```text
RockGlacier_Project/
β”‚
β”œβ”€β”€ EDA/
β”‚   β”œβ”€β”€ individual_polygons/
β”‚   β”‚   β”œβ”€β”€ polygon_0.geojson
β”‚   β”‚   β”œβ”€β”€ polygon_1.geojson
β”‚   β”‚   └── ...
β”‚   └── individual_plots/
β”‚
β”œβ”€β”€ masks/
β”‚   β”œβ”€β”€ mask_0000.tif
β”‚   β”œβ”€β”€ mask_0001.tif
β”‚   └── ...
β”‚
β”œβ”€β”€ features/
└── dataset/
```

- **Polygons:** Located at `EDA/individual_polygons/` (e.g., `polygon_0.geojson`)
- **Masks:** Already generated and located at `masks/` (e.g., `mask_0000.tif`)
- **Mask Values:** `0` = Background, `1` = Rock Glacier

---

## 2. Objective

Generate georeferenced multi-band feature stacks from Google Earth Engine for every rock glacier polygon. The generated features **must align perfectly** with their corresponding masks.

> [!WARNING]
> **Important Notes**
> This is a semantic segmentation project.
> - **Do NOT** create polygon-level statistics.
> - **Do NOT** calculate mean NDVI, mean slope, mean elevation, etc.
> - **Do NOT** generate CSV tables.
> 
> We explicitly need pixel-level feature images (rasters).

---

## 3. Data Sources & Required Features

Use **Google Earth Engine** to extract the following:

**Primary Imagery:** Sentinel-2 Surface Reflectance  
**Terrain:** Copernicus DEM (preferred)

### Required Bands/Features:
**Sentinel-2 Bands:**
- Blue (B2)
- Green (B3)
- Red (B4)
- NIR (B8)
- SWIR1 (B11)
- SWIR2 (B12)

**Spectral Indices:**
- NDVI
- NDWI
- NDSI

**Terrain Features:**
- Elevation
- Slope
- Aspect

*If feasible, also include:*
- Land Surface Temperature (LST)
- Surface Velocity

---

## 4. Technical Specifications

### Spatial Resolution
All outputs must use exactly **10 meter spatial resolution**.
- **Reason:** Sentinel-2 native resolution is 10m. The masks and features must have absolutely identical spatial resolutions to prevent dimension mismatch during U-Net training.

### Extraction Strategy
For each polygon, perform the following sequence:
1. Load `polygon_i.geojson`
2. Compute bounding box
3. Add **200 meter padding** around the bounding box. *(Note: This padding allows future segmentation models to see surrounding terrain context, not just the glacier).*
4. Download all required features for this bounds area.
5. Clip features to the padded region.
6. Resample all layers to exactly 10m resolution.
7. Stack all features into a single multi-band GeoTIFF.

### Output Location
Save all generated feature stacks inside the `features/` directory:
```text
features/
β”œβ”€β”€ feature_0000.tif
β”œβ”€β”€ feature_0001.tif
β”œβ”€β”€ feature_0002.tif
└── ...
```

---

## 5. Band Order Specification

Your final GeoTIFF stacks must strictly follow this band ordering:
- **Band 1** = Blue
- **Band 2** = Green
- **Band 3** = Red
- **Band 4** = NIR
- **Band 5** = SWIR1
- **Band 6** = SWIR2
- **Band 7** = NDVI
- **Band 8** = NDWI
- **Band 9** = NDSI
- **Band 10** = Elevation
- **Band 11** = Slope
- **Band 12** = Aspect

*Optional (if acquired):*
- **Band 13** = LST
- **Band 14** = Velocity

---

## 6. Alignment Validation

You must physically verify that the features perfectly overlap the masks:
- `feature_0000.tif` aligns perfectly with `mask_0000.tif`
- `feature_0001.tif` aligns perfectly with `mask_0001.tif`

**Checklist for alignment:**
- [ ] Matching CRS (Coordinate Reference System)
- [ ] Matching Resolution (10m)
- [ ] Matching Bounding Box Coordinates
- [ ] Exact Pixel-to-Pixel alignment (dimensions must be identical)

---

## 7. Deliverables & Current Scope

**What you must deliver:**
1. Google Earth Engine extraction script.
2. Feature stack generation pipeline.
3. Validation script (to verify alignment checklist above).
4. Documentation explaining each generated feature.
5. Feature extraction report.

> [!IMPORTANT]
> **Strict Scope Limitations**
> - Only perform feature extraction and feature stack generation.
> - **Do NOT** create train/validation/test splits.
> - **Do NOT** generate patches.
> - **Do NOT** train any machine learning model.
> 
> The sole goal of this task is to produce correctly aligned multi-band feature stacks for all rock glacier masks.