[GRASS-SVN] r46170 - grass-addons/raster/r.hazard.flood
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue May 3 12:23:10 EDT 2011
Author: madi
Date: 2011-05-03 09:23:10 -0700 (Tue, 03 May 2011)
New Revision: 46170
Modified:
grass-addons/raster/r.hazard.flood/r.hazard.flood.py
Log:
Managing non square pixels
Modified: grass-addons/raster/r.hazard.flood/r.hazard.flood.py
===================================================================
--- grass-addons/raster/r.hazard.flood/r.hazard.flood.py 2011-05-03 12:59:53 UTC (rev 46169)
+++ grass-addons/raster/r.hazard.flood/r.hazard.flood.py 2011-05-03 16:23:10 UTC (rev 46170)
@@ -62,7 +62,7 @@
# 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'])
+ resolution = (float(dict_region['nsres']) + float(dict_region['ewres']))/2
grass.message("Cellsize : %s " % resolution)
# Flow accumulation map MFD
More information about the grass-commit
mailing list