]> granicus.if.org Git - postgis/commitdiff
-The minimum for float and double are -FLT_MAX & -DBL_MAX
authorPierre Racine <Pierre.Racine@sbf.ulaval.ca>
Fri, 15 Apr 2011 20:30:52 +0000 (20:30 +0000)
committerPierre Racine <Pierre.Racine@sbf.ulaval.ca>
Fri, 15 Apr 2011 20:30:52 +0000 (20:30 +0000)
-Stacked some CASE options

git-svn-id: http://svn.osgeo.org/postgis/trunk@7041 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_core/rt_api.c

index 2060072422e478ddc655815eb4fb004b3704dc08..4a3f5d980d70fd5ffa81da09a6267d8b1a402d97 100644 (file)
@@ -1156,7 +1156,10 @@ rt_band_get_min_value(rt_context ctx, rt_band band) {
     pixtype = band->pixtype;
 
     switch (pixtype) {
-        case PT_1BB: case PT_2BUI: case PT_4BUI: case PT_8BUI:
+        case PT_1BB: 
+        case PT_2BUI: 
+        case PT_4BUI: 
+        case PT_8BUI:
         {
             return (double)CHAR_MIN;
         }
@@ -1164,21 +1167,23 @@ rt_band_get_min_value(rt_context ctx, rt_band band) {
         {
             return (double)SCHAR_MIN;
         }
-        case PT_16BSI: case PT_16BUI:
+        case PT_16BSI: 
+        case PT_16BUI:
         {
             return (double)SHRT_MIN;
         }
-        case PT_32BSI: case PT_32BUI:
+        case PT_32BSI: 
+        case PT_32BUI:
         {
             return (double)INT_MIN;
         }
         case PT_32BF:
         {
-            return (double)FLT_MIN;
+            return (double)-FLT_MAX;
         }
         case PT_64BF:
         {
-            return (double)DBL_MIN;
+            return (double)-DBL_MAX;
         }
         default:
         {