Skip to content

Instantly share code, notes, and snippets.

@Kalimaha
Created November 3, 2014 13:21
Show Gist options
  • Save Kalimaha/e071dd50e77c13311c0f to your computer and use it in GitHub Desktop.
Save Kalimaha/e071dd50e77c13311c0f to your computer and use it in GitHub Desktop.
Downloader Test
from geobricks_downloader.download.downloader import Downloader
from geobricks_modis.core.modis_core import list_layers_countries_subset
# Filters
product = 'MCD12Q1'
year = '2001'
day = '001'
country = '0'
# Get the list of layers through the Geobricks MODIS plug-in
layers_to_be_downloaded = list_layers_countries_subset(product, year, day, country)
# Target folder: MODIS layers will be downloaded here
target = {'target': '/home/kalimaha/Desktop/MODIS', 'product': product, 'year': year, 'day': day}
# Run the downloader
my_downloader = Downloader('modis', target, layers_to_be_downloaded, True)
my_downloader.download()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment