|
@@ -23,8 +23,9 @@ int main(int argc, char *argv[])
|
|
{
|
|
{
|
|
char input[GNAME_MAX+8];
|
|
char input[GNAME_MAX+8];
|
|
char output[GNAME_MAX+8];
|
|
char output[GNAME_MAX+8];
|
|
|
|
+ char rules[GNAME_MAX+8];
|
|
char title[GPATH_MAX];
|
|
char title[GPATH_MAX];
|
|
- const char *args[5];
|
|
|
|
|
|
+ const char *args[6];
|
|
struct Popen child;
|
|
struct Popen child;
|
|
FILE *fp;
|
|
FILE *fp;
|
|
long old_min, old_max;
|
|
long old_min, old_max;
|
|
@@ -124,11 +125,14 @@ int main(int argc, char *argv[])
|
|
else
|
|
else
|
|
sprintf(title, "title=rescale of %s", old_name);
|
|
sprintf(title, "title=rescale of %s", old_name);
|
|
|
|
|
|
|
|
+ sprintf(rules, "rules=-");
|
|
|
|
+
|
|
args[0] = "r.reclass";
|
|
args[0] = "r.reclass";
|
|
args[1] = input;
|
|
args[1] = input;
|
|
args[2] = output;
|
|
args[2] = output;
|
|
args[3] = title;
|
|
args[3] = title;
|
|
- args[4] = NULL;
|
|
|
|
|
|
+ args[4] = rules;
|
|
|
|
+ args[5] = NULL;
|
|
|
|
|
|
fp = G_popen_write(&child, "r.reclass", args);
|
|
fp = G_popen_write(&child, "r.reclass", args);
|
|
|
|
|