PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ rtpg_colormap_arg_init()

static rtpg_colormap_arg rtpg_colormap_arg_init ( )
static

Definition at line 4042 of file rtpg_mapalgebra.c.

4042  {
4043  rtpg_colormap_arg arg = NULL;
4044 
4045  arg = palloc(sizeof(struct rtpg_colormap_arg_t));
4046  if (arg == NULL) {
4047  elog(ERROR, "rtpg_colormap_arg: Could not allocate memory for function arguments");
4048  return NULL;
4049  }
4050 
4051  arg->raster = NULL;
4052  arg->nband = 1;
4053  arg->band = NULL;
4054  arg->bandstats = NULL;
4055 
4056  arg->colormap = palloc(sizeof(struct rt_colormap_t));
4057  if (arg->colormap == NULL) {
4058  elog(ERROR, "rtpg_colormap_arg: Could not allocate memory for function arguments");
4059  return NULL;
4060  }
4061  arg->colormap->nentry = 0;
4062  arg->colormap->entry = NULL;
4063  arg->colormap->ncolor = 4; /* assume RGBA */
4064  arg->colormap->method = CM_INTERPOLATE;
4065  arg->nodataentry = -1;
4066 
4067  arg->entry = NULL;
4068  arg->nentry = 0;
4069  arg->element = NULL;
4070  arg->nelement = 0;
4071 
4072  return arg;
4073 }
enum rt_colormap_t::@10 method
rt_colormap_entry entry
Definition: librtcore.h:2642
uint16_t nentry
Definition: librtcore.h:2641

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: