PostGIS  2.1.10dev-r@@SVN_REVISION@@
static _rti_colormap_arg _rti_colormap_arg_init ( rt_raster  raster)
static

Definition at line 14861 of file rt_api.c.

References _rti_colormap_arg_t::band, _rti_colormap_arg_t::expr, _rti_colormap_arg_t::hasnodata, _rti_colormap_arg_t::nexpr, _rti_colormap_arg_t::nodataentry, _rti_colormap_arg_t::nodataval, _rti_colormap_arg_t::npos, _rti_colormap_arg_t::pos, _rti_colormap_arg_t::raster, rt_raster_clone(), rtalloc(), and rterror().

Referenced by rt_raster_colormap().

14861  {
14862  _rti_colormap_arg arg = NULL;
14863 
14864  arg = rtalloc(sizeof(struct _rti_colormap_arg_t));
14865  if (arg == NULL) {
14866  rterror("_rti_colormap_arg_init: Could not allocate memory for _rti_color_arg");
14867  return NULL;
14868  }
14869 
14870  arg->band = NULL;
14871  arg->nodataentry = NULL;
14872  arg->hasnodata = 0;
14873  arg->nodataval = 0;
14874 
14875  if (raster == NULL)
14876  arg->raster = NULL;
14877  /* raster provided */
14878  else {
14879  arg->raster = rt_raster_clone(raster, 0);
14880  if (arg->raster == NULL) {
14881  rterror("_rti_colormap_arg_init: Could not create output raster");
14882  return NULL;
14883  }
14884  }
14885 
14886  arg->nexpr = 0;
14887  arg->expr = NULL;
14888 
14889  arg->npos = 0;
14890  arg->pos = NULL;
14891 
14892  return arg;
14893 }
rt_reclassexpr * expr
Definition: rt_api.c:14853
uint16_t * pos
Definition: rt_api.c:14856
rt_raster raster
Definition: rt_api.c:14845
void * rtalloc(size_t size)
Raster core memory management functions.
Definition: rt_api.c:867
void rterror(const char *fmt,...)
Raster core error and info handlers.
Definition: rt_api.c:895
rt_raster rt_raster_clone(rt_raster raster, uint8_t deep)
Clone an existing raster.
Definition: rt_api.c:8740
rt_colormap_entry nodataentry
Definition: rt_api.c:14848

Here is the call graph for this function:

Here is the caller graph for this function: