[GRASS-dev] running v.surf.rst from GUI

Michael Barton michael.barton at asu.edu
Sun Mar 8 01:16:17 EST 2009



On Mar 7, 2009, at 11:05 PM, <grass-dev-request at lists.osgeo.org> wrote:

> Date: Sun, 8 Mar 2009 07:05:07 +0100
> From: Markus Neteler <neteler at osgeo.org>
> Subject: Re: [GRASS-dev] running v.surf.rst from GUI
> To: Helena Mitasova <hmitaso at unity.ncsu.edu>
> Cc: GRASS developers list <grass-dev at lists.osgeo.org>
> Message-ID:
> 	<86782b610903072205u57a3b2c1sfe1c8cf4ff6f319b at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Helena,
>
> On Sun, Mar 8, 2009 at 3:37 AM, Helena Mitasova <hmitaso at unity.ncsu.edu 
> > wrote:
>> Markus,
>>
>> thanks for getting back to me on this,
>>
>> v.surf.rst runs fine from the tcltk gui, it but has several  
>> problems in
>> wxpython gui
>> (this is for today's update of grass65):
>>
>> 1. It is really hard to find where to put the  name of the main  
>> output
>> "elevation"
>>  - it is not under tab "outputs" but it is under tab "optional"  
>> which has
>> several inputs
>> that you actually must define if you don't want to end up  
>> interpolating
>> category
>> numbers. The tab optional isn't visible, so you need to click on  
>> the arrow
>> to get to it.
>> I think the elevation should be under outputs
>
> I agree with you that it is hard to find (see screenshot attached).
> The reason is that in
> vector/v.surf.rst/main.c
> the entry
> parm.elev->guisection = _("Output_options");
> is not defined. But see for related WX bug below...
>
> Additionally:
> In the Tcl GUI you get the parameter name shown, too. Would it be
> possible to add that to the WX GUI, too? see attached screenshot
> for what I mean.
>
> Another suggestion: make the WX tabs consume less horizontal space
> to see one more tab in the default width.
>
>> 2. I was unable to change the layer number - it was stuck at 1
>
> I just see that the description says:
>    parm.field->description =
>        _("Field value. If set to 0, z coordinates are used. (3D  
> vector only)");
>
> will take out "Field" as it is called "layer".
>
>> (this may be problem with my installation or I am not clicking on  
>> it the
>> right way?, typing it in, deleting it did not work either), so  
>> there was no way
>> to interpolate the z-coordinate.
>
> I also don't see it. Seems to disappear somewhere. in the
> Tcl GUI it's present.
> I think that there is a bug for all parameters not having
> guisection defined. They should go into the "Optional" tab
> but they don't (they disappear apparently).
>
>> I think that the layer number should be under
>> input tab (required) - it is in fact required or you will end up
>> interpolating cats.
>
> Then we have to make it required in main.c
> The wx GUI is generated from what's defined there.
>
>> I would put column name there too, it is required for default layer  
>> 1,
>> otherwise cats
>> are interpolated. I do not find these defaults convenient but this  
>> was the
>> consensus by others when s.surf.rst was updated to v.surf.rst.
>
> Again, it depends on parm->guisection...
>
>> Otherwise the new GUI is really, really nice - I hope we will be  
>> able to
>> switch to it for the fall 2009 classes.
>>
>> Helena
>>
>> P.S. Any chance for changing default layer to 0 at least in grass7,
>> to make it possible to run just v.surf.rst mypoints elev=myelev  ?
>
> Why not - in 7 we are allowed to change the defaults.
> Just submit the change (please also check the html docs for update).
>
>> Without defining layer, it is set to 1 and category number is  
>> interpolated
>> by default if column is not defined - particularly unpleasant  
>> surprise
>> after running a longer computation. Layer number and column name  
>> can then be
>> under optional. I can make the change in grass7 if there are no  
>> objections
>> to see whether it will cause any problems.
>
> I don't see problems.

A further followup. As Markus suggests, the wxpython GUI, like the  
TclTk one, depends on the options in main.c to know where to place  
controls and what to make them.

One issue that has already come up in another module (v.surf.bspline)  
is using layer=0 to select the z values for interpolation. This is a  
shortcut that is not really correct. Vector layers must be in the  
range of 1-n. There is no layer 0. This is a problem for the  
autogenerated GUI dialogs. All layer arguments must be treated the  
same way. In most cases, layer=0 is meaningless and generates an  
error. However, in a few modules, layer=0 is a shortcut for using the  
z value for interpolation. We cannot have it both ways in an  
autogenerated GUI.

My suggestion is to add a -z flag to indicate that the z-coordinates  
will be used. This would override any other data used for z- 
coordinate. Then layer arguments could remain at 1-n for all modules.

Michael


More information about the grass-dev mailing list