PostGIS  2.2.7dev-r@@SVN_REVISION@@
static rtpg_colormap_arg rtpg_colormap_arg_init ( )
static

Definition at line 3995 of file rtpg_mapalgebra.c.

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().

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

Here is the caller graph for this function: