iota2.common.file_utils
This module contains a lot of useful file manipulation functions
Functions
|
convert a numpy array to a gdal raster |
|
usage : wrapper around gdal_merge utility |
|
Convert a name to an otb piixel type :param string: the name to convert |
|
IN : csvPaths [string] : list of path to csv files ex : ["/path/to/file1.csv","/path/to/file2.csv"] OUT : out [list of lists] : containing csv's coordinates |
|
dateMin [string] : Ex -> 20160101 dateMax [string] > dateMin tr [int/string] -> temporal resolution |
|
detect csv delimiter |
|
Ensure that a named directory exists; if it does not, attempt to create it. |
|
search all files in a folder or sub folder which contains all names in their name |
|
get files by regEx |
|
IN: string [string]: string where we want to found a string in the string list 'allTiles' allTiles [list of strings] |
|
search string in file and replace by the new one into an output file |
|
IN: csv_f [list of list] : comes from conf_coordinates_csv function. |
|
get date from string date :type vardate: |
|
Get the min and max dates for the given tile. |
|
Get the min and max dates for the given tile. |
|
Get the min and max dates for the given tile. |
|
usage : get Feature Stack name :type list_indices: |
|
Get raster pixel type of raster_in from GetDataTypeName() :param INPUT: - raster_in: gdal raster datatse or osgeo.gdal.Dataset object :param OUTPUT: - GDAL raster pixel type: str |
|
|
|
|
|
usage : get available dates in file dateInFile [string] : path to txt containing one date per line raw_dates [bool] flag use to return all available dates |
|
Get raster extent of raster_in from GetGeoTransform() :param INPUT: - raster_in: input raster :param OUTPUT: - ex: extent with [minX,maxX,minY,maxY] |
|
usage get raster's number of bands |
|
usage get raster EPSG projection code |
|
IN : rasterIn [string]:path to raster |
|
ensure a directory is writable :type directory_path: |
|
return the md5 of a file :type fname: |
|
Return the memory usage :param unit: the expect unit for return ram (MB or GB) |
|
return geographical coordinates of col, row position |
|
Open raster and return metadate information about it. |
|
Launch a system command and raise an execption if fail |
|
Example 1: |
|
IN : InList [list] nbSplit [int] : number of output fold |
|
|
|
Check if a module can be imported |
|
|
|
write a new file |
Classes
|
decorator used to remove element in return list according to strings |
|
defaultdict(default_factory=None, /, [...]) --> dict with default factory |
|
Difference between two datetime values. |