[GRASS-SVN] r58081 - grass/trunk/raster/r.topmodel
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Oct 20 17:14:26 PDT 2013
Author: hcho
Date: 2013-10-20 17:14:26 -0700 (Sun, 20 Oct 2013)
New Revision: 58081
Removed:
grass/trunk/raster/r.topmodel/misc.c
Log:
Removed misc.c
Deleted: grass/trunk/raster/r.topmodel/misc.c
===================================================================
--- grass/trunk/raster/r.topmodel/misc.c 2013-10-20 23:24:30 UTC (rev 58080)
+++ grass/trunk/raster/r.topmodel/misc.c 2013-10-21 00:14:26 UTC (rev 58081)
@@ -1,91 +0,0 @@
-#include "global.h"
-#include <grass/spawn.h>
-
-void gregion(void)
-{
- char *hdmap;
-
- hdmap = NULL;
- if (!flg.input) {
- hdmap = map.elev;
- }
- else {
- if (map.belev)
- hdmap = map.belev;
- else if (map.topidx)
- hdmap = map.topidx;
- }
-
- if (hdmap) {
- char buf[GPATH_MAX];
-
- sprintf(buf, "rast=%s", hdmap);
-
- G_verbose_message("g.region %s ...", buf);
-
- if (G_spawn("g.region", "g.region", buf, NULL) != 0)
- G_fatal_error("g.region failed");
- }
-}
-
-
-void depressionless(void)
-{
- char input[GPATH_MAX];
- char elev[GPATH_MAX];
- char dir[GPATH_MAX];
-
- sprintf(input, "input=%s", map.elev);
- sprintf(elev, "output=%s", map.fill);
- sprintf(dir, "outdir=%s", map.dir);
-
- G_verbose_message("r.fill.dir %s %s %s ...", input, elev, dir);
-
- if (G_spawn("r.fill.dir", "r.fill.dir", input, elev, dir, NULL) != 0)
- G_fatal_error("r.fill.dir failed");
-
- map.elev = map.fill;
-}
-
-
-void basin_elevation(void)
-{
- char buf[GPATH_MAX];
-
- sprintf(buf, "expression=%s = if(%s == 0 || isnull(%s), null(), %s)",
- map.belev, map.basin, map.basin, map.elev);
- G_verbose_message("r.mapcalc \"%s\" ...", buf);
-
- if (G_spawn("r.mapcalc", "r.mapcalc", buf, NULL) != 0)
- G_fatal_error("r.mapcalc failed");
-}
-
-
-void top_index(void)
-{
- char input[GPATH_MAX];
- char output[GPATH_MAX];
- char nsteps[32];
-
- if (map.belev) {
- sprintf(input, "input=%s", map.belev);
- sprintf(output, "output=%s", map.topidx);
-
- G_verbose_message("r.topidx %s %s ...", input, output);
-
- if (G_spawn("r.topidx", "r.topidx", input, output, NULL) != 0)
- G_fatal_error("r.topidx failed");
- }
-
- if (map.topidx) {
- sprintf(input, "input=%s", map.topidx);
- sprintf(output, "output=%s", file.idxstats);
- sprintf(nsteps, "nsteps=%d", misc.nidxclass);
-
- G_verbose_message("r.stats -Anc %s %s %s ...", input, output, nsteps);
-
- if (G_spawn("r.stats", "r.stats", "-Anc", input, output, nsteps, NULL) != 0)
- G_fatal_error("r.stats failed");
- }
-}
-
More information about the grass-commit
mailing list