[GRASS-dev] modules have problems with @mapset

Hamish hamish_b at yahoo.com
Fri Feb 15 06:18:31 EST 2008


Hamish:
> > The g.mapsets module insists on putting the current one first, I
> > suppose it is possible to hack the $MAPSET/SEARCH_PATH file
> > manaually to change the order, but I don't know why someone would
> > want to.
Glynn:
> AFAICT, g.mapsets adds the current mapset to the head of the search
> path if it isn't already in the path, but won't move it if it's
> elsewhere in the path.

I notice now that from the command line g.mapsets does give you more
control WRT mapset order than the GUI checkbox interface does.


[...]
> The main problem there is that the parser interface doesn't have any
> notion of "update in place", which is the situation for both
> v.db.addtable and v.rast.stats.
> 
> The maps to be updated can't be declared as "new", because they have
> to already exist. So, they're declared as "old", which means that the
> GUI thinks that they can be in any mapset, and uses qualified names.

One thing to consider is that these modules are not modifying the
vector maps per se (vertices and topology), they are modifying the
associated database tables. And DBs historically are designed to be
modified in place.

AFAIK the primary* modules which modify maps in place are d.rast.edit
and v.edit. Hmmm, actually that's wrong- d.rast.edit takes input= and
output=, so maybe it is just v.edit.

* I hesitate to say "only" due to the sheer number of oddball modules.


Back on the @mapset thing, I just found a bug in i.target when called
from the GUI.
Step 1: create a group with i.group.
Step 2: start the i.target tcltk module GUI. Select your group from
        the GUI folder picker. It shows up as group at currentmapset.
Step 3: choose your target location  & mapset, hit run.
Step 4: 'g.list groups'.

You will notice two groups, your original group and one called
"group at currentmapset" containing the new TARGET file.

As mentioned earlier re. i.smap: 
  imagery modules + @mapset = needs lots of cleanup work.


Hamish



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the grass-dev mailing list