[GRASS-SVN] r71412 - grass/trunk/scripts/r.import

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 19 08:23:37 PDT 2017


Author: annakrat
Date: 2017-08-19 08:23:37 -0700 (Sat, 19 Aug 2017)
New Revision: 71412

Modified:
   grass/trunk/scripts/r.import/r.import.html
   grass/trunk/scripts/r.import/r.import.py
Log:
r.import: include r.in.gdal r flag to limit region, see #3374

Modified: grass/trunk/scripts/r.import/r.import.html
===================================================================
--- grass/trunk/scripts/r.import/r.import.html	2017-08-19 14:24:02 UTC (rev 71411)
+++ grass/trunk/scripts/r.import/r.import.html	2017-08-19 15:23:37 UTC (rev 71412)
@@ -127,12 +127,7 @@
 r.univar -e bioclim01
 </pre></div>
 
-<h2>KNOWN ISSUES</h2>
 
-The option <b>extent</b>=<em>region</em> only works when the dataset has a
-different projection than the current location (i.e., internally
-<a href="r.proj.html">r.proj</a> is invoked).
-
 <h2>SEE ALSO</h2>
 
 <em>

Modified: grass/trunk/scripts/r.import/r.import.py
===================================================================
--- grass/trunk/scripts/r.import/r.import.py	2017-08-19 14:24:02 UTC (rev 71411)
+++ grass/trunk/scripts/r.import/r.import.py	2017-08-19 15:23:37 UTC (rev 71412)
@@ -215,10 +215,13 @@
     additional_flags = 'l' if flags['l'] else ''
     if flags['o']:
         additional_flags += 'o'
+    region_flag = ''
+    if options['extent'] == 'region':
+        region_flag += 'r'
     if flags['o'] or grass.run_command('r.in.gdal', input=GDALdatasource, flags='j',
                                        errors='status', quiet=True) == 0:
         parameters = dict(input=GDALdatasource, output=output,
-                          memory=memory, flags='k' + additional_flags)
+                          memory=memory, flags='k' + additional_flags + region_flag)
         if bands:
             parameters['band'] = bands
         try:



More information about the grass-commit mailing list