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

Definition at line 11086 of file rt_pg.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().

11086  {
11087  rtpg_colormap_arg arg = NULL;
11088 
11089  arg = palloc(sizeof(struct rtpg_colormap_arg_t));
11090  if (arg == NULL) {
11091  elog(ERROR, "rtpg_colormap_arg: Could not allocate memory for function arguments");
11092  return NULL;
11093  }
11094 
11095  arg->raster = NULL;
11096  arg->nband = 1;
11097  arg->band = NULL;
11098  arg->bandstats = NULL;
11099 
11100  arg->colormap = palloc(sizeof(struct rt_colormap_t));
11101  if (arg->colormap == NULL) {
11102  elog(ERROR, "rtpg_colormap_arg: Could not allocate memory for function arguments");
11103  return NULL;
11104  }
11105  arg->colormap->nentry = 0;
11106  arg->colormap->entry = NULL;
11107  arg->colormap->ncolor = 4; /* assume RGBA */
11108  arg->colormap->method = CM_INTERPOLATE;
11109  arg->nodataentry = -1;
11110 
11111  arg->entry = NULL;
11112  arg->nentry = 0;
11113  arg->element = NULL;
11114  arg->nelement = 0;
11115 
11116  return arg;
11117 }
uint16_t nentry
Definition: rt_api.h:2410
rt_raster raster
Definition: rt_pg.c:11071
rt_colormap colormap
Definition: rt_pg.c:11076
rt_bandstats bandstats
Definition: rt_pg.c:11074
enum rt_colormap_t::@15 method
rt_colormap_entry entry
Definition: rt_api.h:2411

Here is the caller graph for this function: