<div dir="ltr">Hi,<br><br>I would like to test the speed that it takes to seed my cache for a single tile of my raw data. I am having trouble figuring out the correct config/commandline syntax to run tilecache_seed.py so that it only runs on the area occupied by my raw tile. I *think* that since I have my Tilecache layer set to use "spherical mercator", I need to specify both the layer's bbox, and the commandline argument to tilecache_seed.py in spherical mercator coordinates, and not in the WGS84 coords that my original data is in. I also *think* that the bbox format is "min_x, min_y, max_x, max_y", based on the exaple present in the original tilecache.cfg file. Based on those assumptions, I have the following info:<br>
<br>- wgs84 bbox = "-110, 30, -105, 35"<br><br>- Based on that, I *think* the bbox in spherical mercator is:<br>sph_mercator bbox = "-12245143.987260,3503549.843504,-11688546.533294,4163881.144064"<br>
<br>- (That's based on using cs2cs to convert the wgs84 coords):<br>$echo "-110 30" | cs2cs + +init=epsg:4326 +to +init=epsg:900913 -f "%.6f"<br>-12245143.987260 3503549.843504 0.000000<br>$echo "-105 35" | cs2cs + +init=epsg:4326 +to +init=epsg:900913 -f "%.6f"<br>
-11688546.533294 4163881.144064 0.000000<br><br>- tilecache config:<br>[blah]<br>type=WMS<br>url=<a href="http://10.10.10.143/cgi-bin/mapserv?map=/var/www/mapfiles/blah/blah.map">http://10.10.10.143/cgi-bin/mapserv?map=/var/www/mapfiles/blah/blah.map</a><br>
layers=imagery2<br>spherical_mercator=true<br>metabuffer=15<br>bbox="-12245143.987260,3503549.843504,-11688546.533294,4163881.144064"<br><br>- This entry works fine when I try to view the tile in Google Maps. Displays correctly with no issues. It also works fine when I use tilecache_seed.py without specifying a bbox:<br>
./tilecache_seed.py "<a href="http://localhost/cgi-bin/tilecache-2.04/tilecache.cgi">http://localhost/cgi-bin/tilecache-2.04/tilecache.cgi</a>?" blah 1 2<br>###### (0, 0, 1), (2, 2, 1)<br>Cache miss: -20037508.34,-20037508.34,-0.000799998641014,-0.000799998641014, Tile: x: 0, y: 0, z: 1, time: 0.235054969788<br>
01 (000000, 000000) = (-20037508.3400 -20037508.3400 -0.0008 -0.0008) [0.2352s : 4.246/s] 1/4<br>Cache miss: -0.000799998641014,-20037508.34,20037508.3384,-0.000799998641014, Tile: x: 1, y: 0, z: 1, time: 0.225296020508<br>
01 (000001, 000000) = (-0.0008 -20037508.3400 20037508.3384 -0.0008) [0.2254s : 4.338/s] 2/4<br>Cache miss: -20037508.34,-0.000799998641014,-0.000799998641014,20037508.3384, Tile: x: 0, y: 1, z: 1, time: 0.242295980453<br>
01 (000000, 000001) = (-20037508.3400 -0.0008 -0.0008 20037508.3384) [0.2424s : 4.264/s] 3/4<br>Cache miss: -0.000799998641014,-0.000799998641014,20037508.3384,20037508.3384, Tile: x: 1, y: 1, z: 1, time: 0.221132993698<br>
01 (000001, 000001) = (-0.0008 -0.0008 20037508.3384 20037508.3384) [0.2213s : 4.325/s] 4/4<br><br>- However, when I try to specify the same bbox as the layer's in the commandline, I get no tiles:<br>./tilecache_seed.py "<a href="http://localhost/cgi-bin/tilecache-2.04/tilecache.cgi">http://localhost/cgi-bin/tilecache-2.04/tilecache.cgi</a>?" blah 4 5 "-12245143.987260,3503549.843504,-11688546.533294,4163881.144064"<br>
<br>I'm betting that I'm specifying incorrect coordinates somehow, but I'm not sure where.<br><br>- To recap, I'm starting with a raw tile that has these extents in EPSG:4326:<br>Upper Left (-110.0000000, 35.0000000)<br>
Lower Left (-110.0000000, 30.0000000)<br>Upper Right (-105.0000000, 35.0000000)<br>Lower Right (-105.0000000, 30.0000000)<br><br>- I want to run Tilecache against this and generate Google Map tiles, but only for the area occupied by that tile.<br>
<br>Thanks,<br><br>Roger<br><br><br><br><br><br></div>