Geospatial Machine Learning

Geospatial Machine Learning icon

Geospatial Machine Learning

About This Course

Build machine learning models on spatial data, where the location of an observation carries information that ordinary models throw away. Over three days you classify multispectral satellite imagery into land cover classes, detect features in aerial imagery, and model continuous surfaces from scattered observations.

Day 1 treats imagery as training data. A satellite scene is a stack of spectral bands, and once you can reshape it into one row per pixel it becomes an ordinary classification problem for scikit-learn — then has to be reshaped back into geographic space before anyone can read the result. You classify land cover twice, on different data and with different algorithms, because the second pass is where the questions that matter come up: what accuracy would pure chance give you, and does the model still work on a patch it has never seen?

Day 2 is what separates this from a generic machine learning course. Near things are more related than distant things, which means spatial observations are not independent, and most models assume they are. Using PySAL you learn to measure that dependence, to separate a genuine hotspot from an artefact of how the data was collected, and to judge when a standard model is quietly telling you something untrue.

Day 3 is a full pipeline and an honest account of it. Counting features on the ground by walking transects is slow, and on fragile terrain the survey itself does damage. You process aerial imagery into candidate detections with scikit-image, check the answer against a physical ground survey, and count exactly how often you were wrong — false positives and false negatives, not a single accuracy figure. The day ends with scale: the same pipeline rebuilt on dask-image to run across several machines, and Datashader for output too large to plot.

Who This Course Is For

Remote sensing scientists, GIS analysts, data scientists and researchers who need to build models on imagery and location data rather than on tidy tables. You can already load a raster and draw a map, and what you need next is a classification or a prediction that will survive being questioned.

It suits teams whose work arrives as satellite and drone imagery, environmental and survey observations, or statistical boundaries, and who are currently counting or digitising features by hand. Common backgrounds include environment and water agencies, mining and resources, transport, emergency services, health and statistical agencies.

Prerequisites

Our Python for Geospatial Analysis course, or equivalent experience.

You should already be comfortable reading vector data into GeoPandas, working with rasters in xarray or Rasterio, and handling coordinate reference systems and reprojection. We revise these briefly rather than teaching them from scratch.

No prior machine learning or spatial statistics experience is assumed.

What You'll Learn

  • Classify multispectral satellite imagery into land cover classes with scikit-learn, and map the predictions back onto the raster.
  • Build a feature detection pipeline over drone imagery with scikit-image, from raw pixels through to labelled candidate features.
  • Validate a spatial model against ground-truthed survey data, and count the false positives and false negatives.
  • Measure spatial dependence and autocorrelation with PySAL, and identify hotspots, coldspots and local anomalies.
  • Judge when spatial dependence invalidates a standard machine learning model, and choose an approach accordingly.
  • Predict continuous surfaces from scattered observations, and process imagery that does not fit on one machine.

Course Syllabus

Day 1 — Learning from imagery

  • Revision of GeoPandas, xarray rasters, projections and coordinate reference systems
  • Preparing raster and vector data for machine learning
  • Rasterisation and vectorisation, in both directions
  • Supervised classification of multispectral satellite imagery with scikit-learn
  • Reshaping predictions back into geographic space with xarray
  • Land cover classification against Digital Earth Australia categories, with a chance-rate baseline and a held-out patch

Day 2 — Spatial dependence

  • Why spatially dependent data breaks ordinary machine learning
  • Spatial weights and the spatial lag: Queen, Rook, distance band and kernel
  • Measuring spatial dependence and autocorrelation with PySAL
  • Global autocorrelation with Moran's I and Geary's C
  • Finding hotspots, coldspots and spatial anomalies with local Moran's I
  • Building models that account for location

Day 3 — Surfaces, validation and scale

  • Feature detection in drone imagery with scikit-image: filtering, edges, thresholding and morphology
  • Labelling and filtering candidate features with regionprops
  • Predicting continuous surfaces from scattered observations with SciPy and scikit-learn
  • Validating spatial models against ground-truthed survey data
  • Counting false positives and false negatives with a confusion matrix
  • Scaling image processing beyond a single machine with dask-image
  • Visualising model output over very large datasets with Datashader

Worked examples use satellite, aerial and survey data, chosen to suit the group. Bring your own datasets and we will work through them with you: our trainers do this work for a living, so an unfamiliar problem gets solved in the room rather than deferred.