File Name: Image processing.py Resampling This Python script utilizes the ArcPy library to perform image resampling using the ArcGIS toolset. The purpose of this script is to process and resample specific satellite image files within designated folders. Overview The script performs the following steps: 1. Iterate through folders: Loop through the specified folders containing satellite images. 2. Iterate through image files: For each folder, iterate through all image files within the specified base path. 3. Resample condition: Check if the image file ends with "B01_R.jp2", "B05_R.jp2", "B06_R.jp2", "B07_R.jp2","B8A_R.jp2", "B09_R.jp2", "B10_R.jp2", "B11_R.jp2", or "B12_R.jp2". 4. Resampling: If the condition is met, the script resamples the image using the ArcPy Resampling management tool with a specified cell size (10m) and resampling type. 5. Output: The resampled images are saved with a new filename appended with "_R.jp2" in the same directory. Setup * Open the script in a Python environment or script editor that supports ArcPy. * Set workspace: Set the ArcPy workspace to the current folder being processed. --------------------------------------------------------------------------------------------------------------------- Index Calculation This Python script utilizes the ArcPy library to calculate various vegetation indices from satellite image bands. The script focuses on specific folders, processing individual bands, and generating indices such as NDSI (Normalized Difference Snow Index), NDVI (Normalized Difference Vegetation Index), NDGI (Normalized Difference Greenness Index), and NDSII (Normalized Difference Soil Index). Setup * Open the script in a Python environment or script editor that supports ArcPy. Script Logic 1. Raster Initialization: Load the individual bands (necessary for the index calculation) as Raster objects. 2. Index Calculation: Use mathematical formulas to calculate the specified vegetation indices. 3. Save Indices: Save the calculated indices as separate raster files. 4. Repeat for other folders: The script repeats the process for each specified folder and set of bands. ------------------------------------------------------------------------------------------------------------------------------------ Composite Bands File Name: Composite_Bands Script.ipynb Additionally, the script includes a step to create composite bands from individual bands of the satellite images. * Composite bands: Use the ArcPy CompositeBands_management tool to create composite bands. * Output: The composite band images are saved with a filename based on the input folder, appended with "_CompositeBand.tif" in the same directory. ----------------------------------------------------------------------------------------- Random Forest Classification Script in R File Name: RF Classification Script.R This R script leverages the 'randomForest' library to perform land cover classification on satellite imagery using the Random Forest algorithm. The script is tailored for specific training samples and composite band images. Prerequisites * R environment with the required libraries installed ('randomForest', 'raster', 'rgdal', 'caret'). * Shapefiles for training samples for each image. * Composite band images for each image. Script Usage 1. Set working directory: Set the working directory to the folder containing the shapefiles and composite band images for each area. 2. Load libraries and read training samples: Read the training samples shapefile. 3. Read and visualize composite band image: Read the composite band image for the area and visualize it. 4. Extract training sample data: Extract training sample data from the composite bands and set the seed for reproducibility. 5. Prepare data for training and testing: Prepare the data for training and testing, create a Random Forest model, and evaluate its performance. 6. Make predictions and evaluate accuracy: Make predictions on the test data and evaluate the classification accuracy using a confusion matrix. 7. Visualize and save results: Visualize the Random Forest model, create a classified image, plot the classified image, and save it as a GeoTIFF file. 8. Repeat the process: Repeat the process for other images (e.g., 10TER, 10TES, 10TET) by changing the working directory and filenames accordingly. --------------------------------------------------------------------------------------------------------------------- Inventory File - Glacier Boundary Data Overview The Inventory.shp file is an ESRI shapefile that contains boundary information of glaciers, extracted from the 2020 Sentinel satellite images. This data is valuable for understanding the geographical characteristics of glaciers, including their shape, size, elevation, slope, and aspect. File Details * File Name: Inventory.shp * Format: ESRI Shapefile Data Fields The shapefile contains the following fields, each providing specific information about the glaciers: 1. GLIMS_ID: ID assigned to glaciers by the Global Land Ice Measurements from Space. 2. RGI_ID: ID assigned to glaciers by the Randolph Glacier Inventory. 3. Glacier Name: Name of the glacier provided in the RGI inventory. Glaciers with no names are given just the State abbreviations. 4. Area_Sqkm: Area of the glacier in square kilometers. 5. Zmed: Median Elevation of the glacier. 6. Slope: Slope of the glacier. 7. Aspect: Aspect of the glacier. Data Sources The glacier boundary data is derived from the 2020 Sentinel satellite images (a list of sentinel-2 images used in the study is provided in Sentinel images.csv), ensuring up-to-date and accurate representations of glacier boundaries. These data are currently available at https://dataspace.copernicus.eu/ RGI inventory was used as the reference glacier inventory in this study: RGI Consortium, . (2017). Randolph Glacier Inventory - A Dataset of Global Glacier Outlines, Version 6. Boulder, Colorado USA. National Snow and Ice Data Center. https://doi.org/10.7265/4m1f-gd79. Notes * Please refer to the respective data sources (GLIMS, RGI) for additional information on the glacier identification codes and nomenclature. * Glaciers without specific names are identified by state abbreviations.