From e24cb0f7f6bd067a3941a5272b21ebff0a5b5203 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Thu, 2 Oct 2014 17:32:12 +0000 Subject: [PATCH] #2953, Unable to compute stats for some features git-svn-id: http://svn.osgeo.org/postgis/trunk@13030 b70326c6-7e19-0410-871a-916f4a2858ee --- postgis/gserialized_estimate.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/postgis/gserialized_estimate.c b/postgis/gserialized_estimate.c index 93eea1e3a..4d2e187f8 100644 --- a/postgis/gserialized_estimate.c +++ b/postgis/gserialized_estimate.c @@ -1319,6 +1319,10 @@ compute_gserialized_stats_mode(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfu continue; } + /* If we're in 2D mode, zero out the higher dimensions for "safety" */ + if ( mode == 2 ) + gbox.zmin = gbox.zmax = gbox.mmin = gbox.mmax = 0.0; + /* Check bounds for validity (finite and not NaN) */ if ( ! gbox_is_valid(&gbox) ) { -- 2.50.1