|
GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <string.h>#include <stdlib.h>#include <stdio.h>#include <grass/gis.h>
Go to the source code of this file.
Functions | |
| int | G_write_colors (const char *name, const char *mapset, struct Colors *colors) |
| write map layer color table More... | |
| int | G__write_colors (FILE *fd, struct Colors *colors) |
| int G__write_colors | ( | FILE * | fd, |
| struct Colors * | colors | ||
| ) |
| int G_write_colors | ( | const char * | name, |
| const char * | mapset, | ||
| struct Colors * | colors | ||
| ) |
write map layer color table
The color table is written for the raster map name in the specified mapset from the colors structure. If there is an error, -1 is returned. No diagnostic is printed. Otherwise, 1 is returned. The colors structure must be created properly, i.e., G_init_colors to initialize the structure and G_add_color_rule to set the category colors.
| name | |
| mapset | |
| colors |
The rules are written out using floating-point format, removing trailing zeros (possibly producing integers). The flag marking the colors as floating-point is not written.
Definition at line 74 of file color_write.c.
References fclose(), fd, G__name_is_fully_qualified(), G__write_colors(), G_fopen_new(), G_mapset(), G_remove(), sprintf(), stat, xmapset, and xname.
Referenced by IL_output_2d(), and IL_resample_output_2d().