Skip to content

Commit a7d19a5

Browse files
ninsblneteler
authored andcommitted
r.geomorphon: combine profile parser rules to allow usage as pygrass module (OSGeo#2154)
* combine profile parser rules * let coords require profilesettings * relax parser rules even more * remove defaults and add back parser rules * adjust manual * reactivate r.geomorphon test Co-authored by: Denis Ovsienko <[email protected]>
1 parent 21ce30d commit a7d19a5

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

.gunittest.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ exclude =
1717
python/grass/temporal/testsuite/unittests_temporal_raster_algebra_equal_ts.py
1818
python/grass/temporal/testsuite/unittests_temporal_raster_conditionals_complement_else.py
1919
raster/r.contour/testsuite/testrc.py
20-
raster/r.geomorphon/testsuite/test_r_geom.py
2120
raster/r.in.gdal/testsuite/test_r_in_gdal.py
2221
raster/r.in.lidar/testsuite/test_base_resolution.sh
2322
raster/r.in.lidar/testsuite/test_base_resolution.sh

raster/r.geomorphon/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,22 +178,22 @@ int main(int argc, char **argv)
178178

179179
par_profiledata = G_define_standard_option(G_OPT_F_OUTPUT);
180180
par_profiledata->key = "profiledata";
181-
par_profiledata->answer = "-";
182181
par_profiledata->required = NO;
183182
par_profiledata->description =
184183
_("Profile output file name (\"-\" for stdout)");
185184
par_profiledata->guisection = _("Profile");
186185
G_option_requires(par_profiledata, par_coords, NULL);
186+
G_option_requires(par_coords, par_profiledata, NULL);
187187

188188
par_profileformat = G_define_option();
189189
par_profileformat->key = "profileformat";
190190
par_profileformat->type = TYPE_STRING;
191191
par_profileformat->options = "json,yaml,xml";
192-
par_profileformat->answer = "json";
193192
par_profileformat->required = NO;
194193
par_profileformat->description = _("Profile output format");
195194
par_profileformat->guisection = _("Profile");
196195
G_option_requires(par_profileformat, par_coords, NULL);
196+
G_option_requires(par_coords, par_profileformat, NULL);
197197

198198
if (G_parser(argc, argv))
199199
exit(EXIT_FAILURE);

raster/r.geomorphon/r.geomorphon.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,9 @@ <h3>Forms represented by geomorphons:</h3>
101101
and it includes assorted values describing the computation context and
102102
parameters, as well as its intermediate and final results.</DD>
103103
<DT><b>profileformat</b></DT>
104-
<DD>Format of the profile data: "json" (the default),
105-
"yaml" or "xml".</DD>
104+
<DD>Format of the profile data: "json", "yaml" or "xml".</DD>
106105
</DL>
107-
<P><em>NOTE: parameters below are very experimental. The usefulness of these parameters are currently under investigation.</em></P>
106+
<P><em>NOTE: parameters below are experimental. The usefulness of these parameters are currently under investigation.</em></P>
108107
<DL>
109108
<DT><b>intensity</b></DT>
110109
<DD>returns avarage difference between central cell of geomorphon and eight cells in visibility neighbourhood. This parameter shows local (as is visible) exposition/abasement of the form in the terrain.</DD>

0 commit comments

Comments
 (0)