[GRASS-SVN] r41108 - grass/trunk/vector/lidar/v.surf.bspline
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Feb 19 03:07:45 EST 2010
Author: mmetz
Date: 2010-02-19 03:07:44 -0500 (Fri, 19 Feb 2010)
New Revision: 41108
Modified:
grass/trunk/vector/lidar/v.surf.bspline/main.c
Log:
make wxGUI happy (backport from relbr r41106), and sync with v.surf.rst
Modified: grass/trunk/vector/lidar/v.surf.bspline/main.c
===================================================================
--- grass/trunk/vector/lidar/v.surf.bspline/main.c 2010-02-19 07:57:55 UTC (rev 41107)
+++ grass/trunk/vector/lidar/v.surf.bspline/main.c 2010-02-19 08:07:44 UTC (rev 41108)
@@ -63,7 +63,7 @@
struct GModule *module;
struct Option *in_opt, *in_ext_opt, *out_opt, *out_map_opt, *passoE_opt,
*passoN_opt, *lambda_f_opt, *type_opt, *dfield_opt, *col_opt;
- struct Flag *cross_corr_flag, *spline_step_flag, *z_flag;
+ struct Flag *cross_corr_flag, *spline_step_flag;
struct Reg_dimens dims;
struct Cell_head elaboration_reg, original_reg;
@@ -97,11 +97,6 @@
spline_step_flag->description =
_("Estimate point density and distance for the input vector points within the current region extends and quit");
- z_flag = G_define_flag();
- z_flag->key = 'z';
- z_flag->label = _("Use z coordinates of 3D vector");
- z_flag->guisection = _("Settings");
-
in_opt = G_define_standard_option(G_OPT_V_INPUT);
in_ext_opt = G_define_standard_option(G_OPT_V_INPUT);
@@ -153,7 +148,10 @@
lambda_f_opt->guisection = _("Settings");
dfield_opt = G_define_standard_option(G_OPT_V_FIELD);
- dfield_opt->answer = "-1";
+ dfield_opt->description =
+ _("If set to 0, z coordinates are used. (3D vector only)");
+ dfield_opt->answer = "0";
+ dfield_opt->gisprompt = "old_layer,layer,layer_zero";
dfield_opt->guisection = _("Settings");
col_opt = G_define_option();
@@ -161,7 +159,7 @@
col_opt->type = TYPE_STRING;
col_opt->required = NO;
col_opt->description =
- _("Attribute table column with numeric values to interpolate");
+ _("Attribute table column with values to interpolate (if layer>0)");
col_opt->guisection = _("Settings");
/*----------------------------------------------------------------*/
@@ -229,16 +227,12 @@
bspline_field = Vect_get_field_number(&In, dfield_opt->answer);
bspline_column = col_opt->answer;
- /* check availability of z values */
- if (z_flag->answer && !Vect_is_3d(&In)) {
- G_fatal_error(_("Input vector is not 3D, please specify layer and column to be used as z values"));
- }
- else if (!z_flag->answer) {
- if (bspline_field <= 0 || bspline_column == NULL)
- G_fatal_error(_("Need both vector layer and column for attributes as z values"));
- }
- if (z_flag->answer)
- bspline_field = -1;
+ /* check availability of z values
+ * column option overrrides 3D z coordinates */
+ if (!Vect_is_3d(&In) && (bspline_field <= 0 || bspline_column == NULL))
+ G_fatal_error(_("Need either 3D vector or layer and column with z values"));
+ if (bspline_field > 0 && bspline_column == NULL)
+ G_fatal_error(_("Layer but not column with z values given"));
/* Estimate point density and mean distance for current region */
if (spline_step_flag->answer) {
More information about the grass-commit
mailing list