PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ rtpg_colormap_arg_init()

static rtpg_colormap_arg rtpg_colormap_arg_init ( )
static

Definition at line 4057 of file rtpg_mapalgebra.c.

4057  {
4058  rtpg_colormap_arg arg = NULL;
4059 
4060  arg = palloc(sizeof(struct rtpg_colormap_arg_t));
4061  if (arg == NULL) {
4062  elog(ERROR, "rtpg_colormap_arg: Could not allocate memory for function arguments");
4063  return NULL;
4064  }
4065 
4066  arg->raster = NULL;
4067  arg->nband = 1;
4068  arg->band = NULL;
4069  arg->bandstats = NULL;
4070 
4071  arg->colormap = palloc(sizeof(struct rt_colormap_t));
4072  if (arg->colormap == NULL) {
4073  elog(ERROR, "rtpg_colormap_arg: Could not allocate memory for function arguments");
4074  return NULL;
4075  }
4076  arg->colormap->nentry = 0;
4077  arg->colormap->entry = NULL;
4078  arg->colormap->ncolor = 4; /* assume RGBA */
4079  arg->colormap->method = CM_INTERPOLATE;
4080  arg->nodataentry = -1;
4081 
4082  arg->entry = NULL;
4083  arg->nentry = 0;
4084  arg->element = NULL;
4085  arg->nelement = 0;
4086 
4087  return arg;
4088 }
rt_colormap_entry entry
Definition: librtcore.h:2497
enum rt_colormap_t::@9 method
uint16_t nentry
Definition: librtcore.h:2496

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: