19 #include <grass/gis.h> 20 #include <grass/raster.h> 21 #include <grass/raster3d.h> 22 #include <grass/ogsf.h> 23 #include <grass/glocale.h> 37 struct Colors *colors;
40 G_warning(_(
"3D raster map <%s> not found"), name);
44 if (
NULL == (colors = (
struct Colors *)G_malloc(
sizeof(
struct Colors))))
47 if (0 > Rast3d_read_colors(name, mapset, colors)) {
67 Rast_free_colors(color_data);
86 Rast_get_f_color((FCELL *) value, &r, &g, &b, color_data);
87 return ((r & 0xff) | ((g & 0xff) << 8) | ((b & 0xff) << 16));
int Gvl_unload_colors_data(void *color_data)
Unload color table.
int Gvl_get_color_for_value(void *color_data, float *value)
Get color for value.
int Gvl_load_colors_data(void **color_data, const char *name)
Load color table.
const char * G_find_raster3d(const char *name, const char *mapset)
Search for a 3D raster map in current search path or in a specified mapset.
void G_free(void *buf)
Free allocated memory.
void G_warning(const char *msg,...)
Print a warning message to stderr.