Permalink
Browse files

Fixed extent issue with MVT tiles. We assume the extent is given as a…

… MapServer extent (pixel center) and we need the edge-to-edge version to properly query and encode the tile. (#5578)
  • Loading branch information...
sdlime committed Apr 18, 2018
1 parent 7cf9b5f commit f3bfd691eddb01aa4d6d5a5bca7af99e110bbe33
Showing with 6 additions and 0 deletions.
  1. +6 −0 mapmvt.c
@@ -320,6 +320,12 @@ int msMVTWriteTile( mapObj *map, int sendheaders ) {
VectorTile__Tile mvt_tile = VECTOR_TILE__TILE__INIT;
mvt_tile.layers = msSmallCalloc(map->numlayers,sizeof(VectorTile__Tile__Layer*));
/* expand the map->extent so it goes from pixel center (MapServer) to pixel edge (OWS) */
map->extent.minx -= map->cellsize * 0.5;
map->extent.maxx += map->cellsize * 0.5;
map->extent.miny -= map->cellsize * 0.5;
map->extent.maxy += map->cellsize * 0.5;
for( iLayer = 0; iLayer < map->numlayers; iLayer++ ) {
int status=MS_SUCCESS;
layerObj *layer = GET_LAYER(map, iLayer);

0 comments on commit f3bfd69

Please sign in to comment.