yannforget / landsatxplore

Search and download Landsat scenes from EarthExplorer.
MIT License
217 stars 95 forks source link

Fixed dataset id and download options #110

Open bdnorman opened 1 year ago

bdnorman commented 1 year ago

From solution here https://github.com/yannforget/landsatxplore/issues/46

neteler commented 1 year ago

Hi @abhilashsinghimd and @MartinPontius, would you be willing to test this change?

MartinPontius commented 11 months ago

@neteler The commit in this PR is basically the same as this commit which was already merged in PR #97. So I think this PR can simply be closed without merge.

As mentioned in multiple issues, the principal problem here is that those hard-coded ids have to be updated from time to time manually. A cleaner and more elegant solution was described here. In short: the USGS/EROS Machine-to-Machine API should be used to obtain the correct download urls. However, as mentioned in PR #97 some (in this context important) API endpoints are restricted if users haven't specifically requested access to the M2M API. I haven't done so myself, so I can't use these endpoints. It might be possible to get the download urls with the download-retrieve endpoint alone which can be used without special access. At least I can see some datasets with download url in the response. Unfortunately, I don't have time at the moment to investigate this further.