Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • grass/branches/releasebranch_7_2/raster/r.in.xyz/main.c

    r70188 r70291  
    165165        _("Creates a raster map from an assemblage of many coordinates using univariate statistics.");
    166166
    167     input_opt = G_define_standard_option(G_OPT_F_INPUT);
     167    input_opt = G_define_standard_option(G_OPT_F_BIN_INPUT);
    168168    input_opt->description =
    169169        _("ASCII file containing input data (or \"-\" to read from stdin)");
    170170
    171171    output_opt = G_define_standard_option(G_OPT_R_OUTPUT);
    172 
     172   
    173173    method_opt = G_define_option();
    174174    method_opt->key = "method";
     
    180180    method_opt->answer = "mean";
    181181    method_opt->guisection = _("Statistic");
    182 
    183     type_opt = G_define_standard_option(G_OPT_R_TYPE);
    184     type_opt->required = NO;
    185     type_opt->answer = "FCELL";
     182    G_asprintf((char **)&(method_opt->descriptions),
     183               "n;%s;"
     184               "min;%s;"
     185               "max;%s;"
     186               "range;%s;"
     187               "sum;%s;"
     188               "mean;%s;"
     189               "stddev;%s;"
     190               "variance;%s;"
     191               "coeff_var;%s;"
     192               "median;%s;"
     193               "percentile;%s;"
     194               "skewness;%s;"
     195               "trimmean;%s",
     196               _("Number of points in cell"),
     197               _("Minimum value of point values in cell"),
     198               _("Maximum value of point values in cell"),
     199               _("Range of point values in cell"),
     200               _("Sum of point values in cell"),
     201               _("Mean (average) value of point values in cell"),
     202               _("Standard deviation of point values in cell"),
     203               _("Variance of point values in cell"),
     204               _("Coefficient of variance of point values in cell"),
     205               _("Median value of point values in cell"),
     206               _("Pth (nth) percentile of point values in cell"),
     207               _("Skewness of point values in cell"),
     208               _("Trimmed mean of point values in cell"));
    186209
    187210    delim_opt = G_define_standard_option(G_OPT_F_SEP);
     
    267290    vscale_opt->guisection = _("Advanced Input");
    268291
     292    type_opt = G_define_standard_option(G_OPT_R_TYPE);
     293    type_opt->required = NO;
     294    type_opt->answer = "FCELL";
     295    type_opt->guisection = _("Output");
     296
    269297    percent_opt = G_define_option();
    270298    percent_opt->key = "percent";
     
    282310    pth_opt->required = NO;
    283311    pth_opt->options = "1-100";
    284     pth_opt->description = _("pth percentile of the values");
     312    pth_opt->description = _("Pth percentile of the values");
    285313    pth_opt->guisection = _("Statistic");
    286314
     
    297325    scan_flag->key = 's';
    298326    scan_flag->description = _("Scan data file for extent then exit");
    299 
     327    scan_flag->guisection = _("Scan");
     328    scan_flag->suppress_required = YES;
     329   
    300330    shell_style = G_define_flag();
    301331    shell_style->key = 'g';
    302332    shell_style->description =
    303333        _("In scan mode, print using shell script style");
    304 
     334    shell_style->guisection = _("Scan");
     335    shell_style->suppress_required = YES;
     336       
    305337    skipline = G_define_flag();
    306338    skipline->key = 'i';
    307339    skipline->description = _("Ignore broken lines");
    308340
     341    G_option_required(output_opt, scan_flag, shell_style, NULL);
     342    G_option_requires(scan_flag, input_opt, NULL);
     343    G_option_requires(shell_style, input_opt, NULL);
     344   
    309345    if (G_parser(argc, argv))
    310346        exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.