Back to Python & Geospatial Scripting
Raster-Based Suitability Analysis for Maple Tree Farming in BC

Overview

This project uses Python to perform a raster-based suitability analysis to identify optimal locations for a maple tree farm in British Columbia. Environmental criteria including elevation, road proximity, canopy height, area quality, hydrolines, cutblocks, MKRF bounds, and MGVI were applied as binary masks to input rasters and combined into a final suitability layer. Results were visualized as a multi-panel plot and overlaid transparently on a true-colour SPOT satellite image.

Objectives

Data Sources & Tools

FileDescription
dem.tifDigital Elevation Model of the study area
RoadsBuff.tifRaster buffer layer around road network
Spot_data.tifTrue-colour SPOT satellite imagery
LibraryPurpose
rasterioReading, writing, and displaying raster data
numpyArray operations and binary mask creation
matplotlibMulti-panel plotting and visualization

Methods

Each input raster was read using rasterio and evaluated against suitability thresholds to produce a binary mask (1 = suitable, 0 = not suitable). Criteria included elevation between 300–700 m, proximity to roads, canopy height, area quality, hydrolines, cutblocks, MKRF bounds, and MGVI. Binary masks were combined using logical AND operations to produce a final suitability raster. The output was cast to uint8, saved as a GeoTiff, and visualized in three ways: a multi-panel plot of all input masks, a standalone binary suitability map, and a transparent overlay on the SPOT true-colour image.

For the code used in this analysis, click here

Outputs

Constraints for Maple Location

Multi-panel plot showing each input raster after applying suitability criteria — yellow = suitable, purple = not suitable

Suitable Maple Plantation Locations

Final binary suitability map showing locations meeting all combined criteria

Suitable Maple Plantation Locations overlaid on SPOT imagery

Suitable maple plantation locations (yellow) overlaid transparently on SPOT true-colour satellite imagery

Key Findings

Skills Learned