Note: This document is for an older version of GRASS GIS that has been discontinued. You should upgrade, and read the current manual page.
The list of element names to search for is not fixed; any subdirectory of the mapset directory is a valid element name.
However, the user can find the list of standard GRASS element
names in the file $GISBASE/etc/element_list. This is the file
which g.remove, g.rename
and g.copy use to determine which files
need to be deleted/renamed/copied for a given entity type.
name='file_name' mapset='mapset_name' file='unix_filename' fullname='grass_fullname'
eval `g.findfile element=name mapset=name file=name`
eval `g.findfile element=cell file=elevation`
name= mapset= fullname= file=
if [ ! "$file" ] then exit 1 fi
Vector map example (including error message):
eval `g.findfile element=vector file="$G_OPT_V_INPUT"` if [ ! "$file" ] ; then g.message -e "Vector map <$G_OPT_V_INPUT> not found" exit 1 fi
Note: The Python tab in the wxGUI can be used for entering the following code:
import grass.script as gcore
gcore.find_file('elevation', element = 'cell')
Available at: g.findfile source code (history)
Latest change: Tuesday Dec 17 20:17:20 2024 in commit: d962e90c026708a4815ea2b9f46c0e84c17de22d
Main index | General index | Topics index | Keywords index | Graphical index | Full index
© 2003-2025 GRASS Development Team, GRASS GIS 8.4.3dev Reference Manual