From: Paul Ramsey Date: Thu, 2 Oct 2014 17:32:12 +0000 (+0000) Subject: #2953, Unable to compute stats for some features X-Git-Tag: 2.2.0rc1~814 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e24cb0f7f6bd067a3941a5272b21ebff0a5b5203;p=postgis #2953, Unable to compute stats for some features git-svn-id: http://svn.osgeo.org/postgis/trunk@13030 b70326c6-7e19-0410-871a-916f4a2858ee --- 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) ) {