[GRASS-user] managing mapsets in Python Scripts
Martin Landa
landa.martin at gmail.com
Tue Jun 22 07:39:39 EDT 2010
Hi,
2010/6/22 Monica Buescu <monicabuescu1985 at gmail.com>:
> 1- How can I define an image destination mapset? I mean should I first
> define mapset (g.mapset) and run my functions or should I define in output
> the image at target_MAPSET?
define target mapset as current using g.mapset. You have write access
only to the current mapset.
> 2- How can I retrieve the current mapset? What is the grass modules to
> perform this?
in bash:
eval `g.gisenv`
echo $MAPSET
in python
import grass.script as grass
grass.gisenv()['MAPSET']
Martin
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa
More information about the grass-user
mailing list