浏览代码

r.buildvrt: check if all input maps are NULL-only (#2220)

Do not continue if all input raster maps only contain no-data.

Fixes 2217
Markus Neteler 3 年之前
父节点
当前提交
f540063831
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      raster/r.buildvrt/main.c

+ 3 - 1
raster/r.buildvrt/main.c

@@ -219,6 +219,8 @@ int main(int argc, char *argv[])
     	}
 	num_inputs = j;
     }
+    if (num_inputs == 0)
+	G_fatal_error(_("All input maps only contain NULL, cannot continue"));
 
     qsort(inputs, num_inputs, sizeof(struct input), cmp_wnd);
 
@@ -261,7 +263,7 @@ int main(int argc, char *argv[])
 	if (strcmp(nsresstr, tnsresstr) != 0)
 	    G_warning(_("Input ns resolutions are different"));
 	if (strcmp(ewresstr, tewresstr) != 0)
-	    G_warning(_("Input ns resolutions are different"));
+	    G_warning(_("Input ew resolutions are different"));
 
 	if (cellhd.north < p->cellhd.north)
 	    cellhd.north = p->cellhd.north;