]> granicus.if.org Git - postgis/commitdiff
Correct when to compute number of tiles. Ticket is #1840
authorBborie Park <bkpark at ucdavis.edu>
Wed, 23 May 2012 17:54:48 +0000 (17:54 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Wed, 23 May 2012 17:54:48 +0000 (17:54 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9810 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
raster/loader/raster2pgsql.c

diff --git a/NEWS b/NEWS
index ecc8cbc00a94da33d54c19df18b5b3e371753bdf..8d05901aa303b8c03c0f76c510f9ae2754e54410 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ PostGIS 2.1.0
 * Fixes *
 
   - #1839, handling of subdatasets in GeoTIFF in raster2pgsql.
+  - #1840, fix logic of when to compute # of tiles in raster2pgsql.
 
 PostGIS 2.0.0
 2012/04/03
index ac7482691802892f4f0969fed66627b069b27c4b..a7e23b45cc16d301642e2848e800c4030d56d075 100644 (file)
@@ -1595,13 +1595,10 @@ convert_raster(int idx, RTLOADERCFG *config, RASTERINFO *info, STRINGBUFFER *til
                info->tile_size[1] = config->tile_size[1];
 
        /* number of tiles */
-       if (
-               info->tile_size[0] != info->dim[0] &&
-               info->tile_size[1] != info->dim[1]
-       ) {
+       if (info->tile_size[0] != info->dim[0])
                ntiles[0] = (info->dim[0] + info->tile_size[0]  - 1) / info->tile_size[0];
+       if (info->tile_size[1] != info->dim[1]) 
                ntiles[1] = (info->dim[1] + info->tile_size[1]  - 1) / info->tile_size[1];
-       }
 
        /* go through bands for attributes */
        for (i = 0; i < info->nband_count; i++) {