This QGIS plugin implements a comprehensive toolset for detecting, forecasting, and predicting Urban Heat Islands (UHI) using Landsat 8 satellite imagery. It features direct integration with the USGS Earth Explorer M2M API for seamless data acquisition.
- Direct Search: Search for Landsat scenes directly within QGIS using your M2M API credentials.
- Criteria: Filter by Map Canvas Extent, Date Range, and Cloud Cover.
- Auto-Download: Automatically downloads and organizes the required bands (B4, B5, B6, B10) for analysis.
- Detection (Spectral Indices):
- Uses Red, NIR, SWIR, and Thermal bands.
- Calculates NDVI, NDBI, and UI to compute a weighted UHI Index.
- Forecast (Scenario-Based):
- Simulates urban growth scenarios (e.g., +10% urbanization).
- Adjusts NDBI values to model future heat distribution.
- Prediction (Machine Learning):
- Random Forest: Runs a lightweight regression model to predict thermal anomalies.
- Deep Learning (U-Net): (Requires TensorFlow) Uses a trained U-Net model for advanced spatial pattern recognition.
- Automatically loads results as new raster layers in QGIS.
- Exports results to GeoTIFF for further processing.
- QGIS 3.x
- Python 3.8+ (bundled with QGIS or external)
- USGS Earth Explorer Account (for data download)
The plugin requires specific Python packages. Open the OSGeo4W Shell (Windows) or your terminal and run:
pip install requests scikit-image scikit-learn numpy
# Optional: For Deep Learning mode
pip install tensorflow- Navigate to your QGIS plugins folder:
- Windows:
C:\Users\<YourUser>\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins - Mac/Linux:
~/.local/share/QGIS/QGIS3/profiles/default/python/plugins
- Windows:
- Clone this repository into the
pluginsfolder:(Note: Ensure the folder is namedgit clone https://github.com/Mercy14846/Urban-Heat-Island-Model.git uhi_qgis_plugin
uhi_qgis_pluginso QGIS recognizes it.) - Restart QGIS.
- Go to Plugins > Manage and Install Plugins > Installed and check "Urban Heat Island Model".
To use the search and download features, you need a USGS account with M2M API access requested.
- In Plugin: Enter your Username and Password directly in the "Data Acquisition" tab.
- Config File: Alternatively, edit
config.pyin the plugin directory to set default credentials:EARTHEXPLORER_USERNAME = "YourUsername" M2M_API_TOKEN = "YourToken" # Optional: Use Token directly
- Open Plugin: Click the UHI icon in the QGIS toolbar.
- Search Data:
- Go to Data Acquisition tab.
- Zoom to your area of interest on the map.
- Click Use Map Canvas Extent.
- Set Date Range and Cloud Cover.
- Click Search Scenes.
- Download:
- Select a scene from the results table.
- Click Download Data.
- Run Analysis:
- Go to Analysis tab.
- Select Mode: Detection, Forecast, or Prediction.
- Select Bands: Map the downloaded files (Red, NIR, SWIR, Thermal).
- Output: Choose a save location.
- Click Run Analysis.
- "Python not found": Ensure your environment variables point to the QGIS Python interpreter.
- "Missing Dependencies": If
tensorflowis missing, the Deep Learning mode will be disabled. Install it via OSGeo4W Shell. - Auth Errors: Verify your USGS password or M2M Token. Tokens expire periodically.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
