A class to download MODIS data from NASA FTP repository
Check if a file already exists in the directory of download
listNewFile = list of all files, returned by getFilesList function
Check using GDAL to be sure that download was fine
filHdf = name of the HDF file to check
Close http connection
http = the http concention object created by urlib2.open
Connect to the server and fill the dirData variable
ncon = number maximum of test to connection at the server
Downloads tiles are in files_hdf_consider
Download the single file
filDown = name of the file to download
filHdf = name of the file to write
day = the day in format YYYY.MM.DD
Download the single file
filDown = name of the file to download
filSave = name of the file to write
Return newer version of a file
oldFile = one of the two similar file
newFile = one of the two similar file
Bases: HTMLParser.HTMLParser
A class to parse HTML
Return a date object from a string
string = text string to return date (2012-10-04)
Joins given arguments into a url. Trailing but not leading slashes are stripped for each argument. http://stackoverflow.com/a/11326230
Class to parse MODIS xml files, it also can create the parameter configuration file for resampling MODIS DATA with the MRT software or convertmodis Module
Create the parameter file to use with resample MRT software to create tif file
spectral = the spectral subset to be used, look the product table to understand the layer that you want use. For example:
- NDVI ( 1 1 1 0 0 0 0 0 0 0 0 0) copy only layer NDVI, EVI and QA VI the other layers are not used
- LST ( 1 1 0 0 1 1 0 0 0 0 0 0 ) copy only layer daily and nightly temperature and QA
res = the resolution for the output file, it must be set in the map unit of output projection system. The software will use the original resolution of input file if res it isn’t set
output = the output name, if it doesn’t set will use the prefix name of input hdf file
utm = the UTM zone if projection system is UTM
- resample = the type of resampling, the valid values are:
- NN (nearest neighbor)
- BI (bilinear)
- CC (cubic convolution)
- projtype = the output projection system, the valid values are:
- AEA (Albers Equal Area)
- ER (Equirectangular)
- GEO (Geographic Latitude/Longitude)
- HAM (Hammer)
- ISIN (Integerized Sinusoidal)
- IGH (Interrupted Goode Homolosine)
- LA (Lambert Azimuthal)
- LCC (LambertConformal Conic)
- MERCAT (Mercator)
- MOL (Mollweide)
- PS (Polar Stereographic)
- SIN (Sinusoidal)
- UTM (Universal TransverseMercator)
- datum = the datum to use, the valid values are:
- NAD27
- NAD83
- WGS66
- WGS76
- WGS84
- NODATUM
projpar = a list of projection parameters, for more info check the Appendix C of MODIS reprojection tool user manual https://lpdaac.usgs.gov/content/download/4831/22895/file/mrt41_usermanual_032811.pdf
- bound = dictionary with the following keys:
- max_lat
- max_lon
- min_lat
- min_lon
Create the parameter file to use with resample MRT software to create tif file
sds = Name of band/s (Science Data Set) to resample
geoloc = Name geolocation file (example MOD3, MYD3)
res = the resolution for the output file, it must be set in the map unit of output projection system. The software will use the original resolution of input file if res it isn’t set
output = the output name, if it doesn’t set will use the prefix name of input hdf file
- sphere = Output sphere number. Valid options are:
- 0=Clarke 1866
- 1=Clarke 1880
- 2=Bessel
- 3=International 1967
- 4=International 1909
- 5=WGS 72
- 6=Everest
- 7=WGS 66
- 8=GRS1980/WGS 84
- 9=Airy
- 10=Modified Everest
- 11=Modified Airy
- 12=Walbeck
- 13=Southeast Asia
- 14=Australian National
- 15=Krassovsky
- 16=Hough
- 17=Mercury1960
- 18=Modified Mercury1968
- 19=Sphere 19 (Radius 6370997)
- 20=MODIS Sphere (Radius 6371007.181)
- resample = the type of resampling, the valid values are:
- NN (nearest neighbor)
- BI (bilinear)
- CC (cubic convolution)
- projtype = the output projection system, the valid values are:
- AEA (Albers Equal Area)
- ER (Equirectangular)
- GEO (Geographic Latitude/Longitude)
- HAM (Hammer)
- ISIN (Integerized Sinusoidal)
- IGH (Interrupted Goode Homolosine)
- LA (Lambert Azimuthal)
- LCC (LambertConformal Conic)
- MERCAT (Mercator)
- MOL (Mollweide)
- PS (Polar Stereographic),
- SIN ()Sinusoidal)
- UTM (Universal TransverseMercator)
utm = the UTM zone if projection system is UTM
projpar = a list of projection parameters, for more info check the Appendix C of MODIS reprojection tool user manual https://lpdaac.usgs.gov/content/download/4831/22895/file/mrt41_usermanual_032811.pdf
- bound = dictionary with the following keys:
- max_lat
- max_lon
- min_lat
- min_lon
Return the input files (InputGranule) used to process the considered file
A class to convert modis data from hdf to tif using resample (from MRT tools)
A class to convert several MODIS tiles into a mosaic