Introduction to the GEDI02_B Product


The Global Ecosystem Dynamics Investigation (GEDI) mission aims to characterize ecosystem structure and dynamics to enable radically improved quantification and understanding of the Earth’s carbon cycle and biodiversity. The GEDI instrument produces high resolution laser ranging observations of the 3-dimensional structure of the Earth. GEDI is attached to the International Space Station (ISS) and collects data globally between 51.6° N and 51.6° S latitudes at the highest resolution and densest sampling of any light detection and ranging (lidar) instrument in orbit to date. Each GEDI Version 2 granule encompasses one-fourth of an ISS orbit and includes georeferenced metadata to allow for spatial querying and subsetting.

The purpose of the GEDI Level 2B Canopy Cover and Vertical Profile Metrics product (GEDI02_B) is to extract biophysical metrics from each GEDI waveform. These metrics are based on the directional gap probability profile derived from the L1B waveform. Metrics provided include canopy cover, Plant Area Index (PAI), Plant Area Volume Density (PAVD), and Foliage Height Diversity (FHD). The GEDI02_B product is provided in HDF5 format and has a spatial resolution (average footprint) of 25 meters.

The GEDI02_B data product contains 96 layers for each of the eight-beam ground transects (or laser footprints located on the land surface). Datasets provided include precise latitude, longitude, elevation, height, canopy cover, and vertical profile metrics. Additional information for the layers can be found in the GEDI Level 2B Data Dictionary.

Opening GEDI02_B files and exploring its datasets

This tutorial opens and exampines a GEDI02_B file and demonstrates how to plot a subset of points in order to understand the spatial extent of that file.

  • Author: Aimee Barciauskas
  • Date: December 16, 2022

Resources used: * Getting Started with GEDI L2B Version 2 Data in Python (LPDAAC Tutorial)

import boto3
import folium
import h5py
from os.path import exists
from pystac_client import Client
import pandas as pd
URL = ''
client =
collection = 'GEDI02_B'
search =
    max_items = 1,
    collections = collection,
item = search.get_all_items()[0]

Access and open the GEDI02_B HDF5 file

Below, we break down the S3 URL into its bucket and key components to support downloading the file with S3. Note, this will only work on platforms configured with access to the GEDI directory of the NASA MAAP Data Store (s3://nasa-maap-data-store/GEDI*). Further, it is strongly preferred that any transfer of data is done on AWS services in AWS region us-west-2 in order for data transfer costs to be minimized.

href = item.assets['data'].href
path_parts = href.split('/')
bucket = path_parts[2]
key = href.split(bucket)[1][1:]
filename = path_parts[-1]
bucket, key, filename
# don't want to run this more than once!
s3 = boto3.client('s3')

if exists(filename):
    print("file already downloaded")
    s3.download_file(bucket, key, filename)
    print("finished downloading")
file already downloaded
gediL2B = h5py.File(filename, 'r')
beamNames = [g for g in gediL2B.keys() if g.startswith('BEAM')]

List all the science data sets

to understand what type of data is stored in this dataset better.

[ ]:
beam = beamNames[0]
gediL2B_objs = []
gediL2B.visit(gediL2B_objs.append)                                           # Retrieve list of datasets
gediSDS = [o for o in gediL2B_objs if isinstance(gediL2B[o], h5py.Dataset)]  # Search for relevant SDS inside data file
[i for i in gediSDS if beam in i][0:20]

Plot a subset of the points

First, we create a subset of points to facilitate plotting.

lonSample, latSample, shotSample, qualitySample, beamSample = [], [], [], [], []  # Set up lists to store data

# Open the SDS
lats = gediL2B[f'{beamNames[0]}/geolocation/lat_lowestmode'][()]
lons = gediL2B[f'{beamNames[0]}/geolocation/lon_lowestmode'][()]
shots = gediL2B[f'{beamNames[0]}/geolocation/shot_number'][()]
quality = gediL2B[f'{beamNames[0]}/l2b_quality_flag'][()]

# Take every 1000th shot and append to list
for i in range(len(shots)):
    if i % 1000 == 0:

# Write all of the sample shots to a dataframe
latslons = pd.DataFrame({'Beam': beamSample, 'Shot Number': shotSample, 'Longitude': lonSample, 'Latitude': latSample,
                         'Quality Flag': qualitySample})
Beam Shot Number Longitude Latitude Quality Flag
0 BEAM0000 162680000200086772 71.176248 -0.652634 0
1 BEAM0000 162680000200087772 71.475272 -0.228396 0
2 BEAM0000 162680000200088772 71.772920 0.194259 0
3 BEAM0000 162680000200089772 72.070465 0.616924 0
4 BEAM0000 162680000200090772 72.369240 1.040828 0
... ... ... ... ... ...
89 BEAM0000 162680000200175772 102.130037 35.159365 0
90 BEAM0000 162680000200176772 102.593719 35.509484 0
91 BEAM0000 162680000200177772 103.061891 35.857398 0
92 BEAM0000 162680000200178772 103.522337 36.194505 0
93 BEAM0000 162680000200179772 103.755363 36.363258 0

94 rows × 5 columns

map = folium.Map(
    ], zoom_start=3, control_scale=True

for index, location_info in latslons.iterrows():
        [location_info["Latitude"], location_info["Longitude"]],
        popup=f"Shot Number: {location_info['Shot Number']}"

Make this Notebook Trusted to load map: File -> Trust Notebook