GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-57a646b4a4
|
#include <grass/gis.h>
Go to the source code of this file.
Functions | |
const char * | G_find_raster (char *name, const char *mapset) |
Find a raster map. More... | |
const char * | G_find_raster2 (const char *name, const char *mapset) |
Find a raster map (look but don't touch) More... | |
const char* G_find_raster | ( | char * | name, |
const char * | mapset | ||
) |
Find a raster map.
Looks for the raster map name in the database. The mapset parameter can either be the empty string "", which means search all the mapsets in the user's current mapset search path (see Mapset_Search_Path for more details about the search path) or it can be a specific mapset name, which means look for the raster map only in this one mapset (for example, in the current mapset). If found, the mapset where the raster map lives is returned. If not found, the NULL pointer is returned.
Note: If the user specifies a fully qualified raster map which exists, then G_find_raster() modifies name by removing the "@<i>mapset</i>".
For example, to find a raster map anywhere in the database:
To check that the raster map exists in the current mapset:
[in,out] | name | map name |
mapset | mapset name or "" |
Definition at line 55 of file find_rast.c.
References G_debug(), G_find_file(), and name.
Referenced by I_iclass_init_group(), Rast__check_for_auto_masking(), Rast__mask_info(), Rast_get_cellhd(), Rast_get_vrt(), and Rast_mask_is_present().
const char* G_find_raster2 | ( | const char * | name, |
const char * | mapset | ||
) |
Find a raster map (look but don't touch)
The same as G_find_raster() but doesn't remove the "@<i>mapset</i>" qualification from name, if present.
Returns NULL if the map wasn't found, or the mapset the raster was found in if it was.
name | map name |
mapset | mapset name or "" |
Definition at line 76 of file find_rast.c.
References G_debug(), G_find_file2(), and name.
Referenced by IL_create_bitmask(), M_do_remove(), M_do_rename(), Rast__check_fp_type(), Rast__open_null_write(), Rast__open_old(), Rast_get_vrt(), Rast_map_is_fp(), and Rast_map_type().