From the course: Advanced Spatial Data Visualization in Python

Unlock this course with a free trial

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

Detailed raster visualizations: Terrain mapping

Detailed raster visualizations: Terrain mapping - Python Tutorial

From the course: Advanced Spatial Data Visualization in Python

Detailed raster visualizations: Terrain mapping

- [Instructor] After practicing vector data visualizations, now we move on to roster data. In this video, we will work with the digital elevation model of Germany, a roster grid where each cell represents a measured elevation level in meters. Just as with vector data, we won't download it manually from the source, but use a short Python script to automatically acquire and prepare the dataset. So first we get the URL and then this short piece of code, which downloads the data file and then extracts it into our data folder. Now first, let's visualize it using one of the most simple methods, by relying on matplotlib, and reading the data using rosterio. To visualize this grid, we'll use the imgshow command, and do just the bare minimum to fine-tune the plot by adding a color bar, and switching the axis off to have a cleaner visual. Here, you can see that the data is stored in a rectangular shape grid, where the…

Contents