PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ rtpg_colormap_arg_init()

static rtpg_colormap_arg rtpg_colormap_arg_init ( )
static

Definition at line 3996 of file rtpg_mapalgebra.c.

3996  {
3997  rtpg_colormap_arg arg = NULL;
3998 
3999  arg = palloc(sizeof(struct rtpg_colormap_arg_t));
4000  if (arg == NULL) {
4001  elog(ERROR, "rtpg_colormap_arg: Could not allocate memory for function arguments");
4002  return NULL;
4003  }
4004 
4005  arg->raster = NULL;
4006  arg->nband = 1;
4007  arg->band = NULL;
4008  arg->bandstats = NULL;
4009 
4010  arg->colormap = palloc(sizeof(struct rt_colormap_t));
4011  if (arg->colormap == NULL) {
4012  elog(ERROR, "rtpg_colormap_arg: Could not allocate memory for function arguments");
4013  return NULL;
4014  }
4015  arg->colormap->nentry = 0;
4016  arg->colormap->entry = NULL;
4017  arg->colormap->ncolor = 4; /* assume RGBA */
4018  arg->colormap->method = CM_INTERPOLATE;
4019  arg->nodataentry = -1;
4020 
4021  arg->entry = NULL;
4022  arg->nentry = 0;
4023  arg->element = NULL;
4024  arg->nelement = 0;
4025 
4026  return arg;
4027 }
rt_colormap_entry entry
Definition: librtcore.h:2649
enum rt_colormap_t::@12 method
uint16_t nentry
Definition: librtcore.h:2648

References rtpg_colormap_arg_t::band, rtpg_colormap_arg_t::bandstats, rtpg_colormap_arg_t::colormap, rtpg_colormap_arg_t::element, rt_colormap_t::entry, rtpg_colormap_arg_t::entry, rt_colormap_t::method, rtpg_colormap_arg_t::nband, rt_colormap_t::ncolor, rtpg_colormap_arg_t::nelement, rt_colormap_t::nentry, rtpg_colormap_arg_t::nentry, rtpg_colormap_arg_t::nodataentry, and rtpg_colormap_arg_t::raster.

Referenced by RASTER_colorMap().

Here is the caller graph for this function: