[GRASS-dev] TclTk animator finished - replaces xganim

I finished updating the new TclTk animation module and committed it to the cvs. It does pretty much what xganim did, but with somewhat nicer interface. It also has several important improvements over xganim.

Enter up to 4 animation series “views”, following same format used by xganim

rast[1-n],rast2[1-n],…

where rast[1-n] refers to raster maps rast1,rast2,rast3,…,rastn

You can also enter maps in the format, not supported by xganim

rast1,rast2,rast3,…,rastn

An important improvement is that xganim currently will only actually work with a series of 10 maps, rast[0-9]. Because it seek only individual characters at the end of each map in the series, it cannot recognize numbers higher than the numerals 0-9. That is 11 is simply two ones. The TclTk animator WILL recognize these as numbers, so that you can animate a series of maps limited only by system capabilities.

As with xganim, single animation series will be displayed to fill the TclTk canvas window; a multi-view animation (up to 4 views) will divide the canvas into 4 subwindows with an animation series in each subwindow. Up to 4 simultaneous animations can be run.

Another improvement over xganim is that you can animate series with different numbers of frames simutaneously (e.g., a multi-view animation with a 100 frame animation in one subwindow and a 20 frame animation in another subwindow).

I’m not sure if the labels are working properly yet, but everything else seems to be. Give it a try and let me know if you run into any snags.

Michael


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

Excellent!

Could we have a script to launch it from command line, too, to
replace "xganim" in C? Then, if all functionality is covered, we
could deprecate the C version.

Markus

Michael Barton wrote:

I finished updating the new TclTk animation module and committed it to the
cvs. It does pretty much what xganim did, but with somewhat nicer
interface.
It also has several important improvements over xganim.

Enter up to 4 animation series "views", following same format used by
xganim

    rast[1-n],rast2[1-n],...

where rast[1-n] refers to raster maps rast1,rast2,rast3,...,rastn

You can also enter maps in the format, not supported by xganim

    rast1,rast2,rast3,...,rastn

An important improvement is that xganim currently will only actually work
with a series of 10 maps, rast[0-9]. Because it seek only individual
characters at the end of each map in the series, it cannot recognize
numbers
higher than the numerals 0-9. That is 11 is simply two ones. The TclTk
animator WILL recognize these as numbers, so that you can animate a series
of maps limited only by system capabilities.

As with xganim, single animation series will be displayed to fill the
TclTk
canvas window; a multi-view animation (up to 4 views) will divide the
canvas
into 4 subwindows with an animation series in each subwindow. Up to 4
simultaneous animations can be run.

Another improvement over xganim is that you can animate series with
different numbers of frames simutaneously (e.g., a multi-view animation
with
a 100 frame animation in one subwindow and a 20 frame animation in another
subwindow).

I'm not sure if the labels are working properly yet, but everything else
seems to be. Give it a try and let me know if you run into any snags.

Michael
__________________________________________
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

--
View this message in context: http://www.nabble.com/TclTk-animator-finished---replaces-xganim-tf4434005.html#a12650945
Sent from the Grass - Dev mailing list archive at Nabble.com.

Markus Neteler wrote:

Could we have a script to launch it from command line, too, to
replace "xganim" in C? Then, if all functionality is covered, we
could deprecate the C version.

anyone know what "xganim" stands for? X for X11 + g for GRASS + animate?

Why not call the new script d.animate rather than hold onto the old "x"?

It's not like xganim is a scriptable module and we need to preserve the
executable name. (ok r.game_of_life scripts it) For rigid brains we could add a
symlink to the name xganim for the rest of GRASS 6, or just leave xganim alone
and remove for GRASS 7.

anyhow, the new version needs to be as fast, featureful, and stable as the old
before we kill xganim, IMO.

Hamish

____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting

On Thu, Sep 13, 2007 at 02:21:43AM -0700, Hamish wrote:

Markus Neteler wrote:
> Could we have a script to launch it from command line, too, to
> replace "xganim" in C? Then, if all functionality is covered, we
> could deprecate the C version.

anyone know what "xganim" stands for? X for X11 + g for GRASS + animate?

Why not call the new script d.animate rather than hold onto the old "x"?

excellent idea...!

It's not like xganim is a scriptable module and we need to preserve the
executable name. (ok r.game_of_life scripts it) For rigid brains we could add a
symlink to the name xganim for the rest of GRASS 6, or just leave xganim alone
and remove for GRASS 7.

right.

anyhow, the new version needs to be as fast, featureful, and stable as the old
before we kill xganim, IMO.

Of course. But I am so much CLI oriented that I would like to
test from CLI (hopefully it is not impossible to wrap
gui/tcltk/gis.m/animate.tcl
into d.animate).

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

Cool! You forgot to mention that it also remove the last dependence on motif/lesstif, something non-linux systems probably don't have or need.

On Sep 13, 2007, at 2:03 AM, Michael Barton wrote:

I finished updating the new TclTk animation module and committed it to the cvs. It does pretty much what xganim did, but with somewhat nicer interface. It also has several important improvements over xganim.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole. Now what does that remind me of? Ah, yes - life."

- Marvin

As it currently is written, animate.tcl is not a stand-alone or scriptable
module. However, it could be. Glynn's original code closely mirrored xganim
and so could launch an animation display from a command-line implementation
with arguments of view=rast[1-n]...

I needed to take some of this code out in order to make this work with the
GUI and to make the functionality improvements and fixes I added.

However, I'm pretty sure that it would not be difficult to make it
scriptable for someone who understood better than I do BASH/TclTk
interaction.

The main thing that needs to be done is to start GmAnim::main (main display
window and controls) and pass a list of view parameters to
GmAnim::parse_viewmaps. The latter accepts a TclTk list in which each
element is the series of maps for an animation view. For example
{"rast[1-5]" "rast1,rast2,rast3" "rastB[1-10],rastC[1-4]"} for a 3 view
animation.

This is a somewhat different format than the original view1=... view2=...
but gets to the same place.

Michael

On 9/13/07 1:36 AM, "Markus Neteler" <neteler@itc.it> wrote:

Excellent!

Could we have a script to launch it from command line, too, to
replace "xganim" in C? Then, if all functionality is covered, we
could deprecate the C version.

Markus

Michael Barton wrote:

I finished updating the new TclTk animation module and committed it to the
cvs. It does pretty much what xganim did, but with somewhat nicer
interface.
It also has several important improvements over xganim.

Enter up to 4 animation series "views", following same format used by
xganim

    rast[1-n],rast2[1-n],...

where rast[1-n] refers to raster maps rast1,rast2,rast3,...,rastn

You can also enter maps in the format, not supported by xganim

    rast1,rast2,rast3,...,rastn

An important improvement is that xganim currently will only actually work
with a series of 10 maps, rast[0-9]. Because it seek only individual
characters at the end of each map in the series, it cannot recognize
numbers
higher than the numerals 0-9. That is 11 is simply two ones. The TclTk
animator WILL recognize these as numbers, so that you can animate a series
of maps limited only by system capabilities.

As with xganim, single animation series will be displayed to fill the
TclTk
canvas window; a multi-view animation (up to 4 views) will divide the
canvas
into 4 subwindows with an animation series in each subwindow. Up to 4
simultaneous animations can be run.

Another improvement over xganim is that you can animate series with
different numbers of frames simutaneously (e.g., a multi-view animation
with
a 100 frame animation in one subwindow and a 20 frame animation in another
subwindow).

I'm not sure if the labels are working properly yet, but everything else
seems to be. Give it a try and let me know if you run into any snags.

Michael
__________________________________________
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

__________________________________________
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

Michael Barton wrote:

I finished updating the new TclTk animation module and committed it to the
cvs. It does pretty much what xganim did, but with somewhat nicer interface.
It also has several important improvements over xganim.

Enter up to 4 animation series "views", following same format used by xganim

    rast[1-n],rast2[1-n],...

where rast[1-n] refers to raster maps rast1,rast2,rast3,...,rastn

You can also enter maps in the format, not supported by xganim

    rast1,rast2,rast3,...,rastn

This is supported by xganim; all of the view<n>= options have ->multiple=YES.

An important improvement is that xganim currently will only actually work
with a series of 10 maps, rast[0-9]. Because it seek only individual
characters at the end of each map in the series, it cannot recognize numbers
higher than the numerals 0-9. That is 11 is simply two ones.

It understands whatever the shell understands (it invokes "ls" via the
shell to expand wildcards). E.g. you can use "rast[0-9][0-9]" to match
rast00 through rast99 inclusive. If your maps have varying numbers of
digits, you can use multiple patterns, e.g.:

  view1=rast[0-9],rast[1-9][0-9]

to match rast0 through rast99 inclusive.

--
Glynn Clements <glynn@gclements.plus.com>

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]. Also, no leading 0's are needed to make the series
animate in the proper order.

Michael

On 9/13/07 9:00 AM, "Glynn Clements" <glynn@gclements.plus.com> wrote:

Michael Barton wrote:

I finished updating the new TclTk animation module and committed it to the
cvs. It does pretty much what xganim did, but with somewhat nicer interface.
It also has several important improvements over xganim.

Enter up to 4 animation series "views", following same format used by xganim

    rast[1-n],rast2[1-n],...

where rast[1-n] refers to raster maps rast1,rast2,rast3,...,rastn

You can also enter maps in the format, not supported by xganim

    rast1,rast2,rast3,...,rastn

This is supported by xganim; all of the view<n>= options have ->multiple=YES.

An important improvement is that xganim currently will only actually work
with a series of 10 maps, rast[0-9]. Because it seek only individual
characters at the end of each map in the series, it cannot recognize numbers
higher than the numerals 0-9. That is 11 is simply two ones.

It understands whatever the shell understands (it invokes "ls" via the
shell to expand wildcards). E.g. you can use "rast[0-9][0-9]" to match
rast00 through rast99 inclusive. If your maps have varying numbers of
digits, you can use multiple patterns, e.g.:

view1=rast[0-9],rast[1-9][0-9]

to match rast0 through rast99 inclusive.

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

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

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]".

I suggest that this is fixed sooner rather than later.

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.

--
Glynn Clements <glynn@gclements.plus.com>

Hi,

testing out animate.tcl, ran across a couple of issues,

Maps for Animation popup window:
- when adding a map the map name(s) always get ", " before them for the
   first map.

- why is there an Apply button?

- when I hit Ok I get this error:

ERROR: <res=0.0> ** invalid input **
ERROR: <res=0.0> ** invalid input **
    while executing
"exec g.region res=$pnmres"
    (procedure "GmAnim::switch_res" line 29)
    invoked from within
"GmAnim::switch_res 1"
    (procedure "GmAnim::load_files" line 47)
    invoked from within
"GmAnim::load_files"
    (procedure "GmAnim::do_run" line 29)
    invoked from within
"GmAnim::do_run"
    (procedure "GmAnim::parse_viewmaps" line 68)
    invoked from within
"GmAnim::parse_viewmaps $viewlist"
    (procedure "GmAnim::create_viewlist" line 33)
    invoked from within
"GmAnim::create_viewlist 1"
    ("uplevel" body line 1)
    invoked from within
"uplevel \#0 $cmd"
    (procedure "Button::_release" line 18)
    invoked from within
"Button::_release .animmaps_win.buttons.a"
    (command bound to event)

Main window- when I hit exit I get this error over and over and have to
use xkill to get rid of it (taking down gis.m too):

ERROR: <nsres=0> ** invalid input **
ERROR: <nsres=0> ** invalid input **
    while executing
"exec g.region nsres=$oldres1 ewres=$oldres2"
    (procedure "GmAnim::cmd_exit" line 19)
    invoked from within
"GmAnim::cmd_exit"
    (command bound to event)

?
Hamish

Michael Barton wrote:

I finished updating the new TclTk animation module and committed it to
the cvs. It does pretty much what xganim did, but with somewhat nicer
interface. It also has several important improvements over xganim.

One thing I have wanted in a GRASS animation tool is the ability to take
a 3D raster block and animate through the z-layers without having to do
run r3.to.rast first then remove all the sections after. Especially if the
z-axis represents a time-series. A more advanced version could slide
through the x or y axis, or, if you want to get really tricky, normal to
an arbitrary plane. Maybe the fancy stuff is better left for nviz cutting
planes and just try for the z-layers.

Hamish

On Sep 14, 2007, at 12:13 AM, Hamish wrote:

Michael Barton wrote:

I finished updating the new TclTk animation module and committed it to
the cvs. It does pretty much what xganim did, but with somewhat nicer
interface. It also has several important improvements over xganim.

One thing I have wanted in a GRASS animation tool is the ability to take
a 3D raster block and animate through the z-layers without having to do
run r3.to.rast first then remove all the sections after.

we have included few examples of such use of xganim in the new GRASS book -
I have found it very useful for pre-viewing the volume data in a quick and efficient way
before going into nviz - probably a script could be written to automate the procedure.
I have also used d.slide.show along with xganim. So a script - volume slicer? - that will
either slice through the volume using xganim or display the slices as a series of still slides
would be really useful

Helena

one of the (very simple) examples from the book using the nc_spm data
# create a volume
g.region rural_1m res3=3 t=132 b=102 tbres=2 -ap3
r.to.rast3elev -l soils_Kfactor elev=elev_lid792_1m out=soils_Kvol
r3.info soils_Kvol

# convert to horiz. slices and display
r3.to.rast soils_Kvol out=soils_Kvolslice
d.slide.show soils_Kvolslice
xganim view1="soils_Kvolslice*"

Especially if the
z-axis represents a time-series. A more advanced version could slide
through the x or y axis, or, if you want to get really tricky, normal to
an arbitrary plane. Maybe the fancy stuff is better left for nviz cutting
planes and just try for the z-layers.

Hamish

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Hamish,

Thanks for testing. Responses (sort of) below.

On 9/13/07 9:04 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:

Hi,

testing out animate.tcl, ran across a couple of issues,

Maps for Animation popup window:
- when adding a map the map name(s) always get ", " before them for the
   first map.

This is only supposed to happen if you already have a map in the entry box,
so you can add multiple maps. I'll see why it is doing this with the first
map.

- why is there an Apply button?

So you can set and change files to animate without closing the map select
window.

- when I hit Ok I get this error:

ERROR: <res=0.0> ** invalid input **
ERROR: <res=0.0> ** invalid input **

I don't know. Are you per chance working in a latlong region?

Michael

    while executing
"exec g.region res=$pnmres"
    (procedure "GmAnim::switch_res" line 29)
    invoked from within
"GmAnim::switch_res 1"
    (procedure "GmAnim::load_files" line 47)
    invoked from within
"GmAnim::load_files"
    (procedure "GmAnim::do_run" line 29)
    invoked from within
"GmAnim::do_run"
    (procedure "GmAnim::parse_viewmaps" line 68)
    invoked from within
"GmAnim::parse_viewmaps $viewlist"
    (procedure "GmAnim::create_viewlist" line 33)
    invoked from within
"GmAnim::create_viewlist 1"
    ("uplevel" body line 1)
    invoked from within
"uplevel \#0 $cmd"
    (procedure "Button::_release" line 18)
    invoked from within
"Button::_release .animmaps_win.buttons.a"
    (command bound to event)

Main window- when I hit exit I get this error over and over and have to
use xkill to get rid of it (taking down gis.m too):

ERROR: <nsres=0> ** invalid input **
ERROR: <nsres=0> ** invalid input **
    while executing
"exec g.region nsres=$oldres1 ewres=$oldres2"
    (procedure "GmAnim::cmd_exit" line 19)
    invoked from within
"GmAnim::cmd_exit"
    (command bound to event)

?
Hamish

__________________________________________
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

This would be really nice, but would require some very different kind of
programming.

Michael

On 9/13/07 9:13 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:

Michael Barton wrote:

I finished updating the new TclTk animation module and committed it to
the cvs. It does pretty much what xganim did, but with somewhat nicer
interface. It also has several important improvements over xganim.

One thing I have wanted in a GRASS animation tool is the ability to take
a 3D raster block and animate through the z-layers without having to do
run r3.to.rast first then remove all the sections after. Especially if the
z-axis represents a time-series. A more advanced version could slide
through the x or y axis, or, if you want to get really tricky, normal to
an arbitrary plane. Maybe the fancy stuff is better left for nviz cutting
planes and just try for the z-layers.

Hamish

__________________________________________
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

On 9/13/07 7:13 PM, "Glynn Clements" <glynn@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

HB:

> - why is there an Apply button?

MB:

So you can set and change files to animate without closing the map select
window.

Would you ever really do that in practice (selectively add/remove frames)?
To me 99% of the time Apply buttons seem like unneeded clutter & confusing. But
then I don't like to work with a half dozen windows open at the same time for a
single app., so maybe just a reflection of my preference. The "GPSMan" software
was aweful for this, and I've got similar issues with the tcl gis.m-- but no
better ideas about how to do it so I try to keep quiet about it. (Old version
of star|open office was annoying in the other extreme of everything in 1
window)

> - when I hit Ok I get this error:
>
> ERROR: <res=0.0> ** invalid input **
> ERROR: <res=0.0> ** invalid input **

I don't know. Are you per chance working in a latlong region?

simple XY (255 frames from r.game_of_life script)

| Projection: x,y
| N: 90 S: -90 Res: 0.01666512
| E: 180 W: -180 Res: 0.0166659
| Range of data: min = 0 max = 255

I tried another:

| Projection: x,y
| N: 90 S: -90 Res: 0.17578125
| E: 180 W: -180 Res: 0.28125
| Range of data: min = 0 max = 255

same thing.

then I tried an orthophoto with a res of 1m, and it loaded the image ok.

So resolutions less than 1 are being truncated/recast to 0??

Hamish

____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

Sounds like you found the problem. Somewhere I need to make a variable
float. I'll try to track it down.

Thanks much.

Michael

On 9/14/07 3:28 AM, "Hamish" <hamish_nospam@yahoo.com> wrote:

simple XY (255 frames from r.game_of_life script)

| Projection: x,y
| N: 90 S: -90 Res: 0.01666512
| E: 180 W: -180 Res: 0.0166659
| Range of data: min = 0 max = 255

I tried another:

| Projection: x,y
| N: 90 S: -90 Res: 0.17578125
| E: 180 W: -180 Res: 0.28125
| Range of data: min = 0 max = 255

same thing.

then I tried an orthophoto with a res of 1m, and it loaded the image ok.

So resolutions less than 1 are being truncated/recast to 0??

__________________________________________
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

On 9/13/07 10:58 PM, "Michael Barton" <michael.barton@asu.edu> wrote:

On 9/13/07 7:13 PM, "Glynn Clements" <glynn@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.

After sleeping on this, I think the best solution is (as often the case) to
have both kinds of syntax--a conceptually simpler kind rast(1-100) and still
allow the more complex but more flexible glob/regexp syntax for those who
understand and love it.

Are parens OK for this? I don't think we would normally expect them in map
names.

If we go back to the pattern match routine you originally used (with TclTk
string match) and combine it with my parsing of rast[1-n], this should be
doable.

The main problem I think I was having with a pure TclTk implementation of
this was not parsing the multicolumn format of g.list correctly. I can
switch to g.mlist for the moment and switch back to g.list when flat output
becomes available. The latter is preferable because it doesn't risk hitting
bashisms that won't run on Windows (i.e., in the g.mlist script).

I'll see what I can do over the weekend.

Michael

__________________________________________
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

On 9/14/07 3:28 AM, "Hamish" <hamish_nospam@yahoo.com> wrote:

HB:

- why is there an Apply button?

MB:

So you can set and change files to animate without closing the map select
window.

Would you ever really do that in practice (selectively add/remove frames)?
To me 99% of the time Apply buttons seem like unneeded clutter & confusing.
But
then I don't like to work with a half dozen windows open at the same time for
a
single app., so maybe just a reflection of my preference. The "GPSMan"
software
was aweful for this, and I've got similar issues with the tcl gis.m-- but no
better ideas about how to do it so I try to keep quiet about it. (Old version
of star|open office was annoying in the other extreme of everything in 1
window)

Of course I've only tested this with hypothetical data so far--though I'll
be using real simulation output in the next few days.

But it was actually testing and resting to make me think of a possible
workflow where "apply" is useful. For example...

Start animator
Look at rast1 - rast99 series output
How does that compare with the oldrast series?
Add oldrast1 - oldrast99 into view 2 and hit apply
Hmmm. Comparison looks interesting. But what is actually happening in
oldrast50 - oldrast75. It's too small in the multiview window to see.
Clear out the prior entries and just put oldrast[50-75] into view 1. Hit
apply.
OK. Now I see. Is the same thing happening in rast50 - rast75?
replace oldrast in view1 with rast[50-75]. Hit apply.

Without apply, you hit OK and the map selection window closes. Then you have
to reopen it and enter from scratch when you want to change something. I
could rename apply to OK and have a close button. However, the OK button is
like a combination of OK and close, and is a default that is activated when
you hit the return key, which is also handy sometimes.

Michael
__________________________________________
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

Hamish wrote:

Main window- when I hit exit I get this error over and over and have to
use xkill to get rid of it (taking down gis.m too):

ERROR: <nsres=0> ** invalid input **
ERROR: <nsres=0> ** invalid input **
    while executing
"exec g.region nsres=$oldres1 ewres=$oldres2"
    (procedure "GmAnim::cmd_exit" line 19)
    invoked from within
"GmAnim::cmd_exit"
    (command bound to event)

It should be using $WIND_OVERRIDE or $GRASS_REGION, *not* modifying
the WIND file.

--
Glynn Clements <glynn@gclements.plus.com>