GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
GIS library - Read raster map header. More...
#include <string.h>
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
int | G_get_cellhd (const char *name, const char *mapset, struct Cell_head *cellhd) |
Read the raster header. More... | |
GIS library - Read raster map header.
(C) 2001-2008 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file get_cellhd.c.
int G_get_cellhd | ( | const char * | name, |
const char * | mapset, | ||
struct Cell_head * | cellhd | ||
) |
Read the raster header.
The raster header for the raster map name in the specified mapset is read into the cellhd structure. If there is an error reading the raster header file, a diagnostic message is printed and -1 is returned. Otherwise, 0 is returned.
Note:a warning message for errors encountered.
Cell header files may contain either grid cell header information or reclass information. If it is a reclass file, it will specify the map and mapset names of the actual grid cell file being reclassed. G_get_cellhd(), upon reading reclass information will go read the cell header information for the referenced file. Only one reference is allowed.
name | name of map |
mapset | mapset that map belongs to |
cellhd | structure to hold cell header info |
Definition at line 45 of file get_cellhd.c.
References buf, err, fclose(), fd, G__read_Cell_head(), G_find_cell(), G_fopen_old(), G_free(), G_is_reclass(), G_warning(), NULL, and sprintf().
Referenced by G__check_for_auto_masking(), G__open_cell_old(), and GS_load_att_map().