[GRASS-SVN] r50060 - grass/trunk/scripts/r.tileset

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 4 08:26:48 EST 2012


Author: martinl
Date: 2012-01-04 05:26:48 -0800 (Wed, 04 Jan 2012)
New Revision: 50060

Modified:
   grass/trunk/scripts/r.tileset/r.tileset.py
Log:
r.tileset: don't fail when +to_meter is not defined

Modified: grass/trunk/scripts/r.tileset/r.tileset.py
===================================================================
--- grass/trunk/scripts/r.tileset/r.tileset.py	2012-01-04 13:22:57 UTC (rev 50059)
+++ grass/trunk/scripts/r.tileset/r.tileset.py	2012-01-04 13:26:48 UTC (rev 50060)
@@ -242,8 +242,12 @@
                                  flags = 'j')
         if not ret:
             grass.fatal(_('g.proj failed'))
-        
-        dest_scale = ret['+to_meter'].strip()
+
+        if '+to_meter' in ret:
+            dest_scale = ret['+to_meter'].strip()
+        else:
+            grass.warning(_("Scale (%s) not found, assuming '1'") % '+to_meter')
+            dest_scale = '1'
     else:
         dest_scale = options['destscale']
     grass.debug('Getting destination projection scale -> %s' % dest_scale)



More information about the grass-commit mailing list