[Geoserver-devel] [jira] (GEOS-5786) GWC - Tile gutter is not cropped when metatile contains only one tile

Joseph Glynn created BugGEOS-5786
GWC - Tile gutter is not cropped when metatile contains only one tile

Issue Type:

BugBug

Affects Versions:

2.3.0, 2.2.4

Assignee:

Andrea Aime

Attachments:

sf-roads.jpg

Components:

GWC

Created:

22/Apr/13 11:18 PM

Description:

I found an issue in 2.2.4 and it also occurs in 2.3.0.

The issue is that when I set the tile cache gutter on a layer, some tiles would display misaligned to adjacent tiles and the erroneous tiles were actually bigger than adjacent tiles. The actual tile image sizes were different.

There is an easy way to reproduce this. Here are the steps:

  1. From the Web Admin navigate to the layers page
  2. Edit the layer sf:roads
  3. Navigate to the tile caching tab
  4. Set Metatiling factors to 1 tiles wide by 1 tiles high
  5. Set Gutter size in pixels to 100
  6. Save Changes
  7. Navigate to the Tile Layers tab
  8. In the row for sf:roads, choose “EPSG:900913 / JPG” from the preview combo-box

You will see the image displayed is corrupted. I’ve attached a screenshot.

Through debugging I believe there is an incorrect conditional in GeoServerMetaTile.writeTileToStream().

The code on line 80

if (this.tiles.length > 1)

should be

if (this.tiles.length > 0)

I made this change locally and it fixes the issue.

Please not that this issue can occur on some tiles even if the meta-tiling is more than 1x1 (it happens on my layers for 2x2, 3x3, 4x4 etc.) Using 1x1 just emphasizes the issue for this JIRA.

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Joseph Glynn

Original Estimate:

4 hours

Remaining Estimate:

4 hours

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)