[GRASS-user] r.hazard.flood does not respect region settings?

maning sambale emmanuel.sambale at gmail.com
Wed Mar 5 23:59:43 PST 2014


Hi,

I'm testing r.hazard.flood and noticed that it computes the flood and
mti layers on the full region of the elevation raster instead of the
pre-defined region settings.

The relvant code I found from the r.hazard.flood is this:
   # Detect cellsize of the DEM
    info_region = grass.read_command('g.region', flags = 'p', rast =
'%s' % (r_elevation))
    dict_region = grass.parse_key_val(info_region, ':')
    resolution = (float(dict_region['nsres']) + float(dict_region['ewres']))/2
    grass.message("Cellsize : %s " % resolution)

Would it be possible to either respect the current region settings or
add a flag to choose between the dem region settings or current region
settings?


-- 
cheers,
maning
------------------------------------------------------
"Freedom is still the most radical idea of all" -N.Branden
wiki: http://esambale.wikispaces.com/
blog: http://epsg4253.wordpress.com/
------------------------------------------------------


More information about the grass-user mailing list