Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

gedi

The GEDI Python API gedi.py is used to access the services provided by the gedi plugin for SlideRule. From Python, the module can be imported via:

from sliderule import gedi

Functions

init

sliderule.gedi.init(url='slideruleearth.io', verbose=False, loglevel=50, organization='sliderule', desired_nodes=None, time_to_live=60)

Initializes the Python client for use with SlideRule and should be called before other GEDI API calls. This function is a wrapper for the sliderule.init(...) function </api_reference/sliderule.html#init>_.

Examples

>>> from sliderule import gedi
>>> gedi.init()

gedi04a

sliderule.gedi.gedi04a(parm, resource)

Performs GEDI L4A subsetting of elevation footprints

Parameters

Returns

GeoDataFrame

gridded footrpints

gedi04ap

sliderule.gedi.gedi04ap(parm, callbacks={}, resources=None, keep_id=False, as_numpy_array=False, height_key=None)

Performs subsetting in parallel on GEDI data and returns elevation footprints. This function expects that the parm argument includes a polygon which is used to fetch all available resources from the CMR system automatically. If resources is specified then any polygon or resource filtering options supplied in parm are ignored.

Parameters

Returns

GeoDataFrame

geolocated footprints

Examples

>>> from sliderule import gedi
>>> gedi.init()
>>> region = [ {"lon":-105.82971551223244, "lat": 39.81983728534918},
...            {"lon":-105.30742121965137, "lat": 39.81983728534918},
...            {"lon":-105.30742121965137, "lat": 40.164048017973755},
...            {"lon":-105.82971551223244, "lat": 40.164048017973755},
...            {"lon":-105.82971551223244, "lat": 39.81983728534918} ]
>>> parms = { "poly": region }
>>> resources = ["GEDI04_A_2019229131935_O03846_02_T03642_02_002_02_V002.h5"]
>>> asset = "ornldaac-s3"
>>> rsps = gedi.gedi04ap(parms, asset=asset, resources=resources)

gedi02a

sliderule.gedi.gedi02a(parm, resource)

Performs GEDI L2A subsetting of elevation footprints

Parameters

Returns

GeoDataFrame

gridded footrpints

gedi02ap

sliderule.gedi.gedi02ap(parm, callbacks={}, resources=None, keep_id=False, as_numpy_array=False, height_key=None)

Performs subsetting in parallel on GEDI data and returns geolocated footprints. This function expects that the parm argument includes a polygon which is used to fetch all available resources from the CMR system automatically. If resources is specified then any polygon or resource filtering options supplied in parm are ignored.

Parameters

Returns

GeoDataFrame

geolocated footprints

Examples

>>> from sliderule import gedi
>>> gedi.init()
>>> region = [ {"lon":-105.82971551223244, "lat": 39.81983728534918},
...            {"lon":-105.30742121965137, "lat": 39.81983728534918},
...            {"lon":-105.30742121965137, "lat": 40.164048017973755},
...            {"lon":-105.82971551223244, "lat": 40.164048017973755},
...            {"lon":-105.82971551223244, "lat": 39.81983728534918} ]
>>> parms = { "poly": region }
>>> resources = ["GEDI02_A_2019229131935_O03846_02_T03642_02_002_02_V002.h5"]
>>> asset = "gedi-local"
>>> rsps = gedi.gedi02ap(parms, asset=asset, resources=resources)

gedi01b

sliderule.gedi.gedi01b(parm, resource)

Performs GEDI L1B subsetting of elevation waveforms

Parameters

Returns

GeoDataFrame

gridded footrpints

gedi01bp

sliderule.gedi.gedi01bp(parm, callbacks={}, resources=None, keep_id=False, as_numpy_array=False, height_key=None)

Performs subsetting in parallel on GEDI data and returns geolocated footprints. This function expects that the parm argument includes a polygon which is used to fetch all available resources from the CMR system automatically. If resources is specified then any polygon or resource filtering options supplied in parm are ignored.

Parameters

Returns

GeoDataFrame

geolocated footprints

Examples

>>> from sliderule import gedi
>>> gedi.init()
>>> region = [ {"lon":-105.82971551223244, "lat": 39.81983728534918},
...            {"lon":-105.30742121965137, "lat": 39.81983728534918},
...            {"lon":-105.30742121965137, "lat": 40.164048017973755},
...            {"lon":-105.82971551223244, "lat": 40.164048017973755},
...            {"lon":-105.82971551223244, "lat": 39.81983728534918} ]
>>> parms = { "poly": region }
>>> resources = ["GEDI01_B_2019229131935_O03846_02_T03642_02_002_02_V002.h5"]
>>> asset = "gedi-local"
>>> rsps = gedi.gedi01bp(parms, asset=asset, resources=resources)