Execute the osm2hydro script.
Usage:
osm2hydro.py -c inifilename [-E extent][-W working dir][-C caseFolder]
[-N caseName][-O osm_extract_file][-F osmfile]
-c inifilename
Optional (overrides the ini settings):
-E extent according to: [xmin, ymin, xmax, ymax]
-W working_directory
-C caseFolder
-N caseName
-O osm_extract_file
-F osmfile
osm2hydro generates hydrological and hydraulic model schematisations from OpenStreetMap data
Still under construction by Jaap Schellekens, Hessel Winsemius, Jan Talsma, Ferdinand Diermanse, Ruben Dahm, Reinder Brolsma and Daniel Tollenaar TODO: cleanup script, move stuff to functions
For osm2hydro, it is mandatory that GDAL version 1.10 or higher is installed.
Make a map with zeros and burned in values at locations where a line shape is present shapeFile: string - Shapefile with line elements that need to be burned mapFile: string - Target GeoTIFF map file that will be written in this step value: string - The value that should be burned into the map x: 1-D array - x-axis of target map y: 1-D array - y-axis of target map
Closes the logger
Gets a string from a config file (.ini) and returns a default value if the key is not found. If the key is not found it also sets the value with the default in the config-file
Sets a string in the in memory representation of the config object Deos NOT overwrite existing values if overwrite is set to False (default)
translateMap translates the tif formatted files from the srtm to PCRaster .map files origMap = your_map.tif transMap= your_map.map
Filters a shapefile based on a selection of and attribute/value attribute: string - indicating the attribute value: string - the value or comma-separated list of values of the attribute, filtered out origShape: strong - location of original shapefile transShape: string - location of target shapefile
Reads .ini file and sets default values if not present
projectMap projects a source map to a targetmap with defined srs src_proj = projection of source data trg_proj = projection of target data origMap = your_map.tif transMap= your_map.map
Read geographical file into memory
Prepares a list of files in location rootdir, with a suffix
input:
rootdir: string, path-name suffix: suffix of required files
output:
fileList: list-strings, file paths and names
Reduces resolution of a map (contained by x-axis, y-axis and an array) to a user-defined target resolution. This is done by a convolution and then picking one value per the amount of required resolution values.
given a list of (commandString, process), remove those that have completed and return the result
Runs a list of processes deviding over maxCpu
Set-up the logging system. Exit if this fails
input:
logfilename: string, referring to the logfile logReference: string, referring to reference used in log lines
Print usage information
@param args: command line arguments given
Write geographical data into file