浏览代码

temporal export: fixed export of datasets if where option is used

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67962 15284696-431f-4ddb-bdfa-cd5b030d7da7
Luca Delucchi 9 年之前
父节点
当前提交
f5dbb146e7
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      lib/python/temporal/stds_export.py

+ 3 - 1
lib/python/temporal/stds_export.py

@@ -335,7 +335,9 @@ def export_stds(input, output, compression, directory, where, format_="pack",
     if sp.is_time_relative():
         string += "%s=%s\n" % ("relative_time_unit",
                                sp.get_relative_time_unit())
-    string += "%s=%s\n" % ("number_of_maps", sp.metadata.get_number_of_maps())
+    # replace sp.metadata.get_number_of_maps() with len(rows)
+    # sp.metadata.get_number_of_maps() doesn't  work with where option
+    string += "%s=%s\n" % ("number_of_maps", len(rows))
     north, south, east, west, top, bottom = sp.get_spatial_extent_as_tuple()
     string += "%s=%s\n" % ("north", north)
     string += "%s=%s\n" % ("south", south)