args.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #include <grass/gis.h>
  2. #include <grass/glocale.h>
  3. #include "local_proto.h"
  4. void parse_args(struct opts *opt)
  5. {
  6. opt->reverse = G_define_flag();
  7. opt->reverse->key = 'r';
  8. opt->reverse->description =
  9. _("Reverse transformation; 3D vector features to 2D");
  10. opt->table = G_define_standard_flag(G_FLG_V_TABLE);
  11. opt->table->description = _("Do not copy attribute table");
  12. opt->input = G_define_standard_option(G_OPT_V_INPUT);
  13. opt->field = G_define_standard_option(G_OPT_V_FIELD_ALL);
  14. opt->field->guisection = _("Selection");
  15. opt->field->answer = "1";
  16. opt->type = G_define_standard_option(G_OPT_V_TYPE);
  17. opt->type->options = "point,line,boundary,centroid";
  18. opt->type->answer = "point,line,boundary,centroid";
  19. opt->type->guisection = _("Selection");
  20. opt->output = G_define_standard_option(G_OPT_V_OUTPUT);
  21. opt->column = G_define_standard_option(G_OPT_DB_COLUMN);
  22. opt->column->label = _("Name of attribute column used for height");
  23. opt->column->description =
  24. _("Can be used for reverse transformation, to store height of points");
  25. opt->column->guisection = _("Height");
  26. opt->height = G_define_option();
  27. opt->height->key = "height";
  28. opt->height->type = TYPE_DOUBLE;
  29. opt->height->required = NO;
  30. opt->height->multiple = NO;
  31. opt->height->description = _("Fixed height for 3D vector features");
  32. opt->height->guisection = _("Height");
  33. return;
  34. }