浏览代码

Fix files which were omitted in https://trac.osgeo.org/grass/changeset/40217

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40218 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 15 年之前
父节点
当前提交
d94b7d2a93
共有 3 个文件被更改,包括 4 次插入15 次删除
  1. 1 3
      imagery/i.atcorr/main.cpp
  2. 1 2
      raster/r.terraflow/main.cc
  3. 2 10
      raster/r.walk/main.c

+ 1 - 3
imagery/i.atcorr/main.cpp

@@ -96,9 +96,7 @@ static void adjust_region (char *name, const char *mapset)
 {
     struct Cell_head iimg_head;	/* the input image header file */
 
-    if(Rast_get_cellhd(name, mapset, &iimg_head) < 0) 
-	G_fatal_error (_("Unable to read header of raster map <%s>"),
-		       G_fully_qualified_name(name, mapset));
+    Rast_get_cellhd(name, mapset, &iimg_head);
 
     if(Rast_set_window(&iimg_head) < 0) 
 	G_fatal_error (_("Invalid graphics region coordinates"));

+ 1 - 2
raster/r.terraflow/main.cc

@@ -193,8 +193,7 @@ void check_header(char* cellname) {
   }
   /* read cell header */
   struct Cell_head cell_hd;
-  if (Rast_get_cellhd (cellname, mapset, &cell_hd) < 0)
-    G_fatal_error(_("Cannot read header of [%s]"), cellname);
+  Rast_get_cellhd (cellname, mapset, &cell_hd);
   
   /* check compatibility with module region */
   if (!((region->ew_res == cell_hd.ew_res)

+ 2 - 10
raster/r.walk/main.c

@@ -180,7 +180,6 @@ int main(int argc, char *argv[])
 
     /* Definition for dimension and region check */
     struct Cell_head dtm_cellhd, cost_cellhd;
-    int dtm_head_ok, cost_head_ok;
 
     G_gisinit(argv[0]);
 
@@ -544,15 +543,8 @@ int main(int argc, char *argv[])
     dtm_fd = Rast_open_old(dtm_layer, "");
     cost_fd = Rast_open_old(cost_layer, "");
 
-    dtm_head_ok = Rast_get_cellhd(dtm_layer, "", &dtm_cellhd) >= 0;
-    cost_head_ok = Rast_get_cellhd(cost_layer, "", &cost_cellhd) >= 0;
-
-    /*Reading headers from maps */
-
-    if (!dtm_head_ok)
-	G_fatal_error(_("Unable to read %s"), dtm_layer);
-    if (!cost_head_ok)
-	G_fatal_error(_("Unable to read %s"), cost_layer);
+    Rast_get_cellhd(dtm_layer, "", &dtm_cellhd);
+    Rast_get_cellhd(cost_layer, "", &cost_cellhd);
 
     /*Projection */