forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparms_flags.txt
131 lines (94 loc) · 4.27 KB
/
parms_flags.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
GRASS: Module parameters concept
All GRASS modules should use a standardized scheme.
Collected idead below.
1)
Date: Sun, 26 Nov 2000 20:34:55 -0800
From: "Eric G . Miller" <egm2 jps.net>
Subject: [GRASSLIST:1195] Re: [GRASS5] Re: notation standardisation
As follow-up, I also think we should use the same parameter names used
by g.list, g.copy, g.remove, etc. when input/output aren't appropriate.
So we have "rast", "vect", "sites", "icon", "labels", "region", "group",
and "3dview" to use (and maybe "dspf" ?).
Rule of thumb [proposed]:
1. If the module takes a single input and produces a single output, then
use input=[name] and output=[name].
2. If the module just performs some action, but doesn't produce an
output different from the input, then use the input "types" parameter
"name" (i.e. "rast", "vect", etc...).
3. If the module has multiple inputs or outputs, then attempt to use the
parameter names above if possible, else parameter names are left up
to the author. So, If I had a module that took a raster and a vector
and produced a raster, it's parameters could be:
r.something rast=[name] vect=[name] output=[name]
However, with some modules, there's more than one input or output of
a single "type", so then each name should be descriptive of what its
function is.
I don't know that we ever resolved the issue of addressing sites
attributes. Basically we have something like:
"east", "north", "dim", "cat", "decimal", and "string";
for attribute names. For the "index", I don't know; maybe just "index"
when there's only one to be specified, otherwise "zindex" for "dim",
"dindex" for decimal and "sindex" for string??? I know I'm guilty of
not being consistent here.
NOTE: I'd like to get some kind of simple attribute database implemented
in GRASS, but so far I haven't found anything that we could just plug in
with a few tweaks. The closest might be the Xbase library, but it's C++
and I don't know how well Xbase files might support efforts at
localization in the future. Anyway, I bring this up, because
identifying attributes by "type" and "index" is really cumbersome.
--
Eric G. Miller <[email protected]>
------------------------------------------------
2) Here another rough concept (to be updated):
Import:
* file=name output=name for all raster, sites and vector modules
Export:
* input=name file=name for all raster, sites and vector modules
* export modules should *all* have an output= parameter, however they
should allow to specify "-" to write to stdout (for unix piping)
-> file is external file. Should be read from current directory, not
within mapset!
Display modules:
map= for all raster and vector modules,
file=name for modules that can read from stdin in the
"easting northing label" format.
Vector modules:
map= for map (no analysis modules)
input= output= for maps (analysis modules)
Raster modules:
input= output= for maps (analysis modules)
sometimes: elev=
Imagery modules:
input= output= for maps (analysis modules)
Sites modules:
map= for map (no analysis modules)
input= output= for maps (analysis modules)
sometimes: elev=
field Attribute field type to use for operation
options: dim,decimal,cat
default: decimal
findex Attribute field number to use for operation
default: 1
string String attribute number to use for description
default: 1
-> important: attribute field selection
Misc modules:
map= for map (no analysis modules)
input= output= for maps (analysis modules)
General modules:
[rast=old,new] [vect=old,new] [icon=old,new] [labels=old,new]
[sites=old,new] [region=old,new] [group=old,new] [3dview=old,new]
3D raster modules:
parameters following raster2d modules
Database modules
?
------------------------------------------------------------------
General proposal for import modules:
- flag -q quiet (default is verbose)
- flag -o overwrite (default is exit if out exists)
- support of new envvar: GRASS_AUTO_EXTEND_LOCATION (function is already
present in r.in.gdal -e, this should be moved to libgis and added to
all import modules)
- read from stdin with 'in=-' (for all import modules)
- add 'timestamp' parameter to import modules