How to reproject, clip and interactively plot HDFs with Python and GDAL – Tutorial
Large amount of spatial data is indexed and delivered through files in Hierarchical Data Format (HDF). These files are compatible with desktop GIS software as QGIS but they are not so easy to open/read/process with standard Python libraries as Rasterio, or with dedicated libraries. On our research we found the spatial functionality on the powerful GDAL binaries and library for Python.
We have done an applied case for the download, reproject (to WGS84) and clip to the area of interest of several MYD16A2 actual evapotranspiration images. We have also create an interactive visualization of the clipped images that allow us to examine the precipitation trends and the challenges in the use of these data products.
For this tutorial you need:
1. Windows Subsytem for Linux (WSL) in your computer:
On Powershell please check: wsl –status
If you dont have it installed please type: wsl –install
2. An account in NASA earthdata:
urs.earthdata.nasa.gov/users/new
Tutorial
Python code
Code for downloading data:
Code for reproject and clip files:
Input data
—————
TRANSCOM ISP – Free Sigma HSE Email
Level 6 Domain Names are FREE – Register Now.