Quellcode durchsuchen

r.import: include r.in.gdal r flag to limit region, see https://trac.osgeo.org/grass/ticket/3374

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@71412 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová vor 7 Jahren
Ursprung
Commit
2e88a74848
2 geänderte Dateien mit 4 neuen und 6 gelöschten Zeilen
  1. 0 5
      scripts/r.import/r.import.html
  2. 4 1
      scripts/r.import/r.import.py

+ 0 - 5
scripts/r.import/r.import.html

@@ -127,11 +127,6 @@ r.info bioclim01
 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>
 

+ 4 - 1
scripts/r.import/r.import.py

@@ -215,10 +215,13 @@ def main():
     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: