assert(NULL != band);
assert(cov_count > 1);
+ RASTER_DEBUGF(3, "cov_count = %d", cov_count);
if (band->offline) {
rterror("rt_band_get_summary_stats not implemented yet for OFFDB bands");
if (!(i % 2)) {
qll->algeq = 1;
qll->tau = (uint64_t) ROUND(cov_count - (cov_count * qll->quantile), 0);
+ if (qll->tau < 1) qll->tau = 1;
}
/* AL-GT */
else {
quantile_llist_destroy(&qlls, qlls_count);
if (quantiles_count) pfree(quantiles);
+ covquant2 = palloc(sizeof(struct rt_quantile_t) * count);
+ for (i = 0; i < count; i++) {
+ covquant2[i].quantile = covquant[i].quantile;
+ covquant2[i].value = covquant[i].value;
+ }
+ pfree(covquant);
+ covquant = covquant2;
+
POSTGIS_RT_DEBUGF(3, "%d quantiles returned", count);
/* Store needed information */
CHECK(quantile);
CHECK(count);
CHECK((qlls_count > 0));
- quantile_llist_destroy(&qlls, qlls_count);
CHECK(FLT_EQ(quantile[0].value, 78));
+ rtdealloc(quantile);
+ quantile_llist_destroy(&qlls, qlls_count);
+ qlls = NULL;
+ qlls_count = 0;
+
+ quantile = (rt_quantile) rt_band_get_quantiles_stream(
+ band, 1, 1, 60,
+ &qlls, &qlls_count,
+ NULL, 0,
+ &count);
+ CHECK(quantile);
+ CHECK(count);
+ CHECK((qlls_count > 0));
+
+ quantile = (rt_quantile) rt_band_get_quantiles_stream(
+ band, 1, 1, 60,
+ &qlls, &qlls_count,
+ NULL, 0,
+ &count);
+ CHECK(quantile);
+ CHECK(count);
+ CHECK((qlls_count > 0));
+
+ quantile = (rt_quantile) rt_band_get_quantiles_stream(
+ band, 1, 1, 60,
+ &qlls, &qlls_count,
+ NULL, 0,
+ &count);
+ CHECK(quantile);
+ CHECK(count);
+ CHECK((qlls_count > 0));
+
+ quantile = (rt_quantile) rt_band_get_quantiles_stream(
+ band, 1, 1, 60,
+ &qlls, &qlls_count,
+ NULL, 0,
+ &count);
+ CHECK(quantile);
+ CHECK(count);
+ CHECK((qlls_count > 0));
+
+ quantile_llist_destroy(&qlls, qlls_count);
+
+ /*
+ for (x = 0; x < count; x++) {
+ printf("%f = %f\n", quantile[x].quantile, quantile[x].value);
+ }
+ */
rtdealloc(quantile);
+
deepRelease(raster);
}