[GRASS-dev] g.mapsets, print only accessible mapsets

Martin Landa landa.martin at gmail.com
Thu Mar 20 11:34:27 EDT 2008


2008/3/20, Glynn Clements <glynn at gclements.plus.com>:
>  > is there a way how to determine if a mapset is accessible without need
>  > to switch 'g.mapset name' -> 'ERROR: You don't have permission to use
>  > this mapset'. If not maybe new flag for g.mapsets would make sense?
>  >
>  > -a 'List all accessible mapsets'
> At the C level, G__mapset_permissions() and G__mapset_permissions2()
>  determines whether or not a specific mapset can be used as the current
>  mapset (i.e. it's a directory, and you own it).
>  AFAIK, there isn't a user command to determine this. If it's useful,
>  it really belongs in g.mapset rather than g.mapsets, as the former
>  deals with the current mapset (used for output) while the latter deals
>  with the mapsets used for input.

I think it would be useful, at least for creating list of mapsets in
GUI start-up screen. Currently is used 'g.mapsets -l' which prints all
mapsets in the location. I don't fully understand here, why g.mapsets
is not good place for that.

g.mapsets -l -> prints *all* mapsets
g.mapsets -a -> print only *accessible* mapset

At least this would be useful for GUI start-up screen (to disable not
accessible mapsets).


Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

More information about the grass-dev mailing list