More Advanced Data Cube Usage

Introduction on how to manipulate DEMs

In this notebook you will learn how to manipulate Digital Elevation Models (DEMs) using python.

This notebook will require a number of external Python modules to run, which will be imported at the top of the notebook as his convention.

Let's load the DEM DEM_KG_UTM43.tif available in the data folder. Just for the sake of this notebook, this DEM has been reprojected to UTM 43N.

If we try to plot the data at this stage we will find that we have to mask the nodata value, to see the elevation of the terrain.

For analysis and plotting we are going to remove the nodata value, so that it will appear as NaN

Now you can treat the DEM like a data layer, so for example you could find the maximum and minimum elevation point for Kyrgyzstan

Find a region around a point

Now we would like to select an area around the selected point, for example an area around the point with a radius of 50 km

Let's find the elevation of the chosen point

Now, we can plot only the points that are below or about the chosen point

This selection of data can have several applications. For example, if we have the position of the meteo stations in Kyrgyzstan, we could check which part of the country is covered.

Now, we are going to see how to select the data if we have multiple points.

Given a list of points, let's find a region around each single point

First we load the raion shapefile available in the data folder

Then, we create a list of points and convert the coordinate in UTM43N (you can also load a shapefile of points).

Now, we want to apply the condition used in the previous cell, where we select only a circle around the point, for all the points.

We can start with a first point to initialise our condition_all_pt

Once we have our first point, we can loop for all the points (x_pts and y_pts) and sum all the conditions together. (Summing them we can keep all the points.)

From the plot we can see that which parts of Kygyzstan are not being covered.