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

◆ rtpg_summarystats_arg_init()

static rtpg_summarystats_arg rtpg_summarystats_arg_init ( )
static

Definition at line 516 of file rtpg_statistics.c.

516 {
517 rtpg_summarystats_arg arg = NULL;
518
519 arg = palloc(sizeof(struct rtpg_summarystats_arg_t));
520 if (arg == NULL) {
521 elog(
522 ERROR,
523 "rtpg_summarystats_arg_init: Cannot allocate memory for function arguments"
524 );
525 return NULL;
526 }
527
528 arg->stats = (rt_bandstats) palloc(sizeof(struct rt_bandstats_t));
529 if (arg->stats == NULL) {
531 elog(
532 ERROR,
533 "rtpg_summarystats_arg_init: Cannot allocate memory for stats function argument"
534 );
535 return NULL;
536 }
537
538 arg->stats->sample = 0;
539 arg->stats->count = 0;
540 arg->stats->min = 0;
541 arg->stats->max = 0;
542 arg->stats->sum = 0;
543 arg->stats->mean = 0;
544 arg->stats->stddev = -1;
545 arg->stats->values = NULL;
546 arg->stats->sorted = 0;
547
548 arg->cK = 0;
549 arg->cM = 0;
550 arg->cQ = 0;
551
552 arg->band_index = 1;
554 arg->sample = 1;
555
556 return arg;
557}
#define TRUE
Definition dbfopen.c:73
struct rt_bandstats_t * rt_bandstats
Definition librtcore.h:151
static void rtpg_summarystats_arg_destroy(rtpg_summarystats_arg arg)
uint32_t count
Definition librtcore.h:2562
double * values
Definition librtcore.h:2570

References rtpg_summarystats_arg_t::band_index, rtpg_summarystats_arg_t::cK, rtpg_summarystats_arg_t::cM, rt_bandstats_t::count, rtpg_summarystats_arg_t::cQ, rtpg_summarystats_arg_t::exclude_nodata_value, rt_bandstats_t::max, rt_bandstats_t::mean, rt_bandstats_t::min, rtpg_summarystats_arg_destroy(), rt_bandstats_t::sample, rtpg_summarystats_arg_t::sample, rt_bandstats_t::sorted, rtpg_summarystats_arg_t::stats, rt_bandstats_t::stddev, rt_bandstats_t::sum, TRUE, and rt_bandstats_t::values.

Referenced by RASTER_summaryStats_transfn().

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