find_cell.c File Reference

#include <grass/gis.h>

Include dependency graph for find_cell.c:

Go to the source code of this file.

Functions

char * G_find_cell (char *name, char *mapset)
 find a raster file
char * G_find_cell2 (char *name, char *mapset)


Function Documentation

char* G_find_cell ( char *  name,
char *  mapset 
)

find a raster file

Looks for the raster file 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,

Remarks:
{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 file only in this one mapset (for example, in the current mapset). If found, the mapset where the raster file lives is returned. If not found, the NULL pointer is returned. If the user specifies a fully qualified raster file which exists, then G_find_cell(~) modifies name by removing the "@<i>mapset</i>". For example, to find a raster file anywhere in the database:
  char name[GNAME_MAX];
  char *mapset;
  if ((mapset = G_find_cell(name,"")) = = NULL)
  // not found
To check that the raster file exists in the current mapset:
  char name[GNAME_MAX];
  if (G_find_cell(name,G_mapset( )) = = NULL)
  // not found
Parameters:
name 
mapset 
Returns:
char *

Definition at line 60 of file find_cell.c.

References G_find_file().

Referenced by G__check_for_auto_masking(), G__mask_info(), G__open_cell_old(), G_get_cellhd(), G_raster_map_is_fp(), and G_raster_map_type().

char* G_find_cell2 ( char *  name,
char *  mapset 
)

Definition at line 67 of file find_cell.c.

References G_find_file2().

Referenced by G_check_input_output_name().


Generated on Sun Apr 6 17:32:18 2008 for GRASS by  doxygen 1.5.5