|
10 | 10 | "\n", |
11 | 11 | "## Introduction\n", |
12 | 12 | "\n", |
13 | | - "This Colab notebook is designed to process and analyze geospatial data using Google Earth Engine (GEE). It focuses on deriving topographic, climatic, and spectral information for a specified region of interest (ROI). By leveraging GEE's powerful cloud computing capabilities, this workflow enables efficient data handling and export of key environmental variables for further analysis.\n", |
| 13 | + "This Colab notebook is designed to process and analyze geospatial data using Google Earth Engine (GEE). It focuses on deriving topographic, climatic, vegetation structure and spectral information for a specified region of interest (ROI). By leveraging GEE's powerful cloud computing capabilities, this workflow enables efficient data handling and export of key environmental variables for further analysis.\n", |
14 | 14 | "\n", |
15 | 15 | "\n", |
16 | 16 | "### What Does This Notebook Do?:\n", |
|
24 | 24 | "\n", |
25 | 25 | "- Topographic Variables: Elevation, slope, aspect, landforms, and topographic position index (TPI).\n", |
26 | 26 | "- Climate Variables: Total precipitation and average temperature over a defined period.\n", |
| 27 | + "- Structural Variables: Vegetation Height derived from the GPW dataset (30 m resolution). This dataset provides wall-to-wall coverage of all terrestrial ecosystems, used here to represent pre-fire standing fuel from the prior calendar year.\n", |
27 | 28 | "- Spectral Indices: NDVI, NDBI, NDWI, and EVI derived from Sentinel-2 imagery.\n", |
28 | 29 | "- Sentinel-2 Variables: Red, Green, Blue, R1, R2, R3, NIR, R4, SWIR1, and SWIR2 bands with cloud correction included.\n", |
29 | 30 | "- Radar Data: VV and VH polarizations from Sentinel-1 with slope correction applied.\n", |
|
633 | 634 | "climate_variables = apply_region_mask(ee.Image([precipitation, temperature]), region)" |
634 | 635 | ] |
635 | 636 | }, |
| 637 | + { |
| 638 | + "cell_type": "markdown", |
| 639 | + "metadata": {}, |
| 640 | + "source": [ |
| 641 | + "# Vegetation Height\n" |
| 642 | + ] |
| 643 | + }, |
| 644 | + { |
| 645 | + "cell_type": "code", |
| 646 | + "execution_count": null, |
| 647 | + "metadata": {}, |
| 648 | + "outputs": [], |
| 649 | + "source": [ |
| 650 | + "# GPW provides median vegetation height for all terrestrial ecosystems (not limited to short veg)\n", |
| 651 | + "veg_height_collection = ee.ImageCollection(\"projects/global-pasture-watch/assets/gsvh-30m/v1/short-veg-height_m\")\n", |
| 652 | + "veg_height = apply_region_mask(\n", |
| 653 | + " veg_height_collection.filterDate(f'{season_year-1}-01-01', f'{season_year}-01-01') \\\n", |
| 654 | + " .median() \\\n", |
| 655 | + " # The dataset stores values as scaled integers; multiply by 0.1 to convert to meters\n", |
| 656 | + " .multiply(0.1) \\\n", |
| 657 | + " .rename('veg_height') \\\n", |
| 658 | + " .toFloat(),\n", |
| 659 | + " region\n", |
| 660 | + ")" |
| 661 | + ] |
| 662 | + }, |
636 | 663 | { |
637 | 664 | "cell_type": "markdown", |
638 | 665 | "metadata": { |
|
1055 | 1082 | " 'tpi': tpi,\n", |
1056 | 1083 | " 'nasadem_variables': nasadem_variables,\n", |
1057 | 1084 | " 'climate_variables': climate_variables,\n", |
| 1085 | + " 'veg_height': veg_height,\n", |
1058 | 1086 | " 'sentinel2_collections': sentinel2_collections,\n", |
1059 | 1087 | " 'sentinel2_index_variables_collections': sentinel2_index_variables_collections,\n", |
1060 | 1088 | " 'sentinel1_collections': sentinel1_collections,\n", |
|
1065 | 1093 | "with open('/content/processed_data.pkl', 'wb') as f:\n", |
1066 | 1094 | " pickle.dump(data, f)\n", |
1067 | 1095 | "\n", |
1068 | | - "print(\"Data Serilized and saved as processed_data.pkl\")" |
| 1096 | + "print(\"Data Serialized and saved as processed_data.pkl\")" |
1069 | 1097 | ] |
1070 | 1098 | }, |
1071 | 1099 | { |
|
1141 | 1169 | "# Access the variables\n", |
1142 | 1170 | "landform = data['landform']\n", |
1143 | 1171 | "tpi = data['tpi']\n", |
1144 | | - "nasadem_variables = data['elevation_variables']\n", |
| 1172 | + "nasadem_variables = data['nasadem_variables']\n", |
1145 | 1173 | "climate_variables = data['climate_variables']\n", |
| 1174 | + "veg_height = data['veg_height'] \n", |
1146 | 1175 | "sentinel2_collections = data['sentinel2_collections']\n", |
1147 | 1176 | "sentinel2_index_variables_collections = data['sentinel2_index_variables_collections']\n", |
1148 | 1177 | "sentinel1_collections = data['sentinel1_collections']\n", |
|
1233 | 1262 | " (tpi, 'TPI', 'tpi', region), # 05 minutes aprox\n", |
1234 | 1263 | " (landform, 'Landform', 'landform', region), # 03 minutes aprox\n", |
1235 | 1264 | " (climate_variables, 'Climate Variables', 'climate_variables', region), # 06 minutes aprox\n", |
| 1265 | + " (veg_height, 'Vegetation Height', 'veg_height', region), # 06 minutes aprox\n", |
1236 | 1266 | "]\n", |
1237 | 1267 | "\n", |
1238 | 1268 | "batch_3 = [\n", |
|
0 commit comments