RHESSysWorkflows  1.33
Namespaces | Variables
GenerateLandcoverMaps.py File Reference

Namespaces

 GenerateLandcoverMaps
 Import landcover raster maps into a GRASS location and generate landcover, road and impervious coverage maps.
 

Variables

tuple GenerateLandcoverMaps.parser = argparse.ArgumentParser(description='Generate landcover maps in GRASS GIS')
 
string GenerateLandcoverMaps.help = 'The configuration file. Must define section "GRASS" and option "GISBASE"'
 
tuple GenerateLandcoverMaps.args = parser.parse_args()
 
tuple GenerateLandcoverMaps.cmdline = RHESSysMetadata.getCommandLine()
 
 GenerateLandcoverMaps.configFile = None
 
tuple GenerateLandcoverMaps.context = Context(args.projectDir, configFile)
 
tuple GenerateLandcoverMaps.grassMetadata = RHESSysMetadata.readGRASSEntries(context)
 
tuple GenerateLandcoverMaps.metadata = RHESSysMetadata.readRHESSysEntries(context)
 
tuple GenerateLandcoverMaps.paramDbPath = os.path.join(context.projectDir, metadata['paramdb'])
 
tuple GenerateLandcoverMaps.roadRulePath = os.path.join(context.projectDir, metadata['landcover_road_rule'])
 
tuple GenerateLandcoverMaps.imperviousRulePath = os.path.join(context.projectDir, metadata['landcover_impervious_rule'])
 
tuple GenerateLandcoverMaps.landuseRulePath = os.path.join(context.projectDir, metadata['landcover_landuse_rule'])
 
tuple GenerateLandcoverMaps.stratumRulePath = os.path.join(context.projectDir, metadata['landcover_stratum_rule'])
 
 GenerateLandcoverMaps.laiRulePath = None
 
tuple GenerateLandcoverMaps.paths = RHESSysPaths(args.projectDir, metadata['rhessys_dir'])
 
tuple GenerateLandcoverMaps.params = importlib.import_module('rhessys.params')
 
tuple GenerateLandcoverMaps.paramConst = importlib.import_module('rhessys.constants')
 
tuple GenerateLandcoverMaps.paramDB = params.paramDB(filename=paramDbPath)
 
tuple GenerateLandcoverMaps.modulePath = context.config.get('GRASS', 'MODULE_PATH')
 
tuple GenerateLandcoverMaps.grassDbase = os.path.join(context.projectDir, metadata['grass_dbase'])
 
tuple GenerateLandcoverMaps.grassConfig = GRASSConfig(context, grassDbase, metadata['grass_location'], metadata['grass_mapset'])
 
tuple GenerateLandcoverMaps.grassLib = GRASSLib(grassConfig=grassConfig)
 
list GenerateLandcoverMaps.landcoverRast = grassMetadata['landcover_rast']
 
list GenerateLandcoverMaps.demRast = grassMetadata['dem_rast']
 
tuple GenerateLandcoverMaps.result = grassLib.script.run_command('r.mask', flags='r')
 
string GenerateLandcoverMaps.stratumRast = 'stratum'
 
tuple GenerateLandcoverMaps.pipe = grassLib.script.pipe_command('r.stats', flags='licn', input=stratumRast)
 
dictionary GenerateLandcoverMaps.rasterVals = {}
 
tuple GenerateLandcoverMaps.paramsFound
 
string GenerateLandcoverMaps.landuseRast = 'landuse'