Correct when to compute number of tiles. Ticket is #1840

git-svn-id: http://svn.osgeo.org/postgis/trunk@9810 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
Bborie Park 2012-05-23 17:54:48 +00:00
parent 1f75c74b3b
commit bcb84f9aae
2 changed files with 3 additions and 5 deletions

1
NEWS
View file

@ -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

View 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++) {