Hi,
I'm trying to download GEDI images form earthdata, but I receive 302 redirects when doing this. I was wondering if I need to do something differently for this server. Here is an example in curl of what I want to achieve
curl -H "Authorization: Bearer <token>" https://e4ftl01.cr.usgs.gov/GEDI/GEDI02_B.002/2020.01.21/GEDI02_B_2020021003434_O06273_01_T01164_02_003_01_V002.h5.xml
Would be great if you could give me some pointers, thanks!
Downloading GEDI data from e4ftl01.cr.usgs.gov results in 302 redirects
-
- Subject Matter Expert
- Posts: 71
- Joined: Tue Nov 12, 2019 4:02 pm America/New_York
- Been thanked: 3 times
Re: Downloading GEDI data from e4ftl01.cr.usgs.gov results in 302 redirects
@cgrotz ,
I'm still looking into why the 'curl' option is not working. In the meantime, would you be willing to try 'wget' (https://www.gnu.org/software/wget/) instead? I've been able to successfully download your link and the .h5 data link with wget. An example wget call is below:
You'll want to create a '.netrc' file first with you Earthdata Login username and password and store the file in your home directory (e.g., c:/Users/<User-Name>). The contents in the file should look like this:
machine urs.earthdata.nasa.gov
login EDL_USERNAME
password EDL_PASSWORD
Here is a link some additional general info about netrc files: https://www.labkey.org/Documentation/wiki-page.view?name=netrc
I'm still looking into why the 'curl' option is not working. In the meantime, would you be willing to try 'wget' (https://www.gnu.org/software/wget/) instead? I've been able to successfully download your link and the .h5 data link with wget. An example wget call is below:
Code: Select all
wget https://e4ftl01.cr.usgs.gov//GEDI_L1_L2/GEDI/GEDI02_B.002/2021.11.23/GEDI02_B_2021327182847_O16701_03_T07848_02_003_01_V002.h5
machine urs.earthdata.nasa.gov
login EDL_USERNAME
password EDL_PASSWORD
Here is a link some additional general info about netrc files: https://www.labkey.org/Documentation/wiki-page.view?name=netrc