RHESSysWorkflows  1.33
Variables
GenerateCustomSoilDefinitions Namespace Reference

Variables

tuple parser = argparse.ArgumentParser(description='Generate soil texture map for dataset in GRASS GIS')
 
string help = 'The configuration file. Must define section "GRASS" and option "GISBASE"'
 
tuple args = parser.parse_args()
 
tuple cmdline = RHESSysMetadata.getCommandLine()
 
 configFile = None
 
tuple context = Context(args.projectDir, configFile)
 
tuple metadata = RHESSysMetadata.readRHESSysEntries(context)
 
tuple grassMetadata = RHESSysMetadata.readGRASSEntries(context)
 
tuple paramDbPath = os.path.join(context.projectDir, metadata['paramdb'])
 
tuple soilsRulePath = os.path.join(context.projectDir, metadata['soil_rule'])
 
tuple paths = RHESSysPaths(args.projectDir, metadata['rhessys_dir'])
 
tuple params = importlib.import_module('rhessys.params')
 
tuple paramConst = importlib.import_module('rhessys.constants')
 
tuple paramDB = params.paramDB(filename=paramDbPath)
 
tuple modulePath = context.config.get('GRASS', 'MODULE_PATH')
 
tuple moduleEtc = context.config.get('GRASS', 'MODULE_ETC')
 
tuple grassDbase = os.path.join(context.projectDir, metadata['grass_dbase'])
 
tuple grassConfig = GRASSConfig(context, grassDbase, metadata['grass_location'], metadata['grass_mapset'])
 
tuple grassLib = GRASSLib(grassConfig=grassConfig)
 
list soilRast = grassMetadata['soil_rast']
 
list demRast = grassMetadata['dem_rast']
 
tuple result = grassLib.script.run_command('r.mask', flags='r')
 
string soilReclassName = 'soil_reclass'
 
tuple pipe = grassLib.script.pipe_command('r.stats', flags='licn', input=soilReclassName)
 
dictionary rasterVals = {}
 
tuple paramsFound
 

Variable Documentation

tuple GenerateCustomSoilDefinitions.args = parser.parse_args()
tuple GenerateCustomSoilDefinitions.cmdline = RHESSysMetadata.getCommandLine()
GenerateCustomSoilDefinitions.configFile = None
tuple GenerateCustomSoilDefinitions.context = Context(args.projectDir, configFile)
list GenerateCustomSoilDefinitions.demRast = grassMetadata['dem_rast']
tuple GenerateCustomSoilDefinitions.grassConfig = GRASSConfig(context, grassDbase, metadata['grass_location'], metadata['grass_mapset'])
tuple GenerateCustomSoilDefinitions.grassDbase = os.path.join(context.projectDir, metadata['grass_dbase'])
tuple GenerateCustomSoilDefinitions.grassLib = GRASSLib(grassConfig=grassConfig)
tuple GenerateCustomSoilDefinitions.grassMetadata = RHESSysMetadata.readGRASSEntries(context)
string GenerateCustomSoilDefinitions.help = 'The configuration file. Must define section "GRASS" and option "GISBASE"'
tuple GenerateCustomSoilDefinitions.metadata = RHESSysMetadata.readRHESSysEntries(context)
tuple GenerateCustomSoilDefinitions.moduleEtc = context.config.get('GRASS', 'MODULE_ETC')
tuple GenerateCustomSoilDefinitions.modulePath = context.config.get('GRASS', 'MODULE_PATH')
tuple GenerateCustomSoilDefinitions.paramConst = importlib.import_module('rhessys.constants')
tuple GenerateCustomSoilDefinitions.paramDB = params.paramDB(filename=paramDbPath)
tuple GenerateCustomSoilDefinitions.paramDbPath = os.path.join(context.projectDir, metadata['paramdb'])
tuple GenerateCustomSoilDefinitions.params = importlib.import_module('rhessys.params')
tuple GenerateCustomSoilDefinitions.paramsFound
Initial value:
1 = paramDB.search(paramConst.SEARCH_TYPE_CONSTRAINED, None, key, None, None, None, None, None, None, None, None,
2  limitToBaseClasses=True, defaultIdOverride=rasterVals[key])
tuple GenerateCustomSoilDefinitions.parser = argparse.ArgumentParser(description='Generate soil texture map for dataset in GRASS GIS')
tuple GenerateCustomSoilDefinitions.paths = RHESSysPaths(args.projectDir, metadata['rhessys_dir'])
tuple GenerateCustomSoilDefinitions.pipe = grassLib.script.pipe_command('r.stats', flags='licn', input=soilReclassName)
dictionary GenerateCustomSoilDefinitions.rasterVals = {}
tuple GenerateCustomSoilDefinitions.result = grassLib.script.run_command('r.mask', flags='r')
list GenerateCustomSoilDefinitions.soilRast = grassMetadata['soil_rast']
string GenerateCustomSoilDefinitions.soilReclassName = 'soil_reclass'
tuple GenerateCustomSoilDefinitions.soilsRulePath = os.path.join(context.projectDir, metadata['soil_rule'])