Earth Observing System Data And Information System¤
The Common Metadata Respository (CMR) API from Earth Observing System Data And Information System (EOSDIS) makes searching and retrieving of data from NASA programmatically possible.
Getting Access to the CRM API¤
-
An EarthData account is required to use the CRM API. You can create an account by registering here.
-
After the successfull creation of the account, login and generate a token via the wizard. Up to 2 tokens are possible.
Parameters¤
| Name | Type | Description |
|---|---|---|
out_dir |
str |
Output direcotry. If the directory already contains previously downloaded scenes, these are treated as cached and excluded from the download. |
collection |
str |
The collection to query. A list of all available collections can be found here. Use the full name of the collection, not the short name. |
start_date |
str |
Start date for temporal filtering. Date string muste be in format yyyy-mm-dd. |
end_date |
str |
End date for temporal filtering. Date string muste be in format yyyy-mm-dd.Default is None which meants until the present. |
shapefile_path |
str |
Path to a valid shapefile. Supported formats: .shp, .geojson, .kml, .gpkg. You can find shapefiles from sources like OSM Boundaries. This value is optional since there are global products out there.Default is None |
num_processes |
int |
Number of parallel downloads. Default is 1. |
Example¤
Python
from sipt.retrieval import EOSDIS
collection = 'MODIS/Terra Surface Reflectance Daily L2G Global 1km and 500m SIN Grid V061'
# Initialize the EOSDIS API
eosdis = EOSDIS("baerer_token")
# Start the download
eosdis.retrieve("./temp/src", collection, '2023-07-01', '2024-08-01', "path/to/your/shapefile.geojson", 4)