From f0473cf4d7e93ab69cfe3661869ec41fb1cb94a5 Mon Sep 17 00:00:00 2001 From: Francesco Nattino Date: Thu, 11 Sep 2025 15:42:56 +0200 Subject: [PATCH 01/11] fix xarray-spatial --- index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.md b/index.md index 9234dc4d..6ab7641a 100644 --- a/index.md +++ b/index.md @@ -14,7 +14,7 @@ As a case study for this lesson we will focus on wildfires. According to [the IP The data used in this lesson includes optical satellite images from [the Copernicus Sentinel-2 mission][sentinel-2] and topographical data from [OpenStreetMap (OSM)][osm]. These datasets are real-world open data sets that entail sufficient complexity to teach many aspects of data analysis and management. The datasets have been selected to allow participants to focus on the core ideas and skills being taught while offering the chance to encounter common challenges with geospatial data. Furthermore, we have selected datasets which are available anywhere on Earth. -During this lesson we will setup an analysis pipeline which identifies scorched areas based on bands of satellite images collected after the disaster in July 2023. Next, we will calculate the [Normalized Difference Vegetation Index (NDVI)](https://en.wikipedia.org/wiki/Normalized_difference_vegetation_index) to assess the vegetation cover of the areas before and after the wildfire. To investigate the affected built-up areas and main roads, we will use OSM vector data and compare them with the previously identified scorched areas. +During this lesson we will setup an analysis pipeline which identifies scorched areas based on bands of satellite images collected after the disaster in July 2023. Next, we will calculate the [Normalized Difference Vegetation Index (NDVI)](https://en.wikipedia.org/wiki/Normalized_difference_vegetation_index) to assess the vegetation cover of the areas before and after the wildfire. To investigate the affected built-up areas and main roads, we will use OSM vector data and compare them with the previously identified scorched areas. To most effectively use this material, make sure to [download the data](learners/setup.md#data-sets) and follow [the software setup instructions](learners/setup.md#software-setup) before working through the lesson (this especially accounts for learners that follow this lesson in a workshop). @@ -24,7 +24,7 @@ The main python libraries that are used in this lesson are: - [geopandas](https://geopandas.org/en/stable/) - [rioxarray](https://github.com/corteva/rioxarray) -- [xarray-spatial](https://xarray-spatial.org/) +- [xarray-spatial](https://xarray-spatial.readthedocs.io) - [dask](https://www.dask.org/) - [pystac-client](https://pystac-client.readthedocs.io/) From 853fc7068948bc9bfc917dd285c64e9c59272e98 Mon Sep 17 00:00:00 2001 From: Francesco Nattino Date: Thu, 11 Sep 2025 15:45:06 +0200 Subject: [PATCH 02/11] fix sentinel-2 --- index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.md b/index.md index 6ab7641a..1eff1cef 100644 --- a/index.md +++ b/index.md @@ -28,5 +28,5 @@ The main python libraries that are used in this lesson are: - [dask](https://www.dask.org/) - [pystac-client](https://pystac-client.readthedocs.io/) -[sentinel-2]: https://sentinel.esa.int/web/sentinel/missions/sentinel-2 +[sentinel-2]: https://dataspace.copernicus.eu/data-collections/copernicus-sentinel-data/sentinel-2 [osm]: https://www.openstreetmap.org/#map=14/45.2935/18.7986 From 7f6d6c52328db7d249ec7aee39ae6110c93dc940 Mon Sep 17 00:00:00 2001 From: Francesco Nattino Date: Thu, 11 Sep 2025 15:49:27 +0200 Subject: [PATCH 03/11] fix geotiff --- episodes/01-intro-raster-data.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/episodes/01-intro-raster-data.md b/episodes/01-intro-raster-data.md index 64c54981..cad307c8 100644 --- a/episodes/01-intro-raster-data.md +++ b/episodes/01-intro-raster-data.md @@ -128,7 +128,7 @@ of changes in resolution. ### Raster Data Format for this Workshop Raster data can come in many different formats. For this workshop, we will use -one of the most common formats for raster data, i.e. the GeoTIFF format, which has the extension `.tif`. +one of the most common formats for raster data, i.e. the GeoTIFF format, which has the extension `.tif`. A `.tif` file stores metadata or attributes about the file as embedded `tif tags`. For instance, your camera might store a tag that describes the make and model of the camera or the date the photo was taken when it saves a `.tif`. A GeoTIFF is a standard `.tif` image @@ -149,13 +149,13 @@ from a GeoTIFF file. ## More Resources on the `.tif` format * [GeoTIFF on Wikipedia](https://en.wikipedia.org/wiki/GeoTIFF) -* [OSGEO TIFF documentation](https://trac.osgeo.org/geotiff/) +* [Open Geospatial Consortium (OGC) GeoTIFF standard](https://www.ogc.org/standards/geotiff/) ::: ### Multi-band Raster Data A raster can contain one or more bands. One type of multi-band raster -dataset that is familiar to many of us is a color image. A basic color +dataset that is familiar to many of us is a color image. A basic color image often consists of three bands: red, green, and blue (RGB). Each band represents light reflected from the red, green or blue portions of the electromagnetic spectrum. The pixel brightness for each band, when From e687be86fb8294779cd5d3f3020538d9bc2a538b Mon Sep 17 00:00:00 2001 From: Francesco Nattino Date: Thu, 11 Sep 2025 16:00:23 +0200 Subject: [PATCH 04/11] drop unreachable lecture notes, add web tool --- episodes/03-crs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/episodes/03-crs.md b/episodes/03-crs.md index dee56d55..a37d3731 100644 --- a/episodes/03-crs.md +++ b/episodes/03-crs.md @@ -98,7 +98,7 @@ To decide if a projection is right for your data, answer these questions: * What is the area of minimal distortion? * What aspect of the data does it preserve? -[Peter Dana from the University of Colorado at Boulder](https://foote.geography.uconn.edu/gcraft/notes/mapproj/mapproj_f.html) and the [Department of Geo-Information Processing](https://kartoweb.itc.nl/geometrics/Map%20projections/mappro.html) have a good discussion of these aspects of projections. Online tools like [Projection Wizard](https://projectionwizard.org/) can also help you discover projections that might be a good fit for your data. +The [Department of Geo-Information Processing](https://kartoweb.itc.nl/geometrics/Map%20projections/mappro.html) has a good discussion of these aspects of projections. Online tools like [Projection Wizard](https://projectionwizard.org/) and the [Worldmapgenerator](https://www.worldmapgenerator.com) can also help you explore projections and discover what might be a good fit for your data. :::callout ## Data Tip From 9fdc5ba2f992dc54d46615e4080f9b153af48d1d Mon Sep 17 00:00:00 2001 From: Francesco Nattino Date: Thu, 11 Sep 2025 16:04:12 +0200 Subject: [PATCH 05/11] drop link to old R package. --- episodes/04-geo-landscape.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/episodes/04-geo-landscape.md b/episodes/04-geo-landscape.md index 078754fc..949de006 100644 --- a/episodes/04-geo-landscape.md +++ b/episodes/04-geo-landscape.md @@ -27,8 +27,7 @@ The [Open Source Geospatial Foundation (OSGEO)](https://www.osgeo.org/) supports * [QGIS](https://www.qgis.org/en/site/) is a professional GIS application that is built on top of and proud to be itself Free and Open Source Software (FOSS). QGIS is - written in Python and C++, has a python console interface, allows to develop plugins and has several interfaces written in R including - [RQGIS](https://cran.r-project.org/package=RQGIS). + written in Python and C++, has a python console interface and allows one to develop plugins. * [GRASS GIS](https://grass.osgeo.org/), commonly referred to as GRASS (Geographic Resources Analysis Support System), is a FOSS-GIS software suite used for geospatial data management and analysis, image processing, graphics and maps From c6405eacbf515151c67453333d17286b174cdc24 Mon Sep 17 00:00:00 2001 From: Francesco Nattino Date: Thu, 11 Sep 2025 16:08:32 +0200 Subject: [PATCH 06/11] fix mapinfo pro --- episodes/04-geo-landscape.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/episodes/04-geo-landscape.md b/episodes/04-geo-landscape.md index 949de006..330b9b73 100644 --- a/episodes/04-geo-landscape.md +++ b/episodes/04-geo-landscape.md @@ -65,7 +65,7 @@ The [Open Source Geospatial Foundation (OSGEO)](https://www.osgeo.org/) supports through their [DevLabs](https://developers.arcgis.com/). ArcGIS software can be installed using [Chef Cookbooks from Github](https://github.com/Esri/arcgis-cookbook). In addition, ESRI offers the [ArcPy Python library](https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/what-is-arcpy-.htm) as part of an ArcGIS Pro licence, allowing to translate operations in the ArcGIS Pro GUI to Python scripts. - * Pitney Bowes produce [MapInfo Professional](https://www.pitneybowes.com/us/location-intelligence/geographic-information-systems/mapinfo-pro.html), + * Precisely produces [MapInfo Professional](https://www.precisely.com/product/precisely-mapinfo/mapinfo-pro), formerly developed by Pitney Bowes Software, which was one of the earliest desktop GIS programs on the market. * [Hexagon Geospatial Power Portfolio](https://www.hexagongeospatial.com/products/products) includes many geospatial tools including ERDAS Imagine, powerful software for remote sensing. From ea24e7c52dac327c1390d496a2e67fbf4dd3c8cf Mon Sep 17 00:00:00 2001 From: Francesco Nattino Date: Thu, 11 Sep 2025 16:11:58 +0200 Subject: [PATCH 07/11] remove boundless, aquired by planet --- episodes/04-geo-landscape.md | 1 - 1 file changed, 1 deletion(-) diff --git a/episodes/04-geo-landscape.md b/episodes/04-geo-landscape.md index 330b9b73..fbe1635c 100644 --- a/episodes/04-geo-landscape.md +++ b/episodes/04-geo-landscape.md @@ -89,7 +89,6 @@ The [Open Source Geospatial Foundation (OSGEO)](https://www.osgeo.org/) supports Private companies have released SDK platforms for large scale GIS analysis: * [Kepler.gl](https://kepler.gl/#/) is Uber's toolkit for handling large datasets (i.e. Uber's data archive). - * [Boundless Geospatial](https://boundlessgeo.com/) is built upon OSGEO software for enterprise solutions. Publicly funded open-source platforms for large scale GIS analysis: From d6b4851728073c6257a5054f52f2c7e9c87a9d36 Mon Sep 17 00:00:00 2001 From: Francesco Nattino Date: Thu, 11 Sep 2025 16:13:16 +0200 Subject: [PATCH 08/11] fix sentinel-2 --- episodes/05-access-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/episodes/05-access-data.md b/episodes/05-access-data.md index c017426a..00f2410b 100644 --- a/episodes/05-access-data.md +++ b/episodes/05-access-data.md @@ -32,7 +32,7 @@ associated to accurate geographic coordinate information. In this episode we will explore how to access open satellite data using Python. In particular, we will consider [the Sentinel-2 data collection that is hosted on Amazon Web Services (AWS)](https://registry.opendata.aws/sentinel-2-l2a-cogs). This dataset consists of multi-band optical images acquired by the constellation of two satellites from -[the Sentinel-2 mission](https://sentinel.esa.int/web/sentinel/missions/sentinel-2) and it is continuously updated with +[the Sentinel-2 mission](https://dataspace.copernicus.eu/data-collections/copernicus-sentinel-data/sentinel-2) and it is continuously updated with new images. ## Search for satellite imagery From 24ecf7f89621a33db51870b166419af39e194bf0 Mon Sep 17 00:00:00 2001 From: Francesco Nattino Date: Thu, 11 Sep 2025 16:27:13 +0200 Subject: [PATCH 09/11] fix sentinel-2 msi --- episodes/06-raster-intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/episodes/06-raster-intro.md b/episodes/06-raster-intro.md index 6f435aed..a49cf097 100644 --- a/episodes/06-raster-intro.md +++ b/episodes/06-raster-intro.md @@ -191,7 +191,7 @@ rhodes_red_80.plot() ``` ![Raster plot 80 x 80 meter resolution with rioxarray](fig/E06/rhodes_red_80_B04.png){alt="raster plot with defualt setting"} -This plot shows the satellite measurement of the band `red` for Rhodes before the wildfire. According to the [Sentinel-2 documentaion](https://sentinels.copernicus.eu/web/sentinel/technical-guides/sentinel-2-msi/msi-instrument), this is a band with the central wavelength of 665nm. It has a spatial resolution of 10m. Note that the `band=1` in the image title refers to the ordering of all the bands in the `DataArray`, not the Sentinel-2 band number `04` that we saw in the pystac search results. +This plot shows the satellite measurement of the band `red` for Rhodes before the wildfire. According to the [Sentinel-2 documentaion](https://sentiwiki.copernicus.eu/web/s2-mission#S2-Mission-MSI-Instrument), this is a band with the central wavelength of 665nm. It has a spatial resolution of 10m. Note that the `band=1` in the image title refers to the ordering of all the bands in the `DataArray`, not the Sentinel-2 band number `04` that we saw in the pystac search results. :::callout From e297e7aa475b4094c09fbf6b0df116ca33c70cf1 Mon Sep 17 00:00:00 2001 From: Francesco Nattino Date: Thu, 11 Sep 2025 16:30:19 +0200 Subject: [PATCH 10/11] fix dem --- episodes/08-crop-raster-data.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/episodes/08-crop-raster-data.md b/episodes/08-crop-raster-data.md index b1245565..98376a11 100644 --- a/episodes/08-crop-raster-data.md +++ b/episodes/08-crop-raster-data.md @@ -24,7 +24,7 @@ In this episode, we will introduce how to crop raster data into the desired area In this episode, we will work with both raster and vector data. -As *raster data*, we will use satellite images from the search that we have carried out in [the episode: "Access satellite imagery using Python"](05-access-data.md) as well as Digital Elevation Model (DEM) data from the [Copernicus DEM GLO-30 dataset](https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model). +As *raster data*, we will use satellite images from the search that we have carried out in [the episode: "Access satellite imagery using Python"](05-access-data.md) as well as Digital Elevation Model (DEM) data from the [Copernicus DEM GLO-30 dataset](https://dataspace.copernicus.eu/explore-data/data-collections/copernicus-contributing-missions/collections-description/COP-DEM). For the satellite images, we have searched for Sentinel-2 scenes of Rhodes from July 1st to August 31st 2023 that have less than 1% cloud coverage. The search resulted in 11 scenes. We focus here on the most recent scene (August 27th), since that would show the situation after the wildfire, and use this as an example to demonstrate raster data cropping. @@ -169,7 +169,7 @@ visual_clip.plot.imshow() :::challenge ## Exercise: Clip the red band for Rhodes -Now that you have seen how clip a raster using a polygon, we want you to do this for the red band of the satellite image. Use the shape of Rhodes from GADM and clip the red band with it. Furthermore, make sure to transform the no data values to not-a-number (NaN) values. +Now that you have seen how clip a raster using a polygon, we want you to do this for the red band of the satellite image. Use the shape of Rhodes from GADM and clip the red band with it. Furthermore, make sure to transform the no data values to not-a-number (NaN) values. ::::solution ```python From 26201b37f0b36c3f560b5d4877a8a55548d80d02 Mon Sep 17 00:00:00 2001 From: Francesco Nattino Date: Thu, 11 Sep 2025 16:33:31 +0200 Subject: [PATCH 11/11] fix scl --- episodes/12-data-cube.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/episodes/12-data-cube.md b/episodes/12-data-cube.md index c7c18c94..71813882 100644 --- a/episodes/12-data-cube.md +++ b/episodes/12-data-cube.md @@ -5,8 +5,8 @@ exercises: 0 --- :::questions -- Can I mosaic tiled raster datasets when my area of interest spans multiple files? -- Can I stack raster datasets that cover the same area along the time dimension in order to explore temporal changes of some quantities? +- Can I mosaic tiled raster datasets when my area of interest spans multiple files? +- Can I stack raster datasets that cover the same area along the time dimension in order to explore temporal changes of some quantities? ::: :::objectives @@ -15,9 +15,9 @@ exercises: 0 ## Introduction -In the previous episodes we worked with satellite images with a fixed boundary on how they have been collected, however in many cases you would want to have an image that covers your area of interest which often does not align with boundaries of the collected images. If the phenomena you are interested in covers two images you could manually mosaic them, but sometimes you are interested in multiple images that overlapping. +In the previous episodes we worked with satellite images with a fixed boundary on how they have been collected, however in many cases you would want to have an image that covers your area of interest which often does not align with boundaries of the collected images. If the phenomena you are interested in covers two images you could manually mosaic them, but sometimes you are interested in multiple images that overlapping. -ODC-STAC offers functionality that allows you to get a mosaic-ed image based on the a bounding box or a polygon containing the area of interest. In this lesson we show how [odc-stac](https://odc-stac.readthedocs.io/en/latest/?badge=latest) can be employed to re-tile and stack satellite images in what are sometimes referred to as "data cubes". +ODC-STAC offers functionality that allows you to get a mosaic-ed image based on the a bounding box or a polygon containing the area of interest. In this lesson we show how [odc-stac](https://odc-stac.readthedocs.io/en/latest/?badge=latest) can be employed to re-tile and stack satellite images in what are sometimes referred to as "data cubes". ## Create a data cube with ODC-STAC @@ -97,7 +97,7 @@ Data variables: (12/18) ## Working with the data cube -Like we did in the previous episode, let us calculate the NDVI for our study area. To do so we need to focus on the variables: the red band (`red`), the near infrared band (`nir`) and the scene classification map (`scl`). We will use the former two to calculated the NDVI for the AoI. The latter, we use as [a classification mask](https://sentinels.copernicus.eu/web/sentinel/technical-guides/sentinel-2-msi/level-2a/algorithm-overview) provided together with Sentinel-2 L2A products. In this mask, each pixel is classified according to a set of labels (see Figure 3 in [classification mask documentation](https://sentinels.copernicus.eu/web/sentinel/technical-guides/sentinel-2-msi/level-2a/algorithm-overview) ). +Like we did in the previous episode, let us calculate the NDVI for our study area. To do so we need to focus on the variables: the red band (`red`), the near infrared band (`nir`) and the scene classification map (`scl`). We will use the former two to calculated the NDVI for the AoI. The latter, we use as [a classification mask](https://sentiwiki.copernicus.eu/web/s2-processing#S2Processing-SceneClassification(SC)S2-Processing-Scene-Classificationtrue) provided together with Sentinel-2 L2A products. In this mask, each pixel is classified according to a set of labels (see Figure 2 in [classification mask documentation](https://sentiwiki.copernicus.eu/web/s2-processing#S2Processing-SceneClassification(SC)S2-Processing-Scene-Classificationtrue)). First we define the bands that we are interested in: