Converting GEDI h5 to GeoJSON
Posted: Sun Jan 23, 2022 11:34 pm America/New_York
Dear GEDI team,
I am a PhD student working in Australia and would like to use GEDI data as environmental covariates in my occupancy models for long-term monitoring of specific aboreal mammal. I have downloaded the GEDI L2B version 2 for my region using Earthdata search following this video tutorial (https://lpdaac.usgs.gov/resources/e-lea ... n-studies/). The data was successfully downloaded (see attached screenshot earthdatasearch.jpg).
And then I would like to convert the granules to GeoJSON files so that I can retrieve the attribute tables. I followed this tutorial and python script (https://git.earthdata.nasa.gov/projects ... ter/browse), but at keep getting this error when executing the script (see attached screenshot OutOfIndexError.jpg).
Processing file: processed_GEDI02_B_2019108185228_O01971_01_T00922_02_003_01_V002.h5 (1/160)
Traceback (most recent call last):
File "GEDI_Subsetter.py", line 157, in <module>
lat = [l for l in beamSDS if sdsSubset[0] in l][0]
IndexError: list index out of range
I tried with both GeoJSON and bounding box as an argument of --roi but neither of them works. Could you please advise me where goes wrong?
Thank you in advance!
---------
Attached also the downloaded folder structure and the h5 files in the input directory (GEDI_files.png).
The codes I am using in the command prompt are as below:
conda create -n gedi -c conda-forge --yes python=3.7.9 h5py shapely geopandas pandas
cd C:\Users\jc745612\Desktop\GEDI\gedi-subsetter
activate gedi
python GEDI_Subsetter.py --dir "C:\Users\jc745612\Desktop\GEDI\gediwt_2" --roi map.geojson
python GEDI_Subsetter.py --dir "C:\Users\jc745612\Desktop\GEDI\gediwt_2" --roi '-16.8,144.1,-19.7,147.8'
I am a PhD student working in Australia and would like to use GEDI data as environmental covariates in my occupancy models for long-term monitoring of specific aboreal mammal. I have downloaded the GEDI L2B version 2 for my region using Earthdata search following this video tutorial (https://lpdaac.usgs.gov/resources/e-lea ... n-studies/). The data was successfully downloaded (see attached screenshot earthdatasearch.jpg).
And then I would like to convert the granules to GeoJSON files so that I can retrieve the attribute tables. I followed this tutorial and python script (https://git.earthdata.nasa.gov/projects ... ter/browse), but at keep getting this error when executing the script (see attached screenshot OutOfIndexError.jpg).
Processing file: processed_GEDI02_B_2019108185228_O01971_01_T00922_02_003_01_V002.h5 (1/160)
Traceback (most recent call last):
File "GEDI_Subsetter.py", line 157, in <module>
lat = [l for l in beamSDS if sdsSubset[0] in l][0]
IndexError: list index out of range
I tried with both GeoJSON and bounding box as an argument of --roi but neither of them works. Could you please advise me where goes wrong?
Thank you in advance!
---------
Attached also the downloaded folder structure and the h5 files in the input directory (GEDI_files.png).
The codes I am using in the command prompt are as below:
conda create -n gedi -c conda-forge --yes python=3.7.9 h5py shapely geopandas pandas
cd C:\Users\jc745612\Desktop\GEDI\gedi-subsetter
activate gedi
python GEDI_Subsetter.py --dir "C:\Users\jc745612\Desktop\GEDI\gediwt_2" --roi map.geojson
python GEDI_Subsetter.py --dir "C:\Users\jc745612\Desktop\GEDI\gediwt_2" --roi '-16.8,144.1,-19.7,147.8'