-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue downloading LandSat 8 Collection 2 #45
Comments
I believe this error is due to the wrongly composed url used to query the data from the USGS API. Specifically, I found the data_product_ids specified in landsat/earthexplorer.py to cause the error. To me it seems as they have changed recently and being updated by @yannforget in a corresponding commit de530c1. But to query older products, the previously used data_product_ids are still necessary. By reimplementing them into earthexplorer.py I was able to download collection 2 data: At the beginning of earthexplorer.py...
... and at the end of the script...
This may also solve #42 Of course, once again the data_product_ids are hardcoded this way and the construction with a try-except-clause is pretty ugly and just a fast workaround. In the medium term it seems preferable to avoid hard-coding and query the data_product_id for each scene via the USGS API (also in case they change it a again some time). I guess the "dataset-metadata" or "dataset-get-customization" methods can be used for this purpose https://m2m.cr.usgs.gov/api/docs/reference/. I haven't found time to try and implement it yet, but feel free to pick it up from here. |
@fkroeber I made a couple of changes to the data_product_ids as they were not the original codes.
|
…See issues 42 and 45: yannforget#45 and yannforget#42
Hi, can you explain how should I make above changes in earthexplorer.py? I edited file in Notepad++ and saved it, but after importing module again, I still have issues with downloading Landsat 8 data. Code below. from landsatxplore.api import API scenes = api.search( ee.download('LC81610482020178LGN00', output_dir='F:/Studia') Thanks for help, |
Hi. I want to download Landsat 9 C2 L1 data. So what changes I need to make in earthexplorer.py? With the above mentioned changes I am successfully able to download Landsat 8 data. But here I am stuck with downloading of Landsat 9 data. |
Hi,I encountered an issue downloading LandSat 8 Collection 2 images with landsatxplore API. |
if still cannot solve this problem, it's advised to apply a proxy |
…ound multiple dataset ids This update is related to upstream issues yannforget#45, yannforget/landsatxplore/yannforget#92 and possibly others. First of all, I removed all collection 1 dataset and the Sentinel-2a dataset, which were decommissioned in the final weeks of 2022. Then I stumbled into the same issues pointed by @jacquesmoati and @HanDuwol, which were related to the dataset ids being hardcoded into earthexplorer.py rather than extracted from the response to some of the queries. Unfortunately, in order to get the correct dataset ids for each scene, it is not sufficient to have Earth Explorer credentials, but it is also necessary to have access to the API (which can be done here: https://ers.cr.usgs.gov/profile/access). This is due to the fact that the download-option function needed to obtain the dataset id as shown by @HanDuwol yannforget#92 (comment) is only available to approved users. Since it would be pointless to restrict the use of this Python library to approved users, I implemented a similar workaround as the one proposed by @fkroeber here yannforget#45 (comment), but in a slightly different way which I believe to be more compact and elegant.
Hi,with this change i can download data before 2023,but sitll connot download data after 2023,how can i solve it?thank u |
@Hanjx01 and others. For anyone not understanding what's happening here and who arrived from a search engine, there are some hardcoded url paths as others have mentioned and these need to be updated in time. However, there is also the fact that new data (2023, for example) is available for query but not available for download. This can be verified in the web app. |
Hello,
I encountered an issue downloading some LandSat 8 Collection 2 images with landsatxplore API.
The output / error written is :
I checked on usgs website (earth explorer) that the tile I am looking for is available.
Thank you for your help
The text was updated successfully, but these errors were encountered: