[GRASS-dev] can wxPython GUI handle order of options for v.type
glynn at gclements.plus.com
Wed May 23 20:32:05 EDT 2007
> > > maybe use a wrapper script that has the possible combinations as
> > > flags?
> Michael Barton wrote:
> > Can't these just be options/flags for v.type? The user could set one
> > or more.
> This makes for a lot of flags.
> And how to set flags as mutually exclusive radio buttons not checkboxes?
> [ ] point -> centroid
> [*] centroid -> point
> [ ] line -> boundary
> [ ] boundary -> line
> [ ] kernel -> centroid
> [ ] centroid -> kernel
> [ ] face -> boundary
> [ ] boundary -> face
> [ ] kernel -> point
> [ ] point -> kernel
> [ ] face -> line
> [ ] line -> face
> or add two options:
> then testing of to/from compatibility in the code?
> I don't think allowing multiple operations in the same run is so clear.
Each type can only be converted at most once, so the most general case
is 6 x 3-way choices, i.e.
(*) point -> centroid
( ) point -> kernel
( ) point -> point (i.e. leave untouched)
(*) kernel -> centroid
( ) kernel -> point
( ) kernel -> kernel (i.e. leave untouched)
Multiple operations shouldn't be a problem; you just need to test the
original type, not the resulting type, so selecting both
point->centroid and centroid->kernel doesn't convert
IOW, a "case" statement or an if/else-if/else-if/else structure rather
than sequential "if" statements.
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev