GRASS 8 Programmer's Manual 8.6.0dev(2026)-1878fdfec5
Loading...
Searching...
No Matches
put_cellhd.c
Go to the documentation of this file.
1/*!
2 * \file lib/raster/put_cellhd.c
3 *
4 * \brief Raster Library - Write raster header.
5 *
6 * SPDX-FileCopyrightText: 2001-2009 GRASS Development Team
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 *
9 * \author Original author CERL
10 */
11
12#include <grass/gis.h>
13#include <grass/glocale.h>
14
15/*!
16 \brief Writes the raster file header.
17
18 Writes the cell file header information associated with map layer "map"
19 into current mapset from the structure "cellhd".
20
21 \param name name of map
22 \param cellhd structure holding cell header info
23
24 \return void
25 */
26void Rast_put_cellhd(const char *name, struct Cell_head *cellhd)
27{
28 FILE *fp;
29
30 fp = G_fopen_new("cellhd", name);
31 if (!fp)
32 G_fatal_error(_("Unable to create header file for <%s>"), name);
33
34 G__write_Cell_head(fp, cellhd, 1);
35 fclose(fp);
36}
void G__write_Cell_head(FILE *, const struct Cell_head *, int)
Write cell header or window.
Definition wr_cellhd.c:25
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
FILE * G_fopen_new(const char *, const char *)
Open a new database file.
Definition gis/open.c:218
#define _(str)
Definition glocale.h:10
const char * name
Definition named_colr.c:6
void Rast_put_cellhd(const char *name, struct Cell_head *cellhd)
Writes the raster file header.
Definition put_cellhd.c:26
2D/3D raster map header (used also for region)
Definition gis.h:443