Apologies for repeating this posting, but I realize I probably didn't do a good job of explaining the problem before. Basically it appears that Tilecache is making requests for tiles with extents that a WMS service cannot fill under certain conditions. The result manifests itself as weird horizontal stripes across various parts of my Google Map, with the location of the stripe varying depending on the Zoom level of the map. I have posted screenshots of the problem <a href="http://lagerratrobe.blogspot.com/2008/11/strange-tilecache-artifacts.html">here</a>. <br>
<br>As one of the most noticeable stripes occurs at Zoom Level 2, I was able to find the actual TileCache WMS request in my Apache logs. It looks like this:<br><a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/test/test.map&layers=imagery&srs=EPSG%3A900913&version=1.1.1&bbox=-20037508.34%2C-20037508.34%2C-10018754.1704%2C-10018754.1704&service=WMS&width=256&styles=&format=image%2Fpng&request=GetMap&height=256">http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/test/test.map&layers=imagery&srs=EPSG%3A900913&version=1.1.1&bbox=-20037508.34%2C-20037508.34%2C-10018754.1704%2C-10018754.1704&service=WMS&width=256&styles=&format=image%2Fpng&request=GetMap&height=256</a><br>
<br>When that request is made, the tile at the bottom of the sample page I've linked to above is returned. You can see that the bottom few rows of pixels contain only background color, making the stripe that runs across the example screenshots.<br>
<br>I figure there are a couple possibilities for why this problem is ocurring.<br><br>1) TileCache is specifying an incorrect bbox size when it makes a WMS request for the tile.<br>2) The projection definition for epsg 900913 is incorrect in some way, and the reprojection from 4326 to 900913 is flawed.<br>
<br>Either way, it makes it difficult to display rasters with large extents. One element that I can eliminate though is the renderer. The flaw is reproducible using various versions of Mapserver, as well as Mapnik.<br><br>
I would love to actually have a chance to discuss this problem, and will gladly provide any additional information upon request.<br><br>Roger<br>--<br>Just in case someone else wants to see this for themselves, here are the steps needed to replicate the condition I'm seeing.<br>
<br>Step 1. Create a large rectangular image of Size 14400 x 7200.<br>
<br>
Step 2. Assign georeferencing to the image:<br>
gdal_translate -a_ullr -180 90 180 -90 -a_srs "EPSG:4326" big_black.tif wgs84_big_black.tif<br>
<br>
Step 3. Load this image into some sort of WMS rendering system and assign a background color value of red to it.<br>
<br>
Step 4. Make sure you have the spherical mercator projection defined in your epsg file.<br>
<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0
+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs <><br>
<br>
Step 5. Make a WMS request for a tile that replicates one that TileCache makes:<br>
<a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/test/test.map" target="_blank">http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/test/test.map</a><br>
&layers=imagery<br>
&srs=EPSG%3A900913<br>
&version=1.1.1<br>
&bbox=-20037508.34%2C-<div id=":tv" class="ArwC7c ckChnd">20037508.34%2C-10018754.1704%2C-10018754.1704<br>
&service=WMS<br>
&width=256<br>
&styles=<br>
&format=image%2Fpng<br>
&request=GetMap<br>
&height=256<br>
<br>
Step 6. Admire the red line at the bottom of the image which indicates no data.<br><font color="#888888">--</font></div><br>