Shelterbelts

https://badge.fury.io/py/shelterbelts.svg https://img.shields.io/badge/license-MIT-blue.svg

This is an open-source Python package for mapping and categorising shelterbelts (windbreaks) across Australia using satellite imagery, in preparation for measuring their impacts on agricultural productivity at scale.

Key Features

  1. Tree categorisation: classifies pixels as scattered trees, patch core, patch edge, or corridors based on nearby connectivity.

  2. Cover categorisation: overlays ESA WorldCover 2021 land-cover classes (grassland, cropland, urban, water) onto the tree categories

  3. Buffer categorisation: identify riparian and roadside tree buffers using the National Surface Hydrology Lines and National Roads datasets

  4. Shelter categorisation: determine sheltered vs. unsheltered farmland based on tree density or wind direction, similar to Stewart et al. 2024

  5. Patch & class metrics: compute patch and class landscape statistics similar to FragStats

  6. Opportunities mapping: identify potential locations for additional tree plantings (currently a work-in-progress)

  7. API integrations: download data from ANU BARRA-C2 (wind), WRI Canopy Height, and ESA WorldCover

  8. Command-line interface: all index modules can be run in python scripts or directly from the terminal

  9. Scalable: designed for national-scale processing on HPC systems (NCI Gadi)

  10. Classifying trees from raw inputs: LAZ point clouds (via PDAL), Sentinel-2 imagery (with a bundled pre-trained neural network), or train your own model on labelled tiles

Example Output

The plot below shows the full categorisation pipeline: a binary tree-cover raster on the left, and the final shelter categories on the right (sheltered grassland and cropland labelled by the type of tree providing the shelter).

(Source code)

_images/index-1.hires.png

Visualise Results

You can explore results interactively in the Google Earth Engine App.

Github Repository

You can find installation instructions on the README of the GitHub repository.

Parameter Reference

The main parameters for categorising shelterbelts are:

Parameter

Default

Low

High

Description

min_patch_size

20

15

25

Minimum area (pixels) to classify as a patch rather than scattered trees

min_core_size

1000

100

10000

Minimum patch size (pixels) to classify as a core area

edge_size

3

2

5

Distance (pixels) defining the edge region around patch cores

buffer_width

4

3

5

Number of pixels away from a feature that still counts as within the buffer

distance_threshold

20

10

30

Distance from trees that counts as sheltered

density_threshold

5

3

10

Percentage tree cover within distance_threshold that counts as sheltered

wind_threshold

20

15

25

Wind speed threshold in km/h

wind_method

WINDWARD

MOST_COMMON

ANY

Method to determine primary wind direction

min_shelterbelt_length

20

15

25

Minimum skeleton length (pixels) to classify a cluster as linear

max_shelterbelt_width

6

5

7

Maximum skeleton width (pixels) to classify a cluster as linear

API Reference