PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ rtpg_colormap_arg_init()

static rtpg_colormap_arg rtpg_colormap_arg_init ( void  )
static

Definition at line 4160 of file rtpg_mapalgebra.c.

4160  {
4161  rtpg_colormap_arg arg = NULL;
4162 
4163  arg = palloc(sizeof(struct rtpg_colormap_arg_t));
4164  if (arg == NULL) {
4165  elog(ERROR, "rtpg_colormap_arg: Could not allocate memory for function arguments");
4166  return NULL;
4167  }
4168 
4169  arg->raster = NULL;
4170  arg->nband = 1;
4171  arg->band = NULL;
4172  arg->bandstats = NULL;
4173 
4174  arg->colormap = palloc(sizeof(struct rt_colormap_t));
4175  if (arg->colormap == NULL) {
4176  elog(ERROR, "rtpg_colormap_arg: Could not allocate memory for function arguments");
4177  return NULL;
4178  }
4179  arg->colormap->nentry = 0;
4180  arg->colormap->entry = NULL;
4181  arg->colormap->ncolor = 4; /* assume RGBA */
4182  arg->colormap->method = CM_INTERPOLATE;
4183  arg->nodataentry = -1;
4184 
4185  arg->entry = NULL;
4186  arg->nentry = 0;
4187  arg->element = NULL;
4188  arg->nelement = 0;
4189 
4190  return arg;
4191 }
rt_colormap_entry entry
Definition: librtcore.h:2700
uint16_t nentry
Definition: librtcore.h:2699
enum rt_colormap_t::@13 method

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: