Download satellite data from EarthExplorer (especially for Sentinel-2 data)
Require python landsatxplorer
package. You can just install by:
pip install landsatxplore
This package provides an API that can download satellite data form USGS EarthExplorer.
However, EarthExplorer has changed the data sent to the server with POST while login. Hence, we may need to make some revision in the POST stage from the package.
- Find "earthxplorer.py" (Usually, this file will be in "C:\Users\user\conda\Lib\site-packages\landsatxplore\earthexplorer.py"
- In line39, 43, 44, which mentioned about "
ncform
" should be commented. And in line 46, "ncform
" should also be commented (See figure below).
Go to USGS EarthExplorer, select all the image that you would like to download, then click to export Metadata.
Fill in your "Export Name
", and select "CSV
" for "Export Format
". After a period of time, you will get a CSV file that contains all the metadata of your selection.
Before download form USGS EarthExplorer, you need to sign in with your account.
Follow the instruction that shows up while running. Fill in the CSV file path and your Username and Password, then continue running the next cells to download satellite images.