]> granicus.if.org Git - postgis/commitdiff
#2953, Unable to compute stats for some features
authorPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 2 Oct 2014 17:32:12 +0000 (17:32 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 2 Oct 2014 17:32:12 +0000 (17:32 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13030 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/gserialized_estimate.c

index 93eea1e3a6a2456f142f9116147345647f0ef90f..4d2e187f84e85b391522dbfabab288d1ea00228b 100644 (file)
@@ -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) )
                {