[GRASS-dev] TclTk animator finished - replaces xganim

Michael Barton michael.barton at asu.edu
Fri Sep 14 01:58:35 EDT 2007




On 9/13/07 7:13 PM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> Michael Barton wrote:
> 
>> Thanks for clarifying this. It isn't described anywhere in the xganim docs,
>> so I was unable to get it to animate more than a few maps.
>> 
>> The parsing in the new TclTk module is still simpler. It will correctly
>> recognize rast[1-100].
> 
> That's an odd definition of "correct". Users are likely to expect
> [...] to follow glob/regexp semantics (match a single character from
> the set), so "rast[1-100]" should be equivalent to "rast[01]".

Command line Linux users and programmers who use glob/regexp semantics might
well expect this. Non-programmer users, especially of non-Linux platforms
probably will understand [1-100] as meaning from 1 to 100. In either case,
it needs to go into the docs so that a user will know how to specify maps
that end in 1 to 100

[1-100] or [1-9][0-9][0]

The latter is harder to explain in docs than the former to someone not
familiar with regexp--and even some of us familiar with it.

> 
> I suggest that this is fixed sooner rather than later.

The way it was, it had BASH commands (i.e., grep) to parse the output of
g.list, followed by a TclTk string match to find the maps that matched the
[n-n] pattern. I tried to use the matches as a validation routine, using
pure TclTk parsing, but was unable to get reliable matches and decided that
I probably didn't need to validate at that point because an invalid map
would be caught later.

I'm not convinced that a regexp syntax is easier for users to deal with. But
maybe it would be potentially less confusing to programmers if parentheses
instead of brackets were used. rast(1-100) instead of rast[1-100]?

Will the regexp pattern match syntax permit the use of * and correctly
handle maps whose number suffixes are padded with leading 0's? Or does it
just handle the bracketed character ranges?

Michael

> 
>> Also, no leading 0's are needed to make the series
>> animate in the proper order.
> 
> Whether or not leading zeros are required depends upon how the maps
> are named. A set which ends at rast99 could start at either rast0 or
> rast00; also, it's possible for the user to have two distinct sets
> named e.g. rast0 to rast9 and rast00 to rast99.

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-dev mailing list