[GRASS-user] Checking if a raster is in current MAPSET

Glynn Clements glynn at gclements.plus.com
Fri Oct 15 09:59:37 EDT 2010


Monica Buescu wrote:

> I have a Py script where I do some processing. But, I want to limit it to
> the files that are available in my current mapset. How can I do this? I
> mean, I just to evaluate if the input is in the current/active MAPSET?

grass.script.find_file() is a wrapper for g.findfile. Either check the
returned mapset or use the mapset= argument. You can use
grass.script.gisenv() to determine the current mapset.

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


More information about the grass-user mailing list