convertmodis module
Convert MODIS HDF file to GeoTiff file or create a HDF mosaic file for
several tiles using Modis Reprojection Tools.
Classes:
Functions:
-
pymodis.convertmodis.checkMRTpath(mrtpath)[source]
Function to check if MRT path it correct
Parameters: | mrtpath (str) – the path to MRT directory |
Returns: | The path to ‘bin’ and ‘data’ directory inside MRT path |
-
class pymodis.convertmodis.convertModis(hdfname, confile, mrtpath)[source]
A class to convert modis data from hdf to tif using resample
(from MRT tools)
Parameters: |
- hdfname (str) – the full path to the hdf file
- confile (str) – the full path to the paramater file
- mrtpath (str) – the full path to mrt directory which contains
the bin and data directories
|
-
executable()[source]
Return the executable of resample MRT software
-
run()[source]
Exec the convertion process
-
class pymodis.convertmodis.createMosaic(listfile, outprefix, mrtpath, subset=False)[source]
A class to convert several MODIS tiles into a mosaic
Parameters: |
- listfile (str) – the path to file with the list of HDF MODIS
file
- outprefix (str) – the prefix for output files
- mrtpath (str) – the full path to mrt directory which contains
the bin and data directories
- subset (str) – a string composed by 1 and 0 according with the
layer to mosaic. The string should something like
‘1 0 1 0 0 0 0’
|
-
executable()[source]
Return the executable of mrtmosaic MRT software
-
run()[source]
Exect the mosaic process
-
write_mosaic_xml()[source]
Write the XML metadata file for MODIS mosaic
-
class pymodis.convertmodis.processModis(hdfname, confile, mrtpath)[source]
A class to process raw modis data from hdf to tif using swath2grid
(from MRT Swath tools)
Parameters: |
- hdfname (str) – the full path to the hdf file
- confile (str) – the full path to the paramater file
- mrtpath (str) – the full path to mrt directory which contains
the bin and data directories
|
-
executable()[source]
Return the executable of resample MRT software
-
run()[source]
Exec the convertion process