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.

Resampling raster data

Resampling raster data

- [Instructor] Resampling raster data is a widely used method to reduce file size, volume, and complexity. This simplification approach is also useful when we are merging multiple raster files with different spatial resolutions. In this example, we will match the spatial resolutions of the previously reprojected Germany level population and elevation rasters. First, we import the usual rasterio and NumPy libraries, along with the resampling method of rasterio. Additionally, to ensure CRS level compatibility, we will use the previously introduced reproject method as well. Here, I will only import the new libraries. Now let's specify the previously created input files, which are going to be the reprojected elevation and population maps of Germany. Here, now I just copy and paste it from the previous notebook. Then to figure out what we are dealing with, let's compare the resolution of these two raster files. For that, we will have to open both files and print the resolution attributes…

Contents