Quellcode durchsuchen

r.cost: reorder options, the usual order is input-output

The main options input and output are always or almost always in
the order input-output not the other way aroud as it was here.
With output-input order, r.cost travel_time output=travel_cost caused:
ERROR: Option <output> does not accept multiple answers
ERROR: Required parameter <input> not set
Now the help says:
r.cost input=name output=name

Although we don't consider using unnamed parameter or order of parameters
part of API, https://trac.osgeo.org/grass/changeset/72720 which swapped input and output breaks any user
scripts, workflows or documentation which use the first unamed parameter.


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73144 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras vor 6 Jahren
Ursprung
Commit
292c067632
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      raster/r.cost/main.c

+ 2 - 2
raster/r.cost/main.c

@@ -170,12 +170,12 @@ int main(int argc, char *argv[])
 	  "geographic locations on an input raster map "
 	  "whose cell category values represent cost.");
 
-    opt1 = G_define_standard_option(G_OPT_R_OUTPUT);
-
     opt2 = G_define_standard_option(G_OPT_R_INPUT);
     opt2->description =
 	_("Name of input raster map containing grid cell cost information");
 
+    opt1 = G_define_standard_option(G_OPT_R_OUTPUT);
+
     opt_solve = G_define_standard_option(G_OPT_R_INPUT);
     opt_solve->key = "solver";
     opt_solve->required = NO;