The intention was to specify smaller tiles for urban areas, but if it was deemed necessary to use this kind of system up north (wooded areas and lakes could be complex and dense up there), then one would have to put "ifelse" statements into the algorithm, and make the longitude sizes .2 degrees wide from 68 to 80 degrees north latitude, and .4 degrees wide from 80 to 90 degrees north latitude. The latitude sizes would remain the same, and the system would retain a 5x5 configuration. In investigating this matter, I've found that <a href="http://www.steggink.org/geo/">http://www.steggink.org/geo/</a> has a bug for the northern latitudes.<br>
<br>The reason I chose a letter as the final identifier was to continue the alternating pattern already existing in NTS tiling (###X/## gets extended to ###X/##X), and, more importantly in my opinion, it also makes it clear where the final delimiter is in a quick glance or in shorthand notations. It's already fairly common to drop the solidus/slash between the 1/250K and 1/50K identifiers, so dropping the hyphen between the 1/50K and 1/10K could be easily recognized if the final identifier is a letter.<br>
<br>As for finding neighbouring tiles, that's just one of the problems with the system. This also happens when dealing with 1/250K sheets. On a technical note, you actually solved most of the problem, all you would have to do is convert the <font color="#0000ff" size="2" face="Arial"><span><span style="color: rgb(0, 0, 0);">([x-6,-5,-4],x-1,x+1,[x+4,</span><span style="color: rgb(0, 0, 0);">+5,+6])</span><font color="#000000"> or similar statement to ascii code with an offset of x into the ascii code for the tile in the center of the search square. Of course this isn't doable by humans so defeats the purpose of this scheme selecting 5x5 tiles to make it easier for humans. Aside: 6, 5, 4 only works as an offset for tiles 3, </font></span></font>8, 13 and 18. If you wanted neigbours of 7 or 17, then you would need offsets of -2, -3, -4 for the tiles below and +6, +7, +8 for tiles above, and other combinations for other tiles. The algorithm for finding north-neighbouring tiles is (where x is the center tile and % is the modulus operator):<br>
<br>if(x<21)<br>   north = x + 9 - 2 * ((x-1) % 5)<br>//Add decimal value 64 to the result to get the decimal value of the ascii character you want<br><br>It's just a trade off between pros and cons for whether you want to use a letter or a number as the last identifier.<br>
<br>I don't know much about Canvec, but doesn't it use the same tile naming system? I should think that it would work.<br><br>Adam<br><br><div class="gmail_quote">On Wed, Nov 18, 2009 at 7:11 AM, Bégin, Daniel <span dir="ltr"><<a href="mailto:Daniel.Begin@rncan-nrcan.gc.ca">Daniel.Begin@rncan-nrcan.gc.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>A great proposition!</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>- About NTS tiling:  Just take into account in 
your algorythm that the width of NTS tiling double at latitude 68 and 80 (don't 
use fixed longitude values because you will end up with 400 tiles for an 
NTS up north !)</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>- About naming convention, I would propose to use a 
number as suffix instead of a letter. It would be easier (for me) to find 
neighbour tiles.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>Example: <span>021E05-18 (with 
a 5X5 window)</span></span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>Neighbours are 12,13,14,17,19, 
22,23,24      
([18-6,-5,-4],18-1,18+1,[18+4,+5,+6])</span></font></div>
<div><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div><font color="#0000ff" size="2" face="Arial"><span>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>Example: <span>021E05R (with a 
5X5 window)</span></span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>Neighbours are 
L,M,N,Q,S,V,W,X                
(I have no magic to do that!)</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>- Is it going to work with Canvec as 
well?</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>Cheers,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>Daniel</span></font></div></span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"></font><br></div>
<div dir="ltr" lang="en-us" align="left">
<hr>
<font size="2" face="Tahoma"><b>From:</b> <a href="mailto:talk-ca-bounces@openstreetmap.org" target="_blank">talk-ca-bounces@openstreetmap.org</a> 
[mailto:<a href="mailto:talk-ca-bounces@openstreetmap.org" target="_blank">talk-ca-bounces@openstreetmap.org</a>] <b>On Behalf Of </b>Adam 
Dunn<br><b>Sent:</b> 18 novembre 2009 01:42<br><b>To:</b> 
talk-ca<br><b>Subject:</b> [Talk-ca] NTS 1/10,000 Tile 
Proposal<br></font><br></div><div><div></div><div class="h5">
<div></div>This applies only to the band of tiles represented by the 7 
southernmost major tiles. That is to say {00-06, 10-16, 20-26, etc}. Once you go 
north of that, the tile naming scheme changes, and the following no longer 
applies (and is likely no longer needed).<br><br>Though many people know how the 
NTS naming scheme works, it will be summarized here. NTS tiles are first given a 
major number, such as 010 or 093, progressing south to north and east to west. 
Each of these tiles is four degrees high (latitude) and eight degrees wide 
(longitude). These tiles are then split up into 16 tiles, the so-called 
1/250,000 tiles, and given a letter as a name, starting from the south-east 
corner then going west and zig-zagging north. Each of these tiles is one degree 
high (lat) and two degrees wide (long). Each of these tiles are split once again 
into the 16 1/50,000 tiles, each with a number, following the same zig-zag 
pattern as the 1/250,000 tiles. These numbered tiles are 0.25 degrees high and 
0.5 degrees wide.<br><br>So far, the tile divisions have worked out to nice 
round numbers. For 1/250,000 tiles the least significant digits are:<br>lat: {0, 
1, 2, 3, ...} and long: {0, 2, 4, 6, 8}<br><br>For 1/50,000 tiles, least sig 
digits are:<br>lat: {.00, .25, .50, .75} and long: {.0, .5}<br><br>This system 
works well, but for the purposes of OSM in high-density areas it becomes 
necessary to split NTS tiles up further. Splitting the 1/50,000 tiles up into 16 
tiles would follow the NTS splitting scheme, but would result in very strange 
numbers:<br>lat: {.0, .0625, .125, .1875, .25, ...} and long: {.0, .125, .25, 
.375, .5, ...}<br>While there's nothing wrong with this and computers could 
handle it easily, it's a little hard on human eyes ;)<br><br>If the tiles were 
instead split into 25 tiles (5x5), the numbers would work out a little nicer to 
the eye:<br>lat: {.0, .05, .1, .15, .2, .25, ...} and long: {.0, .1, .2, .3, .4, 
...}<br><br>Thus, the proposal is to split NTS 1/50,000 tiles into 1/10,000 
tiles such that each tile is 0.05 degrees in latitude and 0.1 degrees in 
longitude. The naming would take on letters A through Y, in a zig-zag pattern 
similar to the pre-existing NTS scheme, starting from the south-east corner. 
This letter would go in the last position of the tile name, eg. 042I/12A or 
092H/04Y. Figure 1 shows an example for 092H/04 (the figure is twice as wide as 
it is tall, following an equirectangular projection. In real life, and most 
projection methods, the length ratios change with latitude.)<br><br>Fig 1: <a href="http://www.mediafire.com/imageview.php?quickkey=mmmymj42yw4&thumb=4" target="_blank">http://www.mediafire.com/imageview.php?quickkey=mmmymj42yw4&thumb=4</a><br>
<br>Adam<br></div></div></div>
</blockquote></div><br>