This repo holds the Jupyter notebook that will be used for the GRASS for Remote sensing workshop at FOSS4G 2022 in Florence.
We will present and exemplify a subset of GRASS GIS toolsets for satellite imagery data processing and analysis in combination with other core modules and add-ons in a workflow going from data download to supervised classification of different scenes and visualization of results.
We will start with some basic GRASS concepts, but we'll assume Python and remote sensing basic knowledge.
❗ Participants should install the needed software and download the data in advance.
If you have problems installing the required software or prefer not to install anything new
on your machine, we are providing a notebook that can be opened and ran in Google Colab.
You only require to sign-in with a Google account and upload/open the file grassgis4rs_colab.ipynb
there.
- Why Jupyter Notebooks and how to use them?
- GRASS GIS basics
- GRASS GIS & Python
- Getting ready: set variables and download sample data
- Initialization of GRASS GIS in the Jupyter notebook session
- Creating an area of interest map
- Importing geodata into GRASS GIS
- Sentinel-2 processing overview
- Computing NDVI
- Time series data processing
- Creating an image stack (imagery group)
- Object recognition with image segmentation
- Supervised Classification: Random Forest
- Supervised Classification: Maximum Likelihood and band references
- What's next?
See the grassgis4rs.ipynb
notebook for details.
Clone this repository with git clone
first or download the *.ipynb
file.
Then locally start the Jupyter notebook server from the command line in the
directory containing the *.ipynb
file with:
jupyter notebook
This will open a new browser tab or window with a list of the contents of the current
working directory. Clicking on the *.ipynb
file will start the notebook.
See also the official documentation for The Jupyter Notebook.
To open the notebook in Google Colab, just use the URL of this repository:
We will use GRASS GIS 8.2+. It can be installed either through standalone installers/binaries or through OSGeo-Live (a Linux based virtual machine which includes all OSGeo software and packages).
There are two different options:
For Windows users, we strongly recommend installing GRASS GIS through the OSGeo4W package (first option), since it allows to install all OSGeo software.
Install GRASS GIS 8.2 from the "unstable" package repository:
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install grass grass-gui grass-dev
For other Linux distributions including Fedora and openSuSe, simply install GRASS GIS with the respective package manager. See also here.
Have a look at: http://grassmac.wikidot.com/downloads
Please install other required python packages with:
pip3 install sentinelsat notebook folium scikit-learn pandas numpy seaborn matplotlib
Please download the following files in advance:
- North Carolina (NC) sample data: https://grass.osgeo.org/sampledata/north_carolina/nc_spm_08_grass7.zip
- List of available data in the North Carolina sample dataset.
- Sentinel-2 scenes: https://data.neteler.org/foss4g2022/sentinel.zip
- NC NLCD 2019 map in GRASS GIS format: https://data.neteler.org/foss4g2022/nc_nlcd2019.pack
We'll use Sentinel-2 data and hence users must be registered at the
Copernicus Open Access Hub.
Fill in the form here
and create a text file with two lines including username
and password
,
such as:
username
password
- Veronica Andreo holds a PhD in Biology and an MSc in Remote Sensing and GIS Applications. She is a researcher for CONICET working at the Argentinian Space Agency. Her main interests are remote sensing and GIS tools for disease ecology research and applications. She is part of the GRASS Dev Team, currently serving as PSC chair.
- Markus Neteler, PhD, is a cofounder of mundialis after having spent 15 years as a researcher in Italy. His focus is on Earth Observation, GIS and cloud computing. Markus managed the GRASS GIS project for two decades, and he is a founding member of OSGeo and other organizations.
- Māris Nartišs is a geographer with more than ten years of experience in teaching topics related to GIS, remote sensing and geomorphology. A free software supporter, and GRASS GIS contributor.