To run the notebook just click on the Binder link below, no need to install anything:
In this notebook we will learn to do a some basic raster manipulation:
- Open a .tif raster file and look at some of their basic information
- Open a shapefile and look at some of its basic info
- Clip rasters using the shapefile
- Do some raster arithmetic by computing the Normalized Difference Vegetation Index (NDVI)
- Save our NDVI raster as a .tif file
The images used in this repo come from the US National Agriculture Imagery Program (NAIP). This program provides high-resolution aerial images with four spectral bands: Red, Green, Blue and Near-Infrared. To prepare the rasters for this workshop I accessed the NAIP Dataset on Microsoft's Planetary Computer, where I also did the data pre-processing.
To learn more about how these images were collected, check out this short video: Mapping the Invisible: Introduction to Spectral Remote Sensing - NEON Science
Some of the content in this project is based on the workshop Introduction to Geospatial Raster and Vector Data with Python from the The Carpentries Incubator. This is a great resource to go deeper into working with geospatial data with Python!
Some of the users running this notebook might be more familiar with the R programming language. Here you can see an example of doing a similar workflow in R. The repository for this project is available here https://github.com/carmengg/mexico_rasters.