[GRASS-user] Checking if a raster is in current MAPSET
Glynn Clements
glynn at gclements.plus.com
Fri Oct 15 12:49:07 EDT 2010
Monica Buescu wrote:
> Hum it sounds interesting. How can I parameterize it? I mean, what is the
> order of the parameters?
> help(grass.find_file)
Help on function find_file in module grass.script.core:
find_file(name, element='cell', mapset=None)
!Returns the output from running g.findfile as a
dictionary. Example:
\code
>>> result = grass.find_file('fields', element = 'vector')
>>> print result['fullname']
fields at PERMANENT
>>> print result['file']
/opt/grass-data/spearfish60/PERMANENT/vector/fields
\endcode
@param name file name
@param element element type (default 'cell')
@param mapset mapset name (default all mapsets in search path)
@return parsed output of g.findfile
> About the current mapset I'm already using it thanks :)
>
> PS- Where can I find a list of avaliable functions in grass.python?
> Monica
> import grass.script
> help(grass.script)
> help(grass.script.core)
...
Although reading the .py files in a text editor may be simpler.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list