#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <grass/gis.h>
Go to the source code of this file.
Defines | |
#define | PRECISION 30 |
#define | THRESHOLD .0000000000000000000000000000005 |
Functions | |
int | G_write_colors (char *name, char *mapset, struct Colors *colors) |
write map layer color table | |
int | G__write_colors (FILE *fd, struct Colors *colors) |
#define PRECISION 30 |
Definition at line 22 of file color_write.c.
#define THRESHOLD .0000000000000000000000000000005 |
Definition at line 23 of file color_write.c.
int G__write_colors | ( | FILE * | fd, | |
struct Colors * | colors | |||
) |
int G_write_colors | ( | char * | name, | |
char * | mapset, | |||
struct Colors * | colors | |||
) |
write map layer color table
The color table is written for the raster file 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 |
Definition at line 76 of file color_write.c.
References G__name_is_fully_qualified(), G__write_colors(), G_fopen_new(), G_mapset(), and G_remove().