]> granicus.if.org Git - postgis/commitdiff
Changed when the isnodata check takes place for out-db raster tiles
authorBborie Park <bkpark at ucdavis.edu>
Wed, 31 Oct 2012 00:42:00 +0000 (00:42 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Wed, 31 Oct 2012 00:42:00 +0000 (00:42 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10603 b70326c6-7e19-0410-871a-916f4a2858ee

raster/loader/raster2pgsql.c

index efafb0cf17b91d2b5119fdd966a9a2c85f5985b6..020ab5456439ca2054bb847e3472646ca8379d22 100644 (file)
@@ -1691,7 +1691,7 @@ convert_raster(int idx, RTLOADERCFG *config, RASTERINFO *info, STRINGBUFFER *til
                /* each tile is a raster */
                for (ytile = 0; ytile < ntiles[1]; ytile++) {
                        for (xtile = 0; xtile < ntiles[0]; xtile++) {
-                               
+
                                /* compute tile's upper-left corner */
                                GDALApplyGeoTransform(
                                        info->gt,
@@ -1725,9 +1725,6 @@ convert_raster(int idx, RTLOADERCFG *config, RASTERINFO *info, STRINGBUFFER *til
                                                return 0;
                                        }
 
-                                       /* inspect each band of raster where band is NODATA */
-                                       rt_band_check_is_nodata(band);
-
                                        /* add band to raster */
                                        if (rt_raster_add_band(rast, band, rt_raster_get_num_bands(rast)) == -1) {
                                                rterror(_("convert_raster: Could not add offlineband to raster"));
@@ -1735,6 +1732,9 @@ convert_raster(int idx, RTLOADERCFG *config, RASTERINFO *info, STRINGBUFFER *til
                                                raster_destroy(rast);
                                                return 0;
                                        }
+
+                                       /* inspect each band of raster where band is NODATA */
+                                       rt_band_check_is_nodata(band);
                                }
 
                                /* convert rt_raster to hexwkb */