From the course: Geospatial Raster Data Analytics in Python

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Spatial referencing and saving raster data

Spatial referencing and saving raster data - Python Tutorial

From the course: Geospatial Raster Data Analytics in Python

Spatial referencing and saving raster data

- [Instructor] In the previous video, we learned how to create single and triple-event random grid data. Now, we will learn how to georeference it, or in other words, attach a real-life coordinate system to the earliest numbers. First, we will need the rasterio library. This will be our go-to library for doing raster data analysis and manipulation in Python. Additionally, we will need the following specific function from rasterio for creating the raster data structure containing spatial information. We will also need the synthetic grid data we created in the previous lecture, one containing a single band, while the other one containing three bands of random data. They are stored in the NumPy arrays named single_data and rgb_data and look as follows. First, we will focus on the single-band case. We already prepared the random grid data. Now we have to define the so-called transformer to be able to georeference the grid. The transformer encodes how the row and column indices should be…

Contents