浏览代码

v.unpack: output table name cosmetics when only one table is linked to the map

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57122 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 年之前
父节点
当前提交
8aadc19a02
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      scripts/v.unpack/v.unpack.py

+ 4 - 1
scripts/v.unpack/v.unpack.py

@@ -139,7 +139,10 @@ def main():
             layer = values[0].split('/')[0]
             layer = values[0].split('/')[0]
             # we need to take care about the table name in case of several layer
             # we need to take care about the table name in case of several layer
             if options["output"]:
             if options["output"]:
-                to_table = "%s_%s"%(map_name, layer)
+                if len(dbnlist) > 1:
+                    to_table = "%s_%s" % (map_name, layer)
+                else:
+                    to_table = map_name
             else:
             else:
                 to_table = from_table
                 to_table = from_table