[GRASS-dev] another not quiet GRASS command
Michael Barton
michael.barton at asu.edu
Mon Sep 3 22:36:05 EDT 2007
On 9/3/07 7:00 PM, "Hamish" <hamish_nospam at yahoo.com> wrote:
>
> when the rectifying target is the current mapset, can you test for that
> and just not run g.mapset at all? The fewer times g.mapset needs to be
> called the better..
>
I can test for this, but it's easier and cleaner to just make the change to
whatever the user wants.
For the georectifier, this is moot now, since g.mapset won't work. But I
guess you could consider it a general question/suggestion. It doesn't seem
to be an error if g.mapset does what it is supposed to and simply stays in
the current location/mapset because that is what the user instructed it to
do.
FWIW, here is what is going on with g.mapset (error/warning reporting
aside).
There is a custom selection tool that uses g.mapsets -p and g.mlist (I'd
prefer g.list, but need to have it output a simple, single column list) to
create a pull-down combo box with a hierarchical list of selectable maps
within each accessible mapset.
However, in spite of calling g.mapset before repopulating the combo box list
of values, it only shows maps in the old location/mapset. I don't know
whether this is a function of the object-oriented nature of Python (initial
instantiation of the control is somehow locked into the GISRC values that it
is called with) or something about the GRASS modules. I suspect the latter,
however, because when I use g.gisenv to reset location and mapset it all
works fine.
Glynn is suggesting creating a temporary GISRC file for all this. I'm not
yet sure how to go about this, but it should be pretty easy to plug in since
the location/mapset switch routines are all within a method that is called
as needed.
Thanks for the comments and thoughts
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
More information about the grass-dev
mailing list