浏览代码

r.import extent=region bug fix (#404)

* r.import extent fix
AnikaBettge 5 年之前
父节点
当前提交
c7af150325
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      scripts/r.import/r.import.py

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

@@ -275,6 +275,10 @@ def main():
         if os.path.exists(path):
         if os.path.exists(path):
             grass.fatal(_("Input contains GCPs, rectification is required"))
             grass.fatal(_("Input contains GCPs, rectification is required"))
 
 
+    if 'r' in region_flag:
+        grass.run_command('g.remove', type="vector", flags="f",
+                          name=tgtregion)
+
     # switch to target location
     # switch to target location
     os.environ['GISRC'] = str(TGTGISRC)
     os.environ['GISRC'] = str(TGTGISRC)