<div class="gmail_quote">On Wed, Sep 1, 2010 at 11:32 AM, Eric Wolf <span dir="ltr">&lt;<a href="mailto:ebwolf@gmail.com">ebwolf@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>I think I&#39;m missing something obvious:</div><div><br></div>I&#39;ve setup tilecache.cgi to construct a cache of the NAIP imagery on my local server. So far, this works great as an &quot;Custom&quot; imagery source in Potlatch:<div>

<br></div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><a href="http://navigator.er.usgs.gov/naip/tilecache.cgi/1.0.0/0/!/!/" style="color:rgb(42, 93, 176)" target="_blank">http://navigator.er.usgs.gov/naip/tilecache.cgi/1.0.0/0/!/!/</a>!</span></div>

<div><br></div><div>But I would also like to be able to hit the disk cache directly, ala:</div><div><br></div><div><a href="http://navigator.er.usgs.gov/naip/0/!/!/" target="_blank">http://navigator.er.usgs.gov/naip/0/!/!/</a>!</div>
<div>
<br></div><div>I can successfully load individual images from the cache like this:</div><div><br></div><div><a href="http://navigator.er.usgs.gov/naip/0/16/15060/25346.png" target="_blank">http://navigator.er.usgs.gov/naip/0/16/15060/25346.png</a></div>

<div><br></div><div>When I look at the Apache error log, I see &quot;Cache hit:... Tile: x: 15060, y: 40188, z: 16</div><div><br></div><div>But in the naip/0/16/15060 directory, there are only four PNGs with filenames nothing like &quot;40188.png&quot;:</div>

<div><br></div><div>25345.png, 25346.png, 25347.png, 25348.png, </div><div><br></div><div>My tilecache.cfg looks like this:</div><div><br></div><div><span style="font-family:monospace;font-size:medium;white-space:pre-wrap">[cache]</span></div>

<div><span style="font-family:&#39;Times New Roman&#39;;font-size:medium"><pre style="word-wrap:break-word;white-space:pre-wrap">type=GoogleDisk
base=/osmcp/rails/public/naip

[0] 
type=WMS 
url=<a href="http://isse.cr.usgs.gov/ArcGIS/services/Combined/SDDS_Imagery/MapServer/WMSServer" target="_blank">http://isse.cr.usgs.gov/ArcGIS/services/Combined/SDDS_Imagery/MapServer/WMSServer</a> 
#layers=0
levels=19
bbox=-180,90,180,-90
srs=EPSG:102113 
spherical_mercator=true
tms_type=google</pre><pre style="word-wrap:break-word;white-space:pre-wrap">I guess this could be a moot point if there isn&#39;t a significant speed improvement hitting the cache directory directly vs. using tilecache.cgi as a proxy.</pre>

<pre style="word-wrap:break-word;white-space:pre-wrap"></pre></span></div></blockquote></div><br><div>Two things:</div><div><br></div><div>1. Tilecache does directory munging to guarantee that any one directory has a limited number of files in it. You probably actually want to look in the /osmcp/rails/public/naip/16/000/015/060/000/040/ directory for 188.png.</div>
<div>2. tms_type=google flips one of the axes on its head so the tiles that get saved in cache will have a different number than the ones on the disk.</div><div><br></div><div>After typing all this I noticed you used the GoogleDesk cache type, so I might be completely wrong.</div>