<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>There are two steps to a tilecache...<br>Step 1: Seeding it.<br>Step 2: Querying from it.<br><br>Metatile usefulness is best seen while seeding the tile cache.&nbsp; If you look at the attached graphic (a rough estimation of a 3x3 meta-tile setup) then you'll see as the tilecache seed iterates through the map, it "oversamples" the map and uses the "center" image to represent the tile ("A").&nbsp; When moving onto the next tile ("B"), it performs the same over-sampling.&nbsp; Since the map is then never at the "edge" of the generation you do not see errors with off-map lines and labelling at the edges.<br><br>Now, there two ways to query the tilecache:<br>1) As a WMS service.&nbsp; IMO, this is slow you can do as you wish but I've always thought this to be quite a bit slower than taking the oppurunity to
 fully seed a tilecache.&nbsp; In this scenario if you have a "cache hit" there is no additional generation costs.&nbsp; If you have a "cache miss" the generation cost is greater, but mapserver, PIL, etc., are very efficient at generating images.&nbsp; The actual cost of generating a 256x256 image and the cost of geneerating a 768x768 image is not terribly significant.&nbsp; Plus, once it has been done for a tile, it never needs to be done again.<br><br>2) As a tilecache, this is where you just serve up the directory as a TileCache.&nbsp; This is a lot faster but assumes you have fully seeded your cache.&nbsp; In this scenario you have no additional generation costs, all of that work has been done up front.<br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight:
 bold;">From:</span></b> Nelson Correia &lt;nelsonwc7@hotmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> mapserver-users@lists.osgeo.org<br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, March 3, 2009 10:17:08 AM<br><b><span style="font-weight: bold;">Subject:</span></b> RE: [mapserver-users] Mapserver images doesn't fit well on a tiling scheme‏<br></font><br>


<style>
.hmmessage P
{
margin:0px;padding:0px;}
body.hmmessage
{
font-size:10pt;font-family:Verdana;}
</style>

<br>&nbsp;I'm not sure if I got it right... When I request a 3x3 meta tile grid, tilecache only caches the center image? What if I request the image on the right of it and again another image to the right? Tilecache will issue new and overlapped requests to Mapserver? Or for the second request it will reuse a tile from the previous 3x3 request?<br>
&nbsp;<br>
<hr id="stopSpelling">
Date: Tue, 3 Mar 2009 06:46:58 -0800<br>From: danlittle@yahoo.com<br>Subject: Re: [mapserver-users] Mapserver images doesn't fit well on a tiling scheme‏<br>To: nelsonwc7@hotmail.com; mapserver-users@lists.osgeo.org<br><br>
<style>
.ExternalClass DIV
{}
</style>

<div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">
<div>I think you're a bit wrong there.&nbsp; If you build the Cache using tilecache, when you use the "metaTiles" it will take a larger sample than the image being generated, for example if you have a 3x3 meta tile grid, the "center" tile of the nine-tile grid will be used.&nbsp; I had the exact same problem you are describing, but then setup the tilecache generator to use metatiles and things started to work beautifully -- including labels.<br></div>
<div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br>
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2">
<hr size="1">
<b><span style="font-weight: bold;">From:</span></b> Nelson Correia &lt;nelsonwc7@hotmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> mapserver-users@lists.osgeo.org<br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, March 3, 2009 8:11:16 AM<br><b><span style="font-weight: bold;">Subject:</span></b> RE: [mapserver-users] Mapserver images doesn't fit well on a tiling scheme‏<br></font><br>
<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>
<br>&nbsp;<br>With metaTile I can issue a pre-defined number of tiles that fit well. But this is per-request (if I'm right).&nbsp;For instance, if I make two consecutive requests of 4 tiles each from consecutive map zones, I get two sets of tiles that does not fit with each other (the first 4 do not fit side by side with the second 4).<br>&nbsp;<br>The problem with that approach is that&nbsp;tiles&nbsp;from the same request fit well, but in order to construct a map like VE or Google Maps I need that tiles from different requests to always fit well.<br>&nbsp;<br>Please tell me If I am wrong.<br>&nbsp;<br>
<hr id="EC_stopSpelling">
Date: Tue, 3 Mar 2009 05:44:05 -0800<br>From: danlittle@yahoo.com<br>Subject: Re: [mapserver-users] (no subject)<br>To: nelsonwc7@hotmail.com; mapserver-users@lists.osgeo.org<br><br>
<style>
.ExternalClass DIV
{}
</style>

<div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">
<div>Check the documentation on the "metaTile" it requires having PIL installed but that is not really a big hassle.</div>
<div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br>
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2">
<hr size="1">
<b><span style="font-weight: bold;">From:</span></b> Nelson Correia &lt;nelsonwc7@hotmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> mapserver-users@lists.osgeo.org<br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, March 3, 2009 6:17:10 AM<br><b><span style="font-weight: bold;">Subject:</span></b> [mapserver-users] (no subject)<br></font><br>Hi,<br>&nbsp;<br>We are&nbsp;using Mapserver to produce tiles for a web application, using Tilecache as the caching mechanism. <br>&nbsp;<br>When&nbsp;we were&nbsp;building the system,&nbsp;we figured out that tiles requested does not fit well side by side (the roads of one tile does not fit the prolongation of the same road in the next tile). To eliminate this issue, we had to issue an extra 10 pixels (around the whole tile) request to Mapserver and then cut them. <br>&nbsp;<br>Then another problem arose: we could not make this with the labels because they appeared cut in one tile
 and there was no prolongati
  on of it on the next tile. The solution was to divide it into different layers: one for the roads with the 10 pixels buffer and another for the labels without buffer. This has the impact of duplicating the total number of images.<br>&nbsp;<br>Anyone known an alternate solution for this problem?<br>&nbsp;<br>Isn't Mapserver capable of serving images that fit well side by side?<br>&nbsp;<br>Thanks in advance!<br></div></div></div></div></div></div><br><hr>What can you do with the new Windows Live? <a rel="nofollow" target="_blank" href="http://www.microsoft.com/windows/windowslive/default.aspx">Find out</a></div></div></div><br>



      </body></html>