PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ _rti_colormap_arg_init()

static _rti_colormap_arg _rti_colormap_arg_init ( rt_raster  raster)
static

Definition at line 1458 of file rt_mapalgebra.c.

1458 {
1459 _rti_colormap_arg arg = NULL;
1460
1461 arg = rtalloc(sizeof(struct _rti_colormap_arg_t));
1462 if (arg == NULL) {
1463 rterror("_rti_colormap_arg_init: Could not allocate memory for _rti_color_arg");
1464 return NULL;
1465 }
1466
1467 arg->band = NULL;
1468 arg->nodataentry = NULL;
1469 arg->hasnodata = 0;
1470 arg->nodataval = 0;
1471
1472 if (raster == NULL)
1473 arg->raster = NULL;
1474 /* raster provided */
1475 else {
1476 arg->raster = rt_raster_clone(raster, 0);
1477 if (arg->raster == NULL) {
1478 rterror("_rti_colormap_arg_init: Could not create output raster");
1479 return NULL;
1480 }
1481 }
1482
1483 arg->nexpr = 0;
1484 arg->expr = NULL;
1485
1486 arg->npos = 0;
1487 arg->pos = NULL;
1488
1489 return arg;
1490}
void rterror(const char *fmt,...) __attribute__((format(printf
Wrappers used for reporting errors and info.
void * rtalloc(size_t size)
Wrappers used for managing memory.
Definition rt_context.c:191
rt_raster rt_raster_clone(rt_raster raster, uint8_t deep)
Clone an existing raster.
Definition rt_raster.c:1446
rt_colormap_entry nodataentry
rt_reclassexpr * expr

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

Here is the call graph for this function:
Here is the caller graph for this function: