[GRASS-SVN] r62836 - grass/branches/releasebranch_7_0/scripts/r.reclass.area
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Nov 20 03:08:55 PST 2014
Author: neteler
Date: 2014-11-20 03:08:55 -0800 (Thu, 20 Nov 2014)
New Revision: 62836
Modified:
grass/branches/releasebranch_7_0/scripts/r.reclass.area/r.reclass.area.py
Log:
r.reclass.area: minor code cleanup of location check
Modified: grass/branches/releasebranch_7_0/scripts/r.reclass.area/r.reclass.area.py
===================================================================
--- grass/branches/releasebranch_7_0/scripts/r.reclass.area/r.reclass.area.py 2014-11-20 11:07:25 UTC (rev 62835)
+++ grass/branches/releasebranch_7_0/scripts/r.reclass.area/r.reclass.area.py 2014-11-20 11:08:55 UTC (rev 62836)
@@ -191,14 +191,12 @@
diagonal = flags['d']
islesser = False
+ # check for unsupported locations
in_proj = grass.parse_command('g.proj', flags='g')
-
- # check non supported location
if in_proj['unit'].lower() == 'degree':
- grass.fatal(_("Latitude-Longitude locations are not supported"))
+ grass.fatal(_("Latitude-longitude locations are not supported"))
if in_proj['name'].lower() == 'xy_location_unprojected':
grass.fatal(_("xy-locations are not supported"))
- grass.fatal(_("Need projected data with grids in metric units"))
# check lesser and greater parameters
if not lesser and not greater:
@@ -229,9 +227,11 @@
TMPRAST.reverse() # reclassed map first
for mapp in TMPRAST:
if METHOD == 'rmarea':
- grass.run_command("g.remove", type='vect', name=mapp, quiet=True, flags='f')
+ grass.run_command("g.remove", flags='f', type='vect', name=mapp,
+ quiet=True)
else:
- grass.run_command("g.remove", type='rast', name=mapp, quiet=True, flags='f')
+ grass.run_command("g.remove", flags='f', type='rast', name=mapp,
+ quiet=True)
if __name__ == "__main__":
options, flags = grass.parser()
More information about the grass-commit
mailing list