GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
get_cellhd.c File Reference

Raster library - Read raster map header. More...

#include <string.h>
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/raster.h>
#include <grass/glocale.h>
Include dependency graph for get_cellhd.c:

Go to the source code of this file.

Functions

void Rast_get_cellhd (const char *name, const char *mapset, struct Cell_head *cellhd)
 Read the raster header. More...
 

Detailed Description

Raster library - Read raster map header.

(C) 2001-2020 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.

Author
Original author CERL

Definition in file get_cellhd.c.

Function Documentation

◆ Rast_get_cellhd()

void Rast_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, G_fatal_error() is called.

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. Rast_get_cellhd(), upon reading reclass information will go read the cell header information for the referenced file. Only one reference is allowed.

Parameters
namename of map
mapsetmapset that map belongs to
[out]cellhdstructure to hold cell header info
Returns
void

Definition at line 41 of file get_cellhd.c.

References _, G__read_Cell_head(), G_fatal_error(), G_find_raster(), G_fopen_old(), GMAPSET_MAX, GNAME_MAX, name, and Rast_is_reclass().

Referenced by Rast__check_for_auto_masking(), Rast__open_old(), and Rast_get_vrt().