[mapserver-commits] r12777 - trunk/mapserver/mapcache/src
svn at osgeo.org
svn at osgeo.org
Wed Nov 16 06:16:13 EST 2011
Author: tbonfort
Date: 2011-11-16 03:16:12 -0800 (Wed, 16 Nov 2011)
New Revision: 12777
Modified:
trunk/mapserver/mapcache/src/mapcache_seed.c
Log:
fix seeding when using an uneven metatile size combined with power-of-2 resolutions (#4083)
Modified: trunk/mapserver/mapcache/src/mapcache_seed.c
===================================================================
--- trunk/mapserver/mapcache/src/mapcache_seed.c 2011-11-16 09:24:15 UTC (rev 12776)
+++ trunk/mapserver/mapcache/src/mapcache_seed.c 2011-11-16 11:16:12 UTC (rev 12777)
@@ -334,18 +334,19 @@
* current metatile
*/
int minchildx,maxchildx,minchildy,maxchildy;
- double bboxtl[4],bboxbr[4];
+ double bboxbl[4],bboxtr[4];
mapcache_grid_get_extent(cmd_ctx, grid_link->grid,
- curx, cury, curz, bboxtl);
+ curx, cury, curz, bboxbl);
mapcache_grid_get_extent(cmd_ctx, grid_link->grid,
- curx+tileset->metasize_x-1, cury+tileset->metasize_y-1, curz, bboxbr);
+ curx+tileset->metasize_x-1, cury+tileset->metasize_y-1, curz, bboxtr);
+ double epsilon = (bboxbl[2]-bboxbl[0])*0.01;
mapcache_grid_get_xy(cmd_ctx,grid_link->grid,
- (bboxtl[0]+bboxtl[2])/2,
- (bboxtl[1]+bboxtl[3])/2,
+ bboxbl[0] + epsilon,
+ bboxbl[1] + epsilon,
tile->z,&minchildx,&minchildy);
mapcache_grid_get_xy(cmd_ctx,grid_link->grid,
- (bboxbr[0]+bboxbr[2])/2,
- (bboxbr[1]+bboxbr[3])/2,
+ bboxtr[2] - epsilon,
+ bboxtr[3] - epsilon,
tile->z,&maxchildx,&maxchildy);
minchildx = (minchildx / tileset->metasize_x)*tileset->metasize_x;
More information about the mapserver-commits
mailing list